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
feat(planning): add design_spec_depth (brief default) and restore spacing and neutral-color anchors
hugohe36887d7d7a155
diff --git a/skills/ppt-master/references/executor-base.md b/skills/ppt-master/references/executor-base.mdindex 04144374..bc433561 100644--- a/skills/ppt-master/references/executor-base.md+++ b/skills/ppt-master/references/executor-base.md@@ -69,17 +69,17 @@ Consume stdout directly; stop on non-zero exit. The projection is derived, not a**Same-context repair**: in a valid uncompacted context, a bounded repair that preserves roster/order/identity/communication needs only affected Design Spec/lock fragment readback plus `project_manager.py validate`. Any broader or invalid-context repair requires the complete reads above.-**Hard rule — exact page roster**: `design_spec.md §IX` is the ordered queue: one final slide per entry, with the same id/order. The UI range no longer applies. Never add, drop, merge, split, or reorder; repair/reconfirm the Design Spec first.+**Hard rule — exact page roster**: `design_spec.md §IX` is the ordered queue: one final slide per entry, with the same id/order. Never add, drop, merge, split, or reorder while drawing. In a continuous run the same context may first repair the affected §IX blocks and `page_rhythm` rows and rerun `project_manager.py validate` when the page count stays inside the Stage-1 confirmed range; leaving that range reconfirms Stage 1.**Hard rule — binding selection vs realization**: use Strategist-selected semantic content, resources/paths, structured-template Master/Layout routing keys, core fonts, palette anchors, icon-library/stroke anchors, and crop boundaries. Adapt realization—including which prepared project-local icon, if any, best serves each page—without changing those binding selections, except sparse local font/color garnish allowed below. Missing or unresolved material stops execution and returns to Strategist-owned acquisition/failure recovery; never search, generate, download, sync, invent, or substitute it. Binding selection changes require upstream repair.**Reference — planning advice, not a layout lock**: treat §V/§IX `Layout`, cover/closing composition, capability recommendations, §III motif direction, Chart/Table `family/key` construction references, and §VIII image-layout patterns as non-binding inputs. Consider each, then adopt, adapt, or decline it without upstream repair when the same semantic job and every binding user/template/resource constraint remain satisfied. Executor owns final carrier choice, page-scale composition, information-preserving visualization realization, geometry, spacing, coordinates, native preset/Boolean/freeform construction, and effects.-**Hard rule — content vs expression**: `design_spec.md §IX` owns each page's semantic content and supplies complete preferred wording and block texture; those expression choices are not verbatim requirements unless explicitly literal. Executor may paraphrase, condense repetition, regroup or reorder material within the same page, and switch among prose, bullets, keywords, labels, or visual annotation when fit or readability benefits. The result must remain information-equivalent: preserve the `Core message`, `Audience move`, and every substantive claim, fact, data value, proper name, qualifier or caveat, relationship, key argument or evidence, and literal requirement. Never add a claim, move content across pages, or drop information to make the layout fit; return an unfit or underspecified block for Design Spec repair.+**Hard rule — content vs expression**: `design_spec.md §IX` owns each page's semantic content and supplies either complete preferred wording and block texture (`complete` depth) or a short block list (`brief` depth); written expression choices are not verbatim requirements unless explicitly literal. Executor may paraphrase, condense repetition, regroup or reorder material within the same page, and switch among prose, bullets, keywords, labels, or visual annotation when fit or readability benefits. The result must remain information-equivalent: preserve the `Core message`, `Audience move`, and every substantive claim, fact, data value, proper name, qualifier or caveat, relationship, key argument or evidence, and literal requirement. Never add a claim, move content across pages, or drop information to make the layout fit; return an unfit or underspecified block for Design Spec repair.Use named lock roles literally when that role applies, and use optional `Template Application` from the retained Design Spec. Choose contextual page-local values from the Design Spec, style, content, and current composition rather than forcing every object into a lock row. A page-context delta overrides neither facts nor constraints. Deprecated `page-context --bundle` is a compatibility no-op.-**Source verification**: §IX owns the complete page brief; the page delta does not carry the source corpus. Read sources only to resolve listed `Fact IDs` or verify required claims, quotes, names, or data. Do not add facts, claims, or selected content. Return underspecified blocks for Design Spec repair.+**Source verification**: §IX owns the page brief at its confirmed depth; the page delta does not carry the source corpus. Read sources only to resolve listed `Fact IDs` or verify required claims, quotes, names, or data. Do not add facts, claims, or selected content. Return underspecified blocks for Design Spec repair.**Per-page communication trace**: Read `communication.objective`, `communication.core_message`, and the current §IX `Core message` + `Audience move` before choosing composition. The page must advance the compact objective and move the audience as authored in §IX; the global core message remains the deck-wide north star. A page that cannot state this movement is an upstream outline defect — surface `warning: P<NN> has no communication move` instead of compensating with decorative layout. Do not invent a new purpose, ask, or outcome at execution time. Structural pages may advance the contract by establishing relevance / tension / decision frame or by completing the final commitment; they are not exempt from having a reason to exist.@@ -95,7 +95,7 @@ Use named lock roles literally when that role applies, and use optional `TemplatApply the content-vs-expression contract above within the selected reading mode. Never drop or invent facts to force a mode. When the authored texture materially conflicts with the lock, render the least-destructive faithful composition and surface `warning: P<NN> content texture conflicts with consumption_mode <value>` as an upstream outline issue; do not encode this subjective judgment in the checker.-**Default — authored texture (may override when information-equivalent)**: start from each `design_spec.md §IX Content` block's written texture because it is the Strategist's recommended expression. Keep prose when its continuity carries causal, argumentative, narrative, qualification, or emphasis relationships; use bullets or keywords when the material is genuinely parallel or ordered, or another information-equivalent structure is clearer. Never convert solely because a list is easier to lay out or an inherited template exposes a list slot.+**Default — authored texture (may override when information-equivalent)**: at `complete` depth start from each `design_spec.md §IX Content` block's written texture because it is the Strategist's recommended expression; at `brief` depth each block already carries its phrasing; expand it into page copy under the reading mode. Keep prose when its continuity carries causal, argumentative, narrative, qualification, or emphasis relationships; use bullets or keywords when the material is genuinely parallel or ordered, or another information-equivalent structure is clearer. Never convert solely because a list is easier to lay out or an inherited template exposes a list slot.- **Hard rule — one paragraph, one text frame**: use one `<text>` per prose paragraph, never sibling `<text>` elements for its visual lines. Keep the first authored line as direct text; later lines use direct `<tspan>` children that repeat parent `x`, retain effective font size, and use positive relative `dy`. An all-`<tspan>` form may start at `dy="0"`. Default retains these breaks without PowerPoint wrapping; `--reflow-text` enables reflow. Start from the shared leading ranges in [`shared-standards-core.md`](./shared-standards-core.md) §4.2, then adjust for the typeface, reading distance, explicit user/template requirements, and locked style.- **Template precedence**: an inherited slot never overrides the content relationship. If faithful expression needs prose, widen or reflow the container, or drop that card; never convert solely to fill a list slot.@@ -112,6 +112,7 @@ Apply the content-vs-expression contract above within the selected reading mode.- Base icons may use any SVG already prepared under `<project_path>/icons/`. `icons.library` records the Strategist's primary bundled style choice and `icons.inventory` indexes its curated synced pool; neither assigns icons to pages or limits other project-local assets. `simple-icons` entries are real brand marks; they are not a separately confirmed library.- Illustrated icons are prepared transparent slice files under `images/` and follow [`executor-image.md`](./executor-image.md), even when they perform the same compact semantic job as an SVG icon. Never move them into `icons/`, add them to `icons.inventory`, or render them through `<use data-icon>`.- Core color roles retain their meaning. Derive tints, shades, alpha, gradients, and effects; preserve natural asset colors; and use sparse page-local accents for differentiation/ornament. They must not become a competing or recurring palette.+- §V `Spacing anchors` (page margin, block gap, column gutter, corner radius, body leading) are deck-wide identity anchors: reuse them on every page and depart only for a page job, never to make content fit.- Resolve structural families by role: exact `<role>_family` first, then `title_family` for title roles or `body_family` for other unoverridden roles, then legacy `font_family`. Never flatten declared role overrides. A sparse export-safe accent family may style short non-structural display/ornament only—never title/body/data/annotation. Recurrence requires upstream selection.- Font sizes use the named `typography` role values as deck-wide anchors. Map every structural text item to a declared role before drawing; never inherit a template placeholder size. Start from the anchor, then use composition and content fit to adjust that occurrence by at most `±2`px. Keep same-page peers consistent and preserve the role hierarchy; bounded adjustment does not create a new role.- **Text roles**: declared `lead` / `subtitle` carry the page's primary claim; `footnote` / `annotation` carry footnotes, page numbers, and credits. Sizes come from declared roles.diff --git a/skills/ppt-master/references/strategist.md b/skills/ppt-master/references/strategist.mdindex ef4f9967..a09f687b 100644--- a/skills/ppt-master/references/strategist.md+++ b/skills/ppt-master/references/strategist.md@@ -34,9 +34,9 @@ solution + production gate:| Stage | Items | Role ||---|---|---|| **1 — communication contract + template choice** | `primary_language` · `c` audience · open-ended communication intent · audience outcome · core message / delivery context (primary + optional secondary) / artifact afterlife · `content_divergence` (all prose fields may be blank) · `a` canvas · explicit `free_design` or `templates` choice and selected roots | confirmed together; candidate workspaces do not influence the communication recommendation |-| **2 — final solution + production** (authored once from the user's *actual* Stage 1) | reading mode (`delivery_purpose`, PPT only) · `d` mode + visual style · `b` page count · `e` color · `f` icon · `g` typography · `h` image source + generated-image rendering · conditional natural-language template application · conditional AI-image acquisition path · generation mode · refine-spec toggle · proactive speaker notes / custom animations / narration audio | derived as one coherent plan from the confirmed contract; internal template exporter modes remain hidden |+| **2 — final solution + production** (authored once from the user's *actual* Stage 1) | reading mode (`delivery_purpose`, PPT only) · `d` mode + visual style · `b` page count · `e` color · `f` icon · `g` typography · `h` image source + generated-image rendering · conditional natural-language template application · conditional AI-image acquisition path · generation mode · refine-spec toggle · `design_spec_depth` · proactive speaker notes / custom animations / narration audio | derived as one coherent plan from the confirmed contract; internal template exporter modes remain hidden |-Do not force communication intent into one catalog label; Stage 1 records composite intent in prose. Editable prose fields are recommendation drafts, not required inputs: confirmation preserves current text and blanks; never repopulate a cleared field. Stage 2 confirms narrative spine, reading density, page budget, visual system, image direction, production mechanics, and how any installed template should be used. It never chooses or installs a template. Inspect only project-local template spec/prototypes, present one editable application plan, and keep exporter reuse/adherence internal. First author exactly three complete, project-fit solution directions from the confirmed contract and source; only then project each direction into mode, visual style, color, type, icons, and generated-image rendering for lower-level adjustment. Every direction projects a project-specific `custom` mode, `custom` visual style, and `custom` generated-image rendering; the fixed catalogs remain conservative lower-level single-select alternatives. Each direction is one complete design authored top-down within the confirmed contract, never assembled bottom-up from catalog picks; three exist so a single recommendation cannot lock the user in, and the fixed catalogs stay the manual lower layer. Its custom projections are unrestricted by catalog relationship and may carry one preset unchanged. The three directions are plainly different designs at the whole-deck level before any field is written; that difference lives in the solutions, not in one designated field. Whichever components a direction's own design requires carry it — mode, visual style, rendering, color, type, or icons — any of them may, and none is required to differ. A different name, note, or reference count alone is not a difference, and projections identical on every component are not three solutions. Do not force safe / shifted / bold archetypes or artificial extremes. After all three bundles are complete, choose the strongest overall fit when no template is installed; with installed template state, choose the viable direction that most strongly expresses its resolved context under [`strategist-template.md`](./strategist-template.md). Write its actual zero-based index as `design_directions.selected` (`0`, `1`, or `2`); array order never determines preference. Every direction carries a complete generated-image rendering candidate even when AI imagery is not recommended; `recommend.image_usage` independently decides whether AI is proposed. Generated images inherit deck colors—there is no second image palette. Proactive defaults are speaker notes `true`, custom animations `false`, and narration audio `false`; a prior explicit user instruction overrides the matching recommendation, and effective narration audio requires effective speaker notes. Author each stage once; same-stage edits update only visible browser state through documented deterministic dependencies, without another AI/backend recommendation. Launch/derive/wait mechanics live in [`generate-pptx.md`](../workflows/generate-pptx.md) Step 4; item specs keep `a`–`h`.+Do not force communication intent into one catalog label; Stage 1 records composite intent in prose. Editable prose fields are recommendation drafts, not required inputs: confirmation preserves current text and blanks; never repopulate a cleared field. Stage 2 confirms narrative spine, reading density, page budget, visual system, image direction, production mechanics, and how any installed template should be used. It never chooses or installs a template. Inspect only project-local template spec/prototypes, present one editable application plan, and keep exporter reuse/adherence internal. First author exactly three complete, project-fit solution directions from the confirmed contract and source; only then project each direction into mode, visual style, color, type, icons, and generated-image rendering for lower-level adjustment. Every direction projects a project-specific `custom` mode, `custom` visual style, and `custom` generated-image rendering; the fixed catalogs remain conservative lower-level single-select alternatives. Each direction is one complete design authored top-down within the confirmed contract, never assembled bottom-up from catalog picks; three exist so a single recommendation cannot lock the user in, and the fixed catalogs stay the manual lower layer. Its custom projections are unrestricted by catalog relationship and may carry one preset unchanged. The three directions are plainly different designs at the whole-deck level before any field is written; that difference lives in the solutions, not in one designated field. Whichever components a direction's own design requires carry it — mode, visual style, rendering, color, type, or icons — any of them may, and none is required to differ. A different name, note, or reference count alone is not a difference, and projections identical on every component are not three solutions. Do not force safe / shifted / bold archetypes or artificial extremes. After all three bundles are complete, choose the strongest overall fit when no template is installed; with installed template state, choose the viable direction that most strongly expresses its resolved context under [`strategist-template.md`](./strategist-template.md). Write its actual zero-based index as `design_directions.selected` (`0`, `1`, or `2`); array order never determines preference. Every direction carries a complete generated-image rendering candidate even when AI imagery is not recommended; `recommend.image_usage` independently decides whether AI is proposed. Generated images inherit deck colors—there is no second image palette. Proactive defaults are speaker notes `true`, custom animations `false`, and narration audio `false`; a prior explicit user instruction overrides the matching recommendation, and effective narration audio requires effective speaker notes. `design_spec_depth` defaults to `brief`; `split` mode, `refine_spec: true`, or a preservation profile forces `complete`. Author each stage once; same-stage edits update only visible browser state through documented deterministic dependencies, without another AI/backend recommendation. Launch/derive/wait mechanics live in [`generate-pptx.md`](../workflows/generate-pptx.md) Step 4; item specs keep `a`–`h`.**Default — continuity-aware whole solution (may override when a scene reset communicates better)**: Within active-profile invariants and before recommending page count or production mechanics, judge whether adjacent explanation beats can remain within one recognizable mental map while a visible state changes. Where that choice lowers cognitive switching and motion has a named communication job, let it shape the solution's narrative spine, page rhythm, visual approach, and enabled notes/narration segmentation, and recommend the existing `proactive_custom_animations: true`. This is one positive signal, not the only reason to enable animation; absent it, retain the existing default or other valid evidence. Topic or wording repetition alone is insufficient. A `Motion suggestion` remains optional advice and never changes the effective outcome.@@ -165,7 +165,7 @@ Record the confirmed visual style and rationale in `design_spec.md` first, inclu### e. Color Scheme Recommendation-**Hard rule**: User-specified colors are truth. Lock supplied HEX, brand colors, or natural-language directives; templates follow inherited-design precedence. Even direct locks fill all six roles (`background`, `secondary_bg`, `primary`, `accent`, `secondary_accent`, `body_text`) in each of the three directions: repeat fixed roles and vary only open ones. Never emit an empty palette. Preserve confirmed/brand semantic roles.+**Hard rule**: User-specified colors are truth. Lock supplied HEX, brand colors, or natural-language directives; templates follow inherited-design precedence. Even direct locks fill all six roles (`background`, `secondary_bg`, `primary`, `accent`, `secondary_accent`, `body_text`) in each of the three directions: repeat fixed roles and vary only open ones. Never emit an empty palette. Preserve confirmed/brand semantic roles. When writing §III, derive the standard `secondary_text` and `divider` neutrals and project them to `spec_lock.md colors`; §V fixes the five deck-wide spacing anchors.**Reference — not a constraint**: WCAG AA body-text contrast is 4.5:1.@@ -549,11 +549,11 @@ required meaning in the visible page and confirmed presenter channel.**Default — visible-state sequence (may override when a new composition is clearer)**: Before freezing the §IX roster and enabled notes/narration boundaries, compare adjacent semantic beats within the active profile's roster/content invariants. When recurring roles, relationships, and spatial orientation form one mental map and the next beat has a meaningful state or focus change, plan neighboring pages as visible states of that scene: preserve recognizable anchors, make the semantic delta legible, and align each enabled notes/narration segment with its supporting visible state. This is a content-and-rhythm strategy, not a page quota. Reset the composition when the mental map changes or continuity adds no clarity. Within the confirmed page count, every state page must carry content and an `Audience move`; the effective motion outcome changes realization, not roster authority.-**Per-block expression**: let the semantic relationship choose the form. Causal explanation, argument, interpretation, and narrative continuity use prose. Truly parallel, ordered, or enumerable items may use bullets / numbers. Never create bullets merely because copy is long or a template exposes a list slot. In `presentation`, distill one assertion and move its explanation into enabled notes rather than turning every sentence into a fragment; when notes are disabled, keep the necessary explanation in the visible page or confirmed presenter channel. Source texture remains a secondary cue: an article / transcript / talk leans prose, while a data sheet or inventory may lean structured labels. Write complete, usable phrasing into §IX; do not leave skeletons for Executor. It is preferred wording unless literal preservation applies; Executor owns faithful expression adaptation under [`executor-base.md`](./executor-base.md) §2.1's content-vs-expression contract.+**Per-block expression**: let the semantic relationship choose the form. Causal explanation, argument, interpretation, and narrative continuity use prose. Truly parallel, ordered, or enumerable items may use bullets / numbers. Never create bullets merely because copy is long or a template exposes a list slot. In `presentation`, distill one assertion and move its explanation into enabled notes rather than turning every sentence into a fragment; when notes are disabled, keep the necessary explanation in the visible page or confirmed presenter channel. Source texture remains a secondary cue: an article / transcript / talk leans prose, while a data sheet or inventory may lean structured labels. At `complete` depth write complete, usable phrasing into §IX; at `brief` depth write each page as a short block list — one bullet per block in the phrasing that fits it — and leave the full page copy to page authoring. Neither is a skeleton: every claim, fact, relationship, and qualifier the page must carry is present. Written wording is preferred wording unless literal preservation applies; Executor owns faithful expression adaptation under [`executor-base.md`](./executor-base.md) §2.1's content-vs-expression contract.This is what makes the axis meaningful: a `presentation` deck and a `text` deck built from the **same source and communication contract** must differ in page grammar, page count recommendation, per-page text volume, visual burden, layout density, rhythm, and enabled notes—not only in font size. Page count stays the user's call; reading mode informs the recommendation when the user has not fixed one. Record it as **Reading Mode** in `design_spec.md §I` (compatibility key `delivery_purpose`, lock key `consumption_mode`). Separately, `communication_intent` / `audience_outcome` determine what the outline must accomplish, while `delivery_context` and `artifact_afterlife` help select the reading mode and still remain independent constraints after selection. The `page_rhythm` leans are a bias, not a quota. Preservation paths keep source wording and structure verbatim: honor reading mode only in styling and enabled notes, never by rephrasing or re-paginating.-> Note: §IX is the complete page brief; Executor retains it with the lock until context invalidation, then reloads both once.+> Note: §IX is the page brief at the confirmed depth; Executor retains it with the lock until context invalidation, then reloads both once.### 6.2 Planning Artifact Content@@ -567,7 +567,7 @@ final Stage 2 `false`, explicit objects-off, or explicit all-motion-off; only thincludes transitions.1. With Generate Step 4's retained complete final-confirmation state, read `${SKILL_DIR}/templates/design_spec_reference.md`.-2. Compose the whole Design Spec in active context before touching the target path. Create `design_spec.md` once from the schema marker through §X; do not copy a scaffold into the project or patch placeholder fields. Record production mechanics in §I, including one effective outcome plus provenance for Speaker Notes, Custom Animations, and Narration Audio. Resolve them from latest explicit user instruction → matching final Stage 2 proactive value → workflow default `enabled` / `disabled` / `disabled`; Narration Audio enabled requires Speaker Notes enabled without rewriting the raw proactive evidence, and a dependency-driven notes outcome records that provenance. In §IX, create the complete ordered roster; each entry carries layout, title, core message, **Audience move**, complete preferred wording, exact mathematical content when applicable, capability recommendations, visualization/image references, sourced `Fact IDs`, and `Data class: scenario` for invented demo data. After Gate 1 plus conditional refine approval, roster ids/count/order and semantic content are authoritative; non-literal wording, block texture, layout, cover/closing composition, capability recommendations, and image/visualization patterns remain References unless promoted, so Executor may adopt, adapt, or decline them without upstream repair while preserving their semantic jobs and all binding constraints.+2. Compose the whole Design Spec in active context before touching the target path. Create `design_spec.md` once from the schema marker through §X; do not copy a scaffold into the project or patch placeholder fields. Record production mechanics in §I, including one effective outcome plus provenance for Speaker Notes, Custom Animations, and Narration Audio. Resolve them from latest explicit user instruction → matching final Stage 2 proactive value → workflow default `enabled` / `disabled` / `disabled`; Narration Audio enabled requires Speaker Notes enabled without rewriting the raw proactive evidence, and a dependency-driven notes outcome records that provenance. In §IX, create the complete ordered roster; each entry carries title, core message, **Audience move**, content at the confirmed depth (complete preferred wording or a short block list), optional layout, exact mathematical content when applicable, capability recommendations, visualization/image references, sourced `Fact IDs`, and `Data class: scenario` for invented demo data. After Gate 1 plus conditional refine approval, roster ids/count/order and semantic content are authoritative (continuous runs may repair the roster within the confirmed range per [`executor-base.md`](./executor-base.md) §2.1); non-literal wording, block texture, layout, cover/closing composition, capability recommendations, and image/visualization patterns remain References unless promoted, so Executor may adopt, adapt, or decline them without upstream repair while preserving their semantic jobs and all binding constraints.3. Compare `design_spec.md` against the final confirmation field by field. Repair every omission or deviation before entering an enabled refine-spec review or authoring `spec_lock.md`.4. If enabled, run [`refine-spec`](../workflows/stages/refine-spec.md) after Gate 1; edit only that Design Spec and create no lock before explicit approval.5. Read `${SKILL_DIR}/templates/spec_lock_reference.md`; create the lock once or resynchronize stale derived state from the approved Design Spec and context. Retain identity/refinements and stable roles/routing; omit unnamed page-local values, do not reopen evidence, and make no new recommendation.diff --git a/skills/ppt-master/scripts/confirm_ui/server.py b/skills/ppt-master/scripts/confirm_ui/server.pyindex 61348ca5..ebb3b142 100644--- a/skills/ppt-master/scripts/confirm_ui/server.py+++ b/skills/ppt-master/scripts/confirm_ui/server.py@@ -105,6 +105,7 @@ _PALETTE_ROLES = ('body_text',)_TYPOGRAPHY_SIZE_ROLES = ('title', 'subtitle', 'annotation')+_DESIGN_SPEC_DEPTH_VALUES = {'brief', 'complete'}_HEX_COLOR_RE = re.compile(r'#?(?:[0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})\Z')# Static option universe served at /api/catalogs (canvas synced live from config).@@ -162,6 +163,13 @@ def _read_json_object(path: Path, retries: int = 2, delay: float = 0.08) -> dictraise last_error+def _read_result_object(path: Path, retries: int = 2, delay: float = 0.08) -> dict:+ """Read result.json and apply the legacy Design Spec depth default."""+ data = _read_json_object(path, retries=retries, delay=delay)+ data.setdefault('design_spec_depth', 'complete')+ return data++def _write_json_atomic(path: Path, data: dict) -> None:"""Write a JSON object with replace semantics so waiters never see a partial file."""path.parent.mkdir(parents=True, exist_ok=True)@@ -1199,7 +1207,7 @@ def _result_stage(result_file: Path) -> Optional[str]:if not result_file.is_file():return Nonetry:- data = _read_json_object(result_file)+ data = _read_result_object(result_file)except (OSError, json.JSONDecodeError, ValueError):return Nonestage = _stage_key(data.get('stage'))@@ -1390,6 +1398,28 @@ def _stage2_production_recommendations_error(or not isinstance(refine_spec.get('value'), bool)):return 'Stage 2 recommendations must include refine_spec.value as a boolean'+ design_spec_depth = recommendations.get('design_spec_depth')+ design_spec_depth_value = (+ design_spec_depth.get('value')+ if isinstance(design_spec_depth, dict)+ else None+ )+ if (+ not isinstance(design_spec_depth_value, str)+ or design_spec_depth_value not in _DESIGN_SPEC_DEPTH_VALUES+ ):+ return (+ 'Stage 2 recommendations must include design_spec_depth.value as '+ '"brief" or "complete"'+ )+ if design_spec_depth_value == 'brief' and (+ generation_mode == 'split' or refine_spec['value']+ ):+ return (+ 'Stage 2 recommendations must set design_spec_depth.value to '+ '"complete" when recommend.generation_mode is "split" or '+ 'refine_spec.value is true'+ )if _uses_ai_images(recommendations):image_ai_path = recommend.get('image_ai_path')if not isinstance(image_ai_path, str) or not image_ai_path.strip():@@ -1407,6 +1437,22 @@ def _stage2_production_result_error(result: dict) -> Optional[str]:return 'final Stage 2 payload must include non-empty generation_mode'if not isinstance(result.get('refine_spec'), bool):return 'final Stage 2 payload must include refine_spec as a boolean'+ design_spec_depth = result.get('design_spec_depth')+ if (+ not isinstance(design_spec_depth, str)+ or design_spec_depth not in _DESIGN_SPEC_DEPTH_VALUES+ ):+ return (+ 'final Stage 2 payload must include design_spec_depth as "brief" '+ 'or "complete"'+ )+ if design_spec_depth == 'brief' and (+ generation_mode == 'split' or result['refine_spec']+ ):+ return (+ 'final Stage 2 payload must set design_spec_depth to "complete" '+ 'when generation_mode is "split" or refine_spec is true'+ )if _uses_ai_images(result):image_ai_path = result.get('image_ai_path')if not isinstance(image_ai_path, str) or not image_ai_path.strip():@@ -1772,7 +1818,7 @@ def _submission_stage_error(if rec_stage_number == 2:try:- previous_result = _read_json_object(confirm_dir / RESULT_NAME)+ previous_result = _read_result_object(confirm_dir / RESULT_NAME)except (OSError, json.JSONDecodeError, ValueError):previous_result = {}language_source = (@@ -2152,7 +2198,7 @@ def _normalize_proactive_execution_result(def _merge_confirmed_choices(data: dict, result_file: Path) -> None:"""Fold already-confirmed choices into later-stage recommendations."""try:- res = _read_json_object(result_file)+ res = _read_result_object(result_file)except (OSError, json.JSONDecodeError, ValueError):returnif _result_stage(result_file) != 'stage1':@@ -2190,7 +2236,7 @@ def _apply_locked_recommendations(previous = {}if carry_previous:try:- previous = _read_json_object(previous_result_file)+ previous = _read_result_object(previous_result_file)except (OSError, json.JSONDecodeError, ValueError):previous = {}previous_locks = previous.get(_LOCKED_RECOMMENDATIONS_KEY)@@ -2804,7 +2850,7 @@ def create_app(previous_result = {}if rec_stage_number >= 2:try:- previous_result = _read_json_object(result_file)+ previous_result = _read_result_object(result_file)except (OSError, json.JSONDecodeError, ValueError):passmain_language = Nonediff --git a/skills/ppt-master/scripts/confirm_ui/static/app.js b/skills/ppt-master/scripts/confirm_ui/static/app.jsindex fe925890..92d64da1 100644--- a/skills/ppt-master/scripts/confirm_ui/static/app.js+++ b/skills/ppt-master/scripts/confirm_ui/static/app.js@@ -64,6 +64,12 @@sec_proactive_execution: "Proactive execution",sec_mode: "Generation mode",sec_refine: "Review the Design Spec first",+ sec_design_spec_depth: "Design Spec depth",+ design_spec_depth_brief: "Brief",+ design_spec_depth_brief_desc: "A short block list per page; no full page copy.",+ design_spec_depth_complete: "Complete",+ design_spec_depth_complete_desc: "Full page briefs with complete wording.",+ design_spec_depth_locked: "Locked to Complete because split mode or Design Spec refinement is enabled.",sec_design_directions: "Coherent design directions",design_directions_hint: "The recommended complete direction is applied first. Choose another or fine-tune the projected fields below; use Restore to return an adjusted direction to its authored bundle.",direction_active: "Applied",@@ -247,6 +253,12 @@sec_proactive_execution: "能動的な実行",sec_mode: "生成モード",sec_refine: "先に設計仕様を確認",+ sec_design_spec_depth: "設計仕様の詳細度",+ design_spec_depth_brief: "簡潔",+ design_spec_depth_brief_desc: "各ページを短いブロック一覧で記し、全文は書きません。",+ design_spec_depth_complete: "完全",+ design_spec_depth_complete_desc: "完全な文言を含む各ページの詳細なブリーフを記載します。",+ design_spec_depth_locked: "分割モードまたは設計仕様のレビューが有効なため、「完全」に固定されています。",sec_design_directions: "統合デザイン方針",design_directions_hint: "おすすめの全体案が最初に適用されています。別案を選ぶか、下の各項目を微調整できます。調整後は「元の案に戻す」で最初の組み合わせを復元できます。",direction_active: "適用中",@@ -430,6 +442,12 @@sec_proactive_execution: "主动执行",sec_mode: "生成模式",sec_refine: "先审核设计规范",+ sec_design_spec_depth: "设计规范深度",+ design_spec_depth_brief: "简要",+ design_spec_depth_brief_desc: "每页只写简短的内容块列表,不写整页文案。",+ design_spec_depth_complete: "完整",+ design_spec_depth_complete_desc: "写入包含完整文案的逐页简报。",+ design_spec_depth_locked: "分段模式或设计规范审核已开启,因此固定为“完整”。",sec_design_directions: "成套设计方向",design_directions_hint: "AI 最倾向的成套方案已默认应用;你可以改选其他方案,或在下方微调各项。调整后可用“恢复原方案”还原整套预设。",direction_active: "已应用",@@ -613,6 +631,12 @@sec_proactive_execution: "主動執行",sec_mode: "生成模式",sec_refine: "先審閱設計規範",+ sec_design_spec_depth: "設計規範深度",+ design_spec_depth_brief: "簡要",+ design_spec_depth_brief_desc: "每頁只寫簡短的內容區塊清單,不寫整頁文案。",+ design_spec_depth_complete: "完整",+ design_spec_depth_complete_desc: "寫入包含完整文案的逐頁簡報。",+ design_spec_depth_locked: "分段模式或設計規範審閱已開啟,因此固定為「完整」。",sec_design_directions: "成套設計方向",design_directions_hint: "AI 最傾向的成套方案已預設套用;你可以改選其他方案,或在下方微調各項。調整後可用「還原原始方案」還原整套預設。",direction_active: "已套用",@@ -1426,6 +1450,7 @@function enumField(parent, list, recommendedId, getVal, setVal, opts2) {list = list || [];opts2 = opts2 || {};+ var disabled = opts2.disabled === true;var grouped = list.length && list[0] && list[0].items;var flat = grouped ? list.reduce(function (a, g) { return a.concat(g.items || []); }, []) : list;var ids = flat.map(function (o) { return o.id; });@@ -1508,7 +1533,13 @@}chip.appendChild(copy);if (!isCustom && o.id === cur) chip.classList.add("selected");+ if (disabled) {+ chip.setAttribute("aria-disabled", "true");+ chip.style.cursor = "not-allowed";+ chip.style.opacity = "0.65";+ }chip.addEventListener("click", function () {+ if (disabled) return;deselect();chip.classList.add("selected");if (!aiCustom) customInput.style.display = "none";@@ -2685,6 +2716,9 @@// Replaced when the final plan's image-production section mounts; image-use// edits call it so the conditional AI path stays synchronized on the page.var refreshImageProduction = function () {};+ // Replaced when the Design Spec depth section mounts; generation/refinement+ // edits call it so the forced-complete coupling stays synchronized.+ var refreshDesignSpecDepth = function () {};// Replaced when the typography section mounts; the canvas section calls it so// the body-size hint tracks the chosen canvas dimensions.var refreshBodySizeHint = function () {};@@ -3830,7 +3864,11 @@setSectionNote(sec, STATE.generation_mode === "split" ? t("mode_split_desc") : t("mode_continuous_desc"));}enumField(sec, CAT.generation_mode, recOrFirst("generation_mode", CAT.generation_mode),- function () { return STATE.generation_mode; }, function (v) { STATE.generation_mode = v; refresh(); });+ function () { return STATE.generation_mode; }, function (v) {+ STATE.generation_mode = v;+ refresh();+ refreshDesignSpecDepth();+ });refresh();host.appendChild(sec);}@@ -3881,11 +3919,57 @@}enumField(sec, opts, STATE.refine_spec ? "on" : "off",function () { return STATE.refine_spec ? "on" : "off"; },- function (v) { STATE.refine_spec = (v === "on"); refresh(); });+ function (v) {+ STATE.refine_spec = (v === "on");+ refresh();+ refreshDesignSpecDepth();+ });refresh();host.appendChild(sec);}+ function designSpecDepthCatalog() {+ if (CAT.design_spec_depth && CAT.design_spec_depth.length) {+ return CAT.design_spec_depth;+ }+ return [+ {+ id: "brief",+ label: t("design_spec_depth_brief"),+ desc: t("design_spec_depth_brief_desc")+ },+ {+ id: "complete",+ label: t("design_spec_depth_complete"),+ desc: t("design_spec_depth_complete_desc")+ }+ ];+ }++ function renderDesignSpecDepth(host) {+ var sec = section("D", "sec_design_spec_depth");+ var body = el("div", "design-spec-depth-body");+ var recommended = REC.design_spec_depth && REC.design_spec_depth.value;+ if (recommended !== "brief" && recommended !== "complete") recommended = "brief";+ sec.appendChild(body);+ refreshDesignSpecDepth = function () {+ var locked = STATE.generation_mode === "split" || STATE.refine_spec;+ if (locked) STATE.design_spec_depth = "complete";+ body.innerHTML = "";+ enumField(+ body,+ designSpecDepthCatalog(),+ locked ? null : recommended,+ function () { return STATE.design_spec_depth; },+ function (value) { STATE.design_spec_depth = value; },+ { disabled: locked }+ );+ setSectionNote(sec, locked ? t("design_spec_depth_locked") : "");+ };+ refreshDesignSpecDepth();+ host.appendChild(sec);+ }+// Two-stage confirmation: communication contract, then complete final plan.var STAGE = 1;@@ -3917,6 +4001,7 @@refreshStylePreview = function () {};refreshImageStrategyPreview = function () {};refreshImageProduction = function () {};+ refreshDesignSpecDepth = function () {};refreshBodySizeHint = function () {};refreshSizeInputs = function () {};DIRECTION_COMPONENT_PAINTERS = [];@@ -3951,6 +4036,7 @@renderProactiveExecution(host);renderMode(host);renderRefine(host);+ renderDesignSpecDepth(host);var refreshDirectionIndicators = function () {window.setTimeout(function () {refreshDesignDirectionState();@@ -4111,6 +4197,11 @@STATE.generation_mode = pick("generation_mode", CAT.generation_mode);STATE.refine_spec = !!((REC.refine_spec && REC.refine_spec.value) || (REC.recommend && REC.recommend.refine_spec));+ var designSpecDepth = REC.design_spec_depth && REC.design_spec_depth.value;+ STATE.design_spec_depth = designSpecDepth === "complete" ? "complete" : "brief";+ if (STATE.generation_mode === "split" || STATE.refine_spec) {+ STATE.design_spec_depth = "complete";+ }}function initState() {diff --git a/skills/ppt-master/scripts/confirm_ui/static/catalogs.json b/skills/ppt-master/scripts/confirm_ui/static/catalogs.jsonindex 3bf01b4e..0331a2a6 100644--- a/skills/ppt-master/scripts/confirm_ui/static/catalogs.json+++ b/skills/ppt-master/scripts/confirm_ui/static/catalogs.json@@ -1505,6 +1505,32 @@"label_ja": "分割モード"}],+ "design_spec_depth": [+ {+ "id": "brief",+ "label": "brief",+ "label_zh": "简要",+ "label_zh_tw": "簡要",+ "label_en": "Brief",+ "label_ja": "簡潔",+ "desc_zh": "每页只写简短的内容块列表,不写整页文案。",+ "desc_zh_tw": "每頁只寫簡短的內容區塊清單,不寫整頁文案。",+ "desc_en": "A short block list per page; no full page copy.",+ "desc_ja": "各ページを短いブロック一覧で記し、全文は書きません。"+ },+ {+ "id": "complete",+ "label": "complete",+ "label_zh": "完整",+ "label_zh_tw": "完整",+ "label_en": "Complete",+ "label_ja": "完全",+ "desc_zh": "写入包含完整文案的逐页简报。",+ "desc_zh_tw": "寫入包含完整文案的逐頁簡報。",+ "desc_en": "Full page briefs with complete wording.",+ "desc_ja": "完全な文言を含む各ページの詳細なブリーフを記載します。"+ }+ ],"delivery_purpose": [{"id": "text",diff --git a/skills/ppt-master/scripts/docs/confirm_ui.md b/skills/ppt-master/scripts/docs/confirm_ui.mdindex 84d650ea..13152476 100644--- a/skills/ppt-master/scripts/docs/confirm_ui.md+++ b/skills/ppt-master/scripts/docs/confirm_ui.md@@ -43,7 +43,8 @@ Interpret the instruction semantically: “confirm here”, “use the chat windkeyword is required. Invoking a chat-question tool by itself does not select thechat branch—the user's instruction does. Both branches preserve the sameStage-1 communication/template decision, installation handoff, and template-aware-final Stage 2.+final Stage 2; the chat branch records the same `design_spec_depth` value in its+confirmation summary.**Chat/delegated Stage-1 listing**: Author the communication recommendationbefore reading the four indexes, then present that recommendation together with@@ -332,7 +333,7 @@ Direction-local custom projections apply to mode, visual style, and generated-im## Catalogs — `static/catalogs.json` (the finite option universe)-The front-end loads `/api/catalogs` (served by the confirm server) and falls back to the static `/static/catalogs.json` if that route is unavailable. `/api/catalogs` returns the static file **with the `canvas` list synced live from `config.py CANVAS_FORMATS`** — the set of formats and their `dim` come from config (single source of truth, zero drift), while four-language labels / use text stay in catalogs.json (a plain fallback label is synthesized for any new id config adds). Keys: `canvas`, `modes`, `visual_styles` (grouped), `icons`, `image_usage`, `image_ai_path`, `generation_mode`, `delivery_purpose`. `simple-icons` is content-driven and has no option. Each catalog entry is `{ "id", "label", "label_zh", "label_zh_tw", "label_en", "label_ja", ... }`; descriptions use `desc_zh` / `desc_zh_tw` / `desc_en` / `desc_ja`, and `visual_styles` groups use `group_zh` / `group_zh_tw` / `group_en` / `group_ja`. The front-end falls back to legacy `label` / `desc` / `group`, so old catalogs still load, but new user-facing catalog text must cover all four languages (zh / zh-TW / en / ja). English labels should mirror canonical reference names (`pyramid`, `swiss-minimal`, `Path A`, `continuous`, etc.); Simplified Chinese, Traditional Chinese, and Japanese labels should be translated for users. Descriptions render inline after the option title, not as a separate selected-option line. `visual_styles` is `[{ "group", "group_zh", "group_zh_tw", "group_en", "group_ja", "items": [...] }]`. For `canvas` you only need to maintain the four-language labels in catalogs.json; the format set and dimensions are authoritative in `config.py CANVAS_FORMATS`.+The front-end loads `/api/catalogs` (served by the confirm server) and falls back to the static `/static/catalogs.json` if that route is unavailable. `/api/catalogs` returns the static file **with the `canvas` list synced live from `config.py CANVAS_FORMATS`** — the set of formats and their `dim` come from config (single source of truth, zero drift), while four-language labels / use text stay in catalogs.json (a plain fallback label is synthesized for any new id config adds). Keys: `canvas`, `modes`, `visual_styles` (grouped), `icons`, `image_usage`, `image_ai_path`, `generation_mode`, `design_spec_depth`, `delivery_purpose`. `simple-icons` is content-driven and has no option. Each catalog entry is `{ "id", "label", "label_zh", "label_zh_tw", "label_en", "label_ja", ... }`; descriptions use `desc_zh` / `desc_zh_tw` / `desc_en` / `desc_ja`, and `visual_styles` groups use `group_zh` / `group_zh_tw` / `group_en` / `group_ja`. The front-end falls back to legacy `label` / `desc` / `group`, so old catalogs still load, but new user-facing catalog text must cover all four languages (zh / zh-TW / en / ja). English labels should mirror canonical reference names (`pyramid`, `swiss-minimal`, `Path A`, `continuous`, etc.); Simplified Chinese, Traditional Chinese, and Japanese labels should be translated for users. Descriptions render inline after the option title, not as a separate selected-option line. `visual_styles` is `[{ "group", "group_zh", "group_zh_tw", "group_en", "group_ja", "items": [...] }]`. For `canvas` you only need to maintain the four-language labels in catalogs.json; the format set and dimensions are authoritative in `config.py CANVAS_FORMATS`.## Round-trip data contract@@ -370,7 +371,7 @@ run remains inactive. An existing `result.json` outside the current `stage1` /| Recommendation file | Declared stage | Page renders | Button | On submit ||---|---|---|---|---|| `recommendations.stage1.json` + `template_options.json` | `"stage1"` | communication contract — content language; audience; open `communication_intent`; audience outcome; core message / primary delivery context + optional secondary use / artifact afterlife / `content_divergence` (all prose fields may be blank); canvas; free-design/template mode and conditional candidate selectors | **Confirm contract & template choice** | writes Stage-1 `result.json` plus `template_selection.json` in one submission; the page stays open and polls while the agent installs/completes the handoff |-| `recommendations.stage2.json` | `"stage2"` | complete deck solution and production — conditional natural-language template application, reading mode, mode, page count, visual direction, color, icons, typography, image usage/rendering, conditional AI acquisition path, proactive notes/custom-animation/narration-audio toggles, generation mode, and Design Spec review toggle | **Confirm final plan** | writes `result.json` `{ stage: "final", status: "confirmed", <all fields> }`, then shuts the page down |+| `recommendations.stage2.json` | `"stage2"` | complete deck solution and production — conditional natural-language template application, reading mode, mode, page count, visual direction, color, icons, typography, image usage/rendering, conditional AI acquisition path, proactive notes/custom-animation/narration-audio toggles, generation mode, Design Spec review toggle, and Design Spec depth | **Confirm final plan** | writes `result.json` `{ stage: "final", status: "confirmed", <all fields> }`, then shuts the page down |In the UI branch, the AI authors Stage 1 without reading template candidates,then launches the combined page. In chat/delegated confirmation it authors the@@ -443,12 +444,17 @@ The common paths — inform / explain / persuade / decide / align / teach / repoAfter Stage 1 is confirmed, create `recommendations.stage2.json` with the complete solution; leave Stage 1 unchanged (the server folds confirmed communication fields back in when serving the page):**Stage-2 production contract**: the server rejects the recommendation file-unless `recommend.generation_mode` and boolean `refine_spec.value` are present;+unless `recommend.generation_mode`, boolean `refine_spec.value`, and+`design_spec_depth.value` as `brief` or `complete` are present;`recommend.image_ai_path` is additionally required when `image_usage` includes`ai`. Final submission must retain the corresponding direct values-(`generation_mode`, boolean `refine_spec`, and conditional `image_ai_path`) or-confirmation is rejected. Formula realization is Executor-owned and is not a-Stage-2 choice. Legacy recommendation/result objects may contain+(`generation_mode`, boolean `refine_spec`, `design_spec_depth`, and conditional+`image_ai_path`) or confirmation is rejected. `design_spec_depth: brief` is+rejected when `generation_mode` is `split` or `refine_spec` is `true`; those+conditions require `complete`. A legacy `result.json` without the field is read+as `complete`, while a Stage-2 recommendation without it is invalid. Formula+realization is Executor-owned and is not a Stage-2 choice. Legacy+recommendation/result objects may contain`formula_policy`; the server tolerates the extra field but does not render orpersist it in a new receipt.@@ -471,6 +477,7 @@ persist it in a new receipt."proactive_custom_animations": { "value": false },"proactive_narration_audio": { "value": false },"refine_spec": { "value": false },+ "design_spec_depth": { "value": "brief" },"design_directions": {"selected": 1,"candidates": [@@ -537,7 +544,7 @@ Template-mode-only Stage-2 fragment:- **Combined style preview** — a compact live "overall impression" strip sits just above the color section and is **sticky**: it pins under the topbar so it stays visible while the user scrolls through the color / icon / typography sections, keeping the picking controls and their combined effect on screen together. It applies the currently selected color palette **and** typography (heading sample in `primary` over `background`, body sample in `body_text`, an `accent` bar, a `secondary_bg` chip) and repaints on every color / HEX-override / font / `body_size` change. It does not replace the per-candidate swatches or font samples (those stay for picking); it is deliberately an abstract style chip, **not** a slide-layout preview — page layout preview remains the live-preview server's job (Step 6). No schema field; it derives entirely from the existing color + typography selections.- **Generated-image direction** appears only for current `image_usage: ai`, but all three custom project candidates already exist in `design_directions` before that toggle. Turning AI on reveals those candidates immediately without a backend rerun, followed by the 20 fixed system styles. Selecting a project candidate expands its behavior editor in that card; a fixed preset submits its id, while a project candidate submits `rendering: "custom"` + edited non-empty `behavior`. Turning AI off omits `image_strategy` from the final result without deleting the authored recommendation candidates. Catalog-based custom behavior names exact ids for optional `image_rendering_references`; a novel behavior has none. The left preview follows selection. No image palette is written; deck colors remain authoritative, and legacy `image_strategy.palette` is ignored. Illustrated icons and decorative lettering are downstream AI carrier decisions; neither adds a Confirm UI field or `result.json` key.- **`design_directions`** is the canonical Stage-2 starting set: exactly three top-down, project-fit bundles with stable ids, localized copy, custom mode/style/rendering, icons, complete language-aware typography, and HEX `background`, `secondary_bg`, `primary`, `accent`, `secondary_accent`, `body_text`. The `selected` card carries the persistent Recommended marker and is applied first. A custom direction card uses its localized style-summary note—or the required behavior fallback—instead of requesting a preset-style preview. Newly authored notes may borrow localized catalog display labels where useful or use concise natural language freely; they never force an approximate label or expose internal catalog ids. Clicking an inactive card applies every field it owns; projected custom fields can then be edited in place and all lower controls may diverge. The active card shows an adjusted state and exposes an explicit restore action for its immutable authored bundle. `result.json` stores the edited current components, never a direction id.-- `recommend.generation_mode` and `refine_spec` mirror [`generate-pptx`](../../workflows/generate-pptx.md) Step 4. `split` / `true` are explicit opt-ins. Refinement adds no UI stage: after Gate 1 it stops before the lock for unrestricted chat revision until approval.+- `recommend.generation_mode`, `refine_spec`, and `design_spec_depth` are Stage-2 production fields. `design_spec_depth.value` is exactly `brief` or `complete`: `brief` records each page as a short block list without full page copy, while `complete` records full page briefs. `split` generation or enabled refinement locks the field to `complete` in the UI, and the server rejects a recommendation or final `brief` value under either condition.- `content_divergence` is a **free-text** Stage-1 source-treatment field. Blank means a balanced default; facts stay sourced at every level. Strategist consumes it while authoring §IX and records it in `design_spec.md §I`; it is not written to `spec_lock.md`. Beautify sends `{ "value": "keep source wording and page structure verbatim", "locked": true }`, so the UI displays it read-only and the server restores it on every staged submit. Edit Native PPTX uses its source-backed round-trip plan instead of this confirmation flow and does not surface the field.- `lang` is the soft UI-language default (`zh` / `zh-TW` / `en` / `ja`); the persisted user choice wins. It never sets `primary_language`.@@ -572,6 +579,7 @@ Template-mode-only Stage-2 fragment:"proactive_narration_audio": false,"generation_mode": "continuous","refine_spec": false,+ "design_spec_depth": "brief","stage": "final","status": "confirmed","confirmed_at": "2026-06-15T11:44:44"@@ -594,6 +602,8 @@ named catalog sources. These lists have no fixed item limit. One item may carrythe complete preset behavior unchanged; with several, each owns a distinctexecutable contribution. Genuinely novel custom behavior has no reference list.The Stage-1 intermediate write retains the communication contract for Stage 2.+Legacy final results without `design_spec_depth` resolve to `complete` when read+by the server.**Final-result consumption contract.** A final result is the user-confirmed input contract for the Strategist's Design Spec, not another recommendation input. After the final wait, Generate Step 4 reads the complete final object exactly once and retains it while Strategist writes and audits `design_spec.md` against every explicitly present field. Normal lock authoring and downstream execution do not reopen `result.json`; the completed Design Spec is the durable authority. Only after that audit passes does Strategist author `spec_lock.md` from the Design Spec plus current execution context, selecting stable anchors and routing rather than copying every field or enumerating every legal color/font. Every value must be consumed at the semantic type owned by [`strategist.md`](../../references/strategist.md) §1 and its field owner: do not omit or substitute it, and do not silently strengthen or weaken its type. If a confirmed requirement cannot be honored, the owning workflow reports or pauses under failure recovery; it never deletes the requirement to keep the pipeline moving.diff --git a/skills/ppt-master/scripts/prompt_audit_manifest.json b/skills/ppt-master/scripts/prompt_audit_manifest.jsonindex a94769b7..99d17594 100644--- a/skills/ppt-master/scripts/prompt_audit_manifest.json+++ b/skills/ppt-master/scripts/prompt_audit_manifest.json@@ -37,7 +37,7 @@"skills/ppt-master/references/strategist.md": 18000,"skills/ppt-master/references/strategist-image.md": 3250,"skills/ppt-master/references/strategist-template.md": 3000,- "skills/ppt-master/templates/design_spec_reference.md": 3750,+ "skills/ppt-master/templates/design_spec_reference.md": 4000,"skills/ppt-master/templates/spec_lock_reference.md": 2750,"skills/ppt-master/templates/charts/chart-vocabulary.md": 1250,"skills/ppt-master/templates/tables/table-vocabulary.md": 500,diff --git a/skills/ppt-master/scripts/tests/test_confirm_ui_design_spec_depth.py b/skills/ppt-master/scripts/tests/test_confirm_ui_design_spec_depth.pynew file mode 100644index 00000000..c90d2de0--- /dev/null+++ b/skills/ppt-master/scripts/tests/test_confirm_ui_design_spec_depth.py@@ -0,0 +1,105 @@+#!/usr/bin/env python3+"""Focused tests for Confirm UI Design Spec depth validation."""++from __future__ import annotations++import json+import sys+import tempfile+import unittest+from pathlib import Path+++SCRIPTS_DIR = Path(__file__).resolve().parents[1]+if str(SCRIPTS_DIR) not in sys.path:+ sys.path.insert(0, str(SCRIPTS_DIR))++from confirm_ui import server # noqa: E402+++def _recommendations(+ depth: object = 'brief',+ *,+ generation_mode: str = 'continuous',+ refine_spec: bool = False,+) -> dict:+ data = {+ 'recommend': {'generation_mode': generation_mode},+ 'refine_spec': {'value': refine_spec},+ }+ if depth is not None:+ data['design_spec_depth'] = {'value': depth}+ return data+++def _result(+ *,+ generation_mode: str = 'continuous',+ refine_spec: bool = False,+ depth: str = 'brief',+) -> dict:+ return {+ 'generation_mode': generation_mode,+ 'refine_spec': refine_spec,+ 'design_spec_depth': depth,+ }+++class ConfirmUiDesignSpecDepthTests(unittest.TestCase):+ def test_missing_recommendation_field_is_rejected(self) -> None:+ error = server._stage2_production_recommendations_error(+ _recommendations(None)+ )++ self.assertIn('design_spec_depth.value', error or '')++ def test_invalid_recommendation_value_is_rejected(self) -> None:+ error = server._stage2_production_recommendations_error(+ _recommendations(['brief'])+ )++ self.assertIn('"brief" or "complete"', error or '')++ def test_brief_is_accepted_without_coupling_conditions(self) -> None:+ self.assertIsNone(+ server._stage2_production_recommendations_error(_recommendations())+ )+ self.assertIsNone(server._stage2_production_result_error(_result()))++ def test_split_mode_rejects_brief(self) -> None:+ recommendation_error = server._stage2_production_recommendations_error(+ _recommendations(generation_mode='split')+ )+ error = server._stage2_production_result_error(+ _result(generation_mode='split')+ )++ self.assertIn('design_spec_depth.value to "complete"', recommendation_error or '')+ self.assertIn('design_spec_depth to "complete"', error or '')++ def test_refinement_rejects_brief(self) -> None:+ recommendation_error = server._stage2_production_recommendations_error(+ _recommendations(refine_spec=True)+ )+ error = server._stage2_production_result_error(+ _result(refine_spec=True)+ )++ self.assertIn('design_spec_depth.value to "complete"', recommendation_error or '')+ self.assertIn('design_spec_depth to "complete"', error or '')++ def test_legacy_result_defaults_to_complete(self) -> None:+ with tempfile.TemporaryDirectory() as temp_dir:+ result_path = Path(temp_dir) / 'result.json'+ result_path.write_text(+ json.dumps({'stage': 'final', 'status': 'confirmed'}),+ encoding='utf-8',+ )++ result = server._read_result_object(result_path)++ self.assertEqual(result['design_spec_depth'], 'complete')+++if __name__ == '__main__':+ unittest.main()diff --git a/skills/ppt-master/templates/design_spec_reference.md b/skills/ppt-master/templates/design_spec_reference.mdindex 0cd819a2..a78aac52 100644--- a/skills/ppt-master/templates/design_spec_reference.md+++ b/skills/ppt-master/templates/design_spec_reference.md@@ -8,6 +8,8 @@ Strategist reads the complete final confirmation once, writes this artifact fromAfter final confirmation, compose the entire document in active context from the retained final state, source analysis, and project context. Then create `<project_path>/design_spec.md` once, from the first line through §X.+**Depth follows the confirmed `design_spec_depth`** — `brief` (default) or `complete`; both keep every required heading and every machine-read field. `brief` serves a continuous run whose author also draws the pages — §I records production mechanics without restating Stage-1 prose, §VI may leave the scenario column empty, §IX `Content` is a short block list — one bullet per block, each in the phrasing that fits it (a real sentence for prose, `·`-joined parallel fragments, `/`-joined labels) — never full page copy, and `Layout` is one optional line. `complete` writes full wording and layout prose; split mode, `refine_spec: true`, and preservation profiles force it.+**Mandatory — new-project write**: The first non-empty line is exactly `<!-- ppt-master-schema: design-spec/v1 -->`, followed by `# <Project Name> - Design Spec`. Write every required section with final values and the complete page roster; include conditional §VII only when a real catalog reference is selected. Do not create a placeholder-bearing project file, copy example rows, or patch a scaffold field by field.`project_manager.py scaffold-spec` remains an optional manual convenience and overwrite-safe troubleshooting tool. It is not part of normal Generate authoring. Resume and refine paths edit an existing completed Design Spec rather than replacing it with a scaffold.@@ -88,6 +90,8 @@ Use these exact subsections and field shapes:| Accent | <HEX> | <semantic use> || Secondary accent | <HEX> | <semantic use> || Body text | <HEX> | <semantic use> |+| Secondary text | <HEX> | <captions, annotations, footnotes> |+| Divider | <HEX> | <rules, borders, hairlines> |## IV. Typography System@@ -118,7 +122,8 @@ Use these exact subsections and field shapes:- **Hierarchy direction**: <how attention should move across a typical page>- **Composition tendency**: <non-binding macro direction; no coordinates or authoring method>- **Cross-page continuity**: <what may recur or vary across the roster>-- **Spacing posture**: <dense, open, or variable behavior by page rhythm; no fixed gaps>+- **Spacing posture**: <dense, open, or variable by page rhythm>+- **Spacing anchors**: <five deck-wide px values — page margin, block gap, column gutter, corner radius, body leading — kept stable across pages like the color and type anchors>## VI. Icon Usage Specification@@ -129,7 +134,7 @@ Use these exact subsections and field shapes:| --- | --- |```-Preserve Title/Body characters and resolved stacks; omit blank Typography upgrade and never place it in a stack. For each justified recurring family override, add the role to Font Plan plus `- **<Role> stack**: <complete ordered stack>`. Possible roles are `Annotation`, `Footer`, `Footnote`, `Data`, `Emphasis`, `Quote`, and `Code`; add only recurring, intentional differences. Add non-locked `Role rationale` only for an extra family. Do not collapse distinct Title/Body stacks or discard a declared optional role. Each Font Size Hierarchy value is a role anchor: Executor may vary one occurrence `±2px`; a short non-structural Hero/Display size may stay unlisted only while the same value is planned at most twice, and its third occurrence needs a named row. Add every recurring palette role and typography-size anchor established by the plan; do not enumerate one-off paint or font-family garnish. For confirmed custom directions, add the applicable `Mode References`, `Mode Behavior`, `Visual Style References`, and `Visual Style Behavior` lines under Theme Style. Include `Stroke Width` under §VI only for a stroke library. `simple-icons` may accompany the one primary bundled library and is recorded only when actual content requires real brand marks; it is never a separate confirmation choice. The icon table records the synced SVG pool and broad semantic scenarios, not page placement. User-provided, template-carried, imported, custom, and other prepared SVGs under the project `icons/` directory remain usable without being forced into that bundled selection. Leave the §VI table empty when no bundled or brand SVG icons are prepared. Illustrated icons are AI image resources: their production sheet and placed slice rows belong in §VIII, and only placed slices project to `spec_lock.md images`.+Preserve Title/Body characters and resolved stacks; omit blank Typography upgrade and never place it in a stack. For each justified recurring family override, add the role to Font Plan plus `- **<Role> stack**: <complete ordered stack>`. Possible roles are `Annotation`, `Footer`, `Footnote`, `Data`, `Emphasis`, `Quote`, and `Code`; add only recurring, intentional differences. Add non-locked `Role rationale` only for an extra family. Do not collapse distinct Title/Body stacks or discard a declared optional role. Each Font Size Hierarchy value is a role anchor: Executor may vary one occurrence `±2px`; a short non-structural Hero/Display size may stay unlisted only while the same value is planned at most twice, and its third occurrence needs a named row. Add every recurring palette role and typography-size anchor established by the plan; do not enumerate one-off paint or font-family garnish. For confirmed custom directions, add the applicable `Mode References`, `Mode Behavior`, `Visual Style References`, and `Visual Style Behavior` lines under Theme Style. Include `Stroke Width` under §VI only for a stroke library. `simple-icons` may accompany the one primary bundled library and is recorded only when actual content requires real brand marks; it is never a separate confirmation choice. The icon table records the synced SVG pool and, at `complete` depth, broad semantic scenarios — never page placement. User-provided, template-carried, imported, custom, and other prepared SVGs under the project `icons/` directory remain usable without being forced into that bundled selection. Leave the §VI table empty when no bundled or brand SVG icons are prepared. Illustrated icons are AI image resources: their production sheet and placed slice rows belong in §VIII, and only placed slices project to `spec_lock.md images`.When §VIII contains any `Acquire Via: ai` row, add this subsection under §III and preserve the complete confirmed AI direction:@@ -180,7 +185,7 @@ Put native paint/overlay intent in §IX `Layout` plus `Images` for imagery—not### 2.4 Complete page roster and notes-Write one ordered Slide block per page. Slide count and order must equal §I `Page Count`; `Content` is a complete page brief, not a skeleton.+Write one ordered Slide block per page. Slide count and order must equal §I `Page Count`; `Content` is a complete page brief at `complete` depth and a short block list at `brief` depth — neither is a skeleton.```markdown## IX. Content Outline@@ -190,10 +195,10 @@ Write one ordered Slide block per page. Slide count and order must equal §I `Pa#### Slide 01 - <page name>- **Audience move**: <audience state before → after>-- **Layout**: <non-binding macro composition, hierarchy, and visual focus; include the chosen prototype when template-active>+- **Layout**: <non-binding macro composition, hierarchy, and visual focus; chosen prototype when template-active; optional at brief depth>- **Title**: <preferred page title>- **Core message**: <one governing assertion>-- **Content**: <complete intended on-slide content and hierarchy>+- **Content**: <complete content at complete depth; short block list at brief depth>- **Mathematical content**: <exact expression as a delimiter-free LaTeX body; omit when none>## X. Speaker Notes Requirementsdiff --git a/skills/ppt-master/templates/spec_lock_reference.md b/skills/ppt-master/templates/spec_lock_reference.mdindex 087ae95c..5df95d46 100644--- a/skills/ppt-master/templates/spec_lock_reference.md+++ b/skills/ppt-master/templates/spec_lock_reference.md@@ -22,7 +22,7 @@ After Generate Step 4 Gate 1, read the completed Design Spec and current page/re| `communication` | `primary_language`, `audience`, `objective`, `core_message` | New lock: canonical BCP-47; old lock may omit it. Reject `und` and Chinese without script/region. `objective` merges intent/outcome; `consumption_mode` is optional off PPT || `mode` | `mode` | Preset or `custom` || `visual_style` | `visual_style` | Preset or `custom` |-| `colors` | Stable semantic color roles | Core identity and recurring roles only; contextual SVG paints need no row; `image_rendering` appears only for AI images |+| `colors` | Stable semantic color roles | Core identity and recurring roles only, including the standard `secondary_text` and `divider` neutrals; contextual SVG paints need no row; `image_rendering` appears only for AI images || `typography` | `font_family`, `body`, `title` | Core family/size anchors; new locks also write explicit `title_family` and `body_family`; size anchors are unitless px numbers || `icons` | `library`, `inventory` | `library` is the Strategist's primary bundled style choice or `none`; content-driven `simple-icons/*` may be prepared alone or accompany it; `inventory` indexes the curated synced SVG pool rather than page usage or all usable project-local icons; `stroke_width` is conditional || `page_rhythm` | One `P<NN>` row per page | Values: `anchor`, `dense`, `breathing` |diff --git a/skills/ppt-master/workflows/generate-pptx.md b/skills/ppt-master/workflows/generate-pptx.mdindex 04b7adf1..7298a20b 100644--- a/skills/ppt-master/workflows/generate-pptx.md+++ b/skills/ppt-master/workflows/generate-pptx.md@@ -303,7 +303,7 @@ no image rows while retaining recommendation-only rendering candidates. Only anproject-local template state loads the template module, and only after Stage 1is confirmed; a bare template/style name does not.-> ⚠️ **Mandatory artifact gates**: after final confirmation, author complete `design_spec.md` from `${SKILL_DIR}/templates/design_spec_reference.md`. After Gate 1 and any refinement approval, author `spec_lock.md` from `${SKILL_DIR}/templates/spec_lock_reference.md` plus approved Design Spec/context. Author each new artifact once without placeholders or `scaffold-*` (manual-only). Schema validity does not prove semantic fidelity.+> ⚠️ **Mandatory artifact gates**: after final confirmation, author `design_spec.md` at the confirmed `design_spec_depth` from `${SKILL_DIR}/templates/design_spec_reference.md`. After Gate 1 and any refinement approval, author `spec_lock.md` from `${SKILL_DIR}/templates/spec_lock_reference.md` plus approved Design Spec/context. Author each new artifact once without placeholders or `scaffold-*` (manual-only). Schema validity does not prove semantic fidelity.**Artifact ownership**: fact-channel and source/derived artifact boundaries are defined in [`references/artifact-ownership.md`](../references/artifact-ownership.md). This Step uses those ownership rules; it does not redefine them.@@ -347,7 +347,7 @@ Stage-2 summary without fabricating UI results. Silence confirms nothing.| `confirm_ui/template_options.json` | Candidate schema/language plus supplied exact roots; library entries remain server-owned index data | Stage-1 submission writes user-owned `template_selection.json` with `phase: template`, `status: confirmed` || `confirm_ui/recommendations.stage1.json` | Communication contract, `content_divergence`, and canvas only; no template-derived recommendation | The same submission writes `result.json` with `status: stage1-confirmed` || `confirm_ui/template_handoff.json` | Only through `--complete-template-selection`, after the Stage-1 selection and free-design closure or successful installation | `status: ready`, bound to the current selection hash; prerequisite for Stage 2 |-| `confirm_ui/recommendations.stage2.json` | `stage: stage2`; complete deck solution plus conditional AI path, generation mode, refine-spec, proactive speaker notes, custom animations, and narration audio | `stage: final`, `status: confirmed` |+| `confirm_ui/recommendations.stage2.json` | `stage: stage2`; complete deck solution plus conditional AI path, generation mode, refine-spec, design-spec depth, proactive speaker notes, custom animations, and narration audio | `stage: final`, `status: confirmed` |If the user rejects the current recommendation before confirming it, regenerate by overwriting that same stage file and have the page refresh; do not create revision-suffixed files. This never authorizes one stage file to carry another stage's payload.@@ -602,7 +602,7 @@ Read ${SKILL_DIR}/references/executor-base.md # REQUIRED: flat/shared execut**Scheduled lock re-read (Default Generate only)**: when another page follows, re-read `spec_lock.md` once after P05/P10/P15/… per [`executor-base.md`](../references/executor-base.md) §2.1.-**Exact page roster**: render `design_spec.md §IX` one-for-one, in order. Any add/drop/merge/split/reorder requires Spec repair/refinement first.+**Exact page roster**: render `design_spec.md §IX` one-for-one, in order. Any add/drop/merge/split/reorder requires Spec repair first; a continuous run may repair within the confirmed range per [`executor-base.md`](../references/executor-base.md) §2.1.**Page content**: §IX is preferred wording and semantic authority. Use it when it works; adapt it when presentation benefits while preserving intent, facts, and explicit literal requirements. Read sources only to verify requested evidence; return incomplete blocks to Step 4 instead of enriching them during execution.