Skip to content

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

refactor(template): slim design_spec.md to personality-only skeleton

hugohe3f5ff57858114
diff --git a/skills/ppt-master/references/template-designer.md b/skills/ppt-master/references/template-designer.md
index 4ba35a6b..d2dc0f9e 100644
--- a/skills/ppt-master/references/template-designer.md
+++ b/skills/ppt-master/references/template-designer.md
@@ -86,7 +86,7 @@ Extension page types beyond the canonical four (transition / appendix / disclaim
- Cluster slides from `manifest.json` by `pageType` + visual structure (column count, hero-image vs. icon-grid vs. quote, etc.)
- One SVG per cluster — do **not** emit a variant for a cluster represented by a single source slide unless that slide is structurally distinct from existing variants
- Cap at 8 content variants per template; collapse near-duplicates into the closest existing variant
-- Record every emitted page in `design_spec.md §VI` and in the `pages` field of the `layouts_index.json` entry (auto-collected by `register_template.py`)
+- Record every emitted page in `design_spec.md §V Page Roster` and in the `pages` field of the `layouts_index.json` entry (auto-collected by `register_template.py`)
> Variants reuse the parent type's placeholder set — see §4 (Placeholder Reference) below.
@@ -96,23 +96,77 @@ Extension page types beyond the canonical four (transition / appendix / disclaim
### 1. Must Generate design_spec.md
-When creating a global template, a `design_spec.md` must be generated, containing:
+**Scope rule — personality only.** A template `design_spec.md` describes **what makes this template recognizable**: brand colors, signature decorative motifs, page-by-page visual character, bundled assets. It does **not** restate generic constraints — those live in the canonical references and are already loaded by every downstream role:
+
+- SVG technical constraints, PPT compatibility rules → [`shared-standards.md`](shared-standards.md)
+- Generic layout pattern library, spacing bands, font-size ratio bands → [`templates/design_spec_reference.md`](../templates/design_spec_reference.md) (read by Strategist when authoring the **project** design_spec)
+- Canonical placeholder vocabulary → §4 below
+- Content methodology (pyramid / SCQA / MECE) → [`strategist.md`](strategist.md)
+
+Re-declaring any of these in a template `design_spec.md` is noise — Strategist already has them in context, and duplication forces every relaxation to sweep N templates instead of one source. **If a rule is generic, omit it. If this template breaks a generic rule, write only the deviation.**
+
+**Required skeleton:**
```markdown
-# [Template Name] - Design Specification
-
-## I. Template Overview (name, use cases, design tone)
-## II. Canvas Specification (16:9, 1280x720, viewBox)
-## III. Color Scheme (primary, secondary, accent HEX values)
-## IV. Typography System (font stack, font size hierarchy)
-## V. Page Structure (common layout, decorative design)
-## VI. Page Roster (one row per emitted SVG, with replication mode and cluster source)
-## VII. Layout Modes (recommended)
-## VIII. Spacing Specification
-## IX. SVG Technical Constraints
-## X. Placeholder Specification
+---
+template_id: <id>
+category: brand | general | scenario | government | special
+summary: <one-line tone & use case>
+keywords: [tag1, tag2, tag3]
+primary_color: "#......"
+canvas_format: ppt169
+replication_mode: standard | fidelity
+# Optional — only when this template overrides canonical placeholder vocabulary:
+# placeholders:
+# 01_cover: ["{{TITLE}}", "{{SUBTITLE}}", "{{BRAND_LOGO}}"]
+# 03_content: ["{{KEY_MESSAGE}}", "{{CONTENT_AREA}}"]
+---
+
+# [Template Name] — Design Specification
+
+## I. Template Overview
+- Use cases, design tone, theme mode (light / dark / mixed)
+- One paragraph: what visually identifies this template at a glance
+
+## II. Color Scheme
+- HEX values with role labels (primary / accent / background / text / etc.)
+- Brand-specific application rules when present (e.g. "KPI cards rotate blue→green→red→yellow")
+
+## III. Typography (omit when using the default `Arial, "Microsoft YaHei", sans-serif` stack)
+- Per-role font stacks ONLY when the template intentionally diverges (display serif title, brand typeface, etc.)
+- Font-install or embedding requirement when a non-preinstalled font leads any stack
+- Body baseline px (informational; `spec_lock.md` owns the actual values per project)
+
+## IV. Signature Design Elements
+- Decorative motifs that ARE this template — top bar, gradient underline, logo treatment, brand emblem placement
+- Optional XML snippet for any reusable component unique to this template
+
+## V. Page Roster
+One row per emitted SVG describing what this template's version of cover / chapter / content / ending looks like (background treatment, decorative anchors, layout rhythm). For `fidelity` mode, also note the cluster source and visual differentiator. Roster entries must match the actual SVG files on disk.
+
+## VI. Assets (omit when none)
+Logos, cover backgrounds, brand textures bundled with the template package — file name, dimensions, intended usage.
+
+## VII. Placeholder Overrides (omit when none)
+Reference the `placeholders:` frontmatter declaration and explain the rationale (e.g. "consulting decks lead with `{{KEY_MESSAGE}}` instead of `{{PAGE_TITLE}}`").
```
+Sections to **omit** from template `design_spec.md` (sourced elsewhere — listing them here is noise):
+
+| Don't write | Source |
+|---|---|
+| SVG technical constraints / Mandatory rules / Prohibited elements | `shared-standards.md` §1 |
+| PPT compatibility rules (`<g opacity>`, inline-styles-only, etc.) | `shared-standards.md` |
+| Generic layout pattern library (centered card / 三栏 / timeline / …) | `design_spec_reference.md` §V |
+| Generic spacing bands (margin 40-60px, card gap 20-32px, etc.) | `design_spec_reference.md` §V |
+| Generic font-size hierarchy (cover 2.5-5x body, page title 1.5-2x, …) | `design_spec_reference.md` §IV |
+| Canonical placeholder table (`{{TITLE}}`, `{{PAGE_NUM}}`, …) | §4 below |
+| Content methodology (pyramid / SCQA / MECE / 金字塔) | `strategist.md` |
+| "Usage Instructions" boilerplate (copy template / select page / …) | `create-template.md` |
+| Created Date / Page Count rows | not a library-level field |
+
+When rewriting an existing template that contains the omitted sections, delete them — do not leave a "see XXX" pointer behind. The pointer is what this scope rule replaces.
+
### 2. Inherit Design Specification
Templates must strictly follow the finalized template brief and the generated `design_spec.md`:
@@ -287,7 +341,7 @@ templates/layouts/
- [x] Read `references/template-designer.md`
- [x] Replication mode confirmed: `standard` | `fidelity`
-- [x] Every page listed in `design_spec.md §VI` saved to `templates/layouts/<template_name>/`
+- [x] Every page listed in `design_spec.md §V Page Roster` saved to `templates/layouts/<template_name>/`
- [x] Variant naming follows the letter-suffix convention; variants reuse parent placeholder contract
- [x] Templates follow design spec (colors, fonts, layout)
- [x] Placeholder markers are clear and standardized
diff --git a/skills/ppt-master/scripts/register_template.py b/skills/ppt-master/scripts/register_template.py
index 57ddc736..eef02fca 100644
--- a/skills/ppt-master/scripts/register_template.py
+++ b/skills/ppt-master/scripts/register_template.py
@@ -2,7 +2,7 @@
"""Register a layout template into the global template index.
Reads ``templates/layouts/<template_id>/design_spec.md`` (preferring its YAML
-frontmatter when present, falling back to the §I / §III table values) and
+frontmatter when present, falling back to prose section values) and
synchronizes two derived indexes:
- ``templates/layouts/layouts_index.json`` — slim machine-readable map
@@ -136,9 +136,9 @@ def _find_first_color(section: str) -> str | None:
def _extract_primary_color(body: str) -> str | None:
- """Pull the first hex color out of the §III Color Scheme section."""
+ """Pull the first hex color out of the Color Scheme section (any roman index)."""
section_match = re.search(
- r"^##\s+III\.\s+Color Scheme\b.*?(?=^##\s+|\Z)",
+ r"^##\s+[IVX]+\.\s+Color Scheme\b.*?(?=^##\s+|\Z)",
body,
re.MULTILINE | re.DOTALL,
)
diff --git a/skills/ppt-master/scripts/svg_quality_checker.py b/skills/ppt-master/scripts/svg_quality_checker.py
index d766e131..1cf30f85 100644
--- a/skills/ppt-master/scripts/svg_quality_checker.py
+++ b/skills/ppt-master/scripts/svg_quality_checker.py
@@ -852,17 +852,17 @@ class SVGQualityChecker:
self._template_issues.append((
'error',
'roster_orphan',
- f"{page}.svg exists on disk but is not listed in design_spec.md §VI",
+ f"{page}.svg exists on disk but is not listed in design_spec.md Page Roster",
))
for page in missing:
self._template_issues.append((
'error',
'roster_missing',
- f"design_spec.md §VI lists {page} but {page}.svg is missing on disk",
+ f"design_spec.md Page Roster lists {page} but {page}.svg is missing on disk",
))
elif spec_path.exists():
- # design_spec.md is present but §VI parser found nothing — surface
- # as a warning. Legacy specs may not have an explicit roster table.
+ # design_spec.md is present but the roster parser found nothing —
+ # surface as a warning. Legacy specs may lack an explicit roster.
self._template_issues.append((
'warning',
'roster_unknown',
@@ -957,26 +957,27 @@ class SVGQualityChecker:
def _extract_spec_roster(spec_text: str) -> List[str]:
"""Best-effort: extract the page roster from design_spec.md.
- Existing templates do not use a uniform section title — some declare a
- formal "§VI. Page Roster" table, others bury the filenames under a
- prose "§VII. Page Types" section as ``### N. Cover Page (01_cover.svg)``.
- We try a focused §VI scan first, then fall back to scanning the whole
- document for any backtick-wrapped ``<stem>.svg`` reference.
+ Templates do not share a uniform section index for the roster — the
+ personality-only skeleton puts it at §V "Page Roster"; legacy specs use
+ §VI "Page Roster" or bury filenames under §VII "Page Types" as
+ ``### N. Cover Page (01_cover.svg)``. We match by title (any roman
+ index), then fall back to scanning the whole document for any
+ backtick-wrapped ``<stem>.svg`` reference.
Returns the deduplicated stem list in document order. Empty result
means we can't determine the roster confidently — caller should treat
that as "skip orphan/missing checks", not as "no pages declared".
"""
- # Pass 1: explicit §VI section.
+ # Pass 1: explicit roster section, any roman numeral.
section = re.search(
- r"^##\s+VI\.\s+(?:Page Roster|Page Structure|Pages)\b.*?(?=^##\s+|\Z)",
+ r"^##\s+[IVX]+\.\s+(?:Page Roster|Page Structure|Pages|Page Types)\b.*?(?=^##\s+|\Z)",
spec_text,
re.MULTILINE | re.DOTALL | re.IGNORECASE,
)
scope = section.group(0) if section else None
# Pass 2: full document. We *only* trust this scan when the explicit
- # §VI scan came up empty (no `<stem>.svg` references inside it) —
+ # roster scan came up empty (no `<stem>.svg` references inside it) —
# otherwise the explicit section's deliberate roster wins over loose
# mentions elsewhere.
if scope and re.search(r"[`\(][0-9A-Za-z_]+\.svg[`\)]", scope):
@@ -1241,7 +1242,7 @@ def print_usage() -> None:
print(" --format <ppt169|ppt43|...> Expected canvas format")
print(" --template-mode Validate a templates/layouts/<id> directory:")
print(" glob *.svg directly, skip spec_lock checks,")
- print(" enforce roster ↔ design_spec.md §VI consistency,")
+ print(" enforce roster ↔ design_spec.md Page Roster consistency,")
print(" and emit advisory placeholder-convention warnings.")
diff --git a/skills/ppt-master/workflows/create-template.md b/skills/ppt-master/workflows/create-template.md
index bdc930ba..80907def 100644
--- a/skills/ppt-master/workflows/create-template.md
+++ b/skills/ppt-master/workflows/create-template.md
@@ -161,7 +161,7 @@ The role should use the import output to anchor objective facts such as theme co
**Expected outputs from this step** (full spec → [template-designer.md](../references/template-designer.md)):
-1. `design_spec.md` (with §VI page roster matching the actual SVG files; declare brief frontmatter for `register_template.py`)
+1. `design_spec.md` — **personality only**. Required sections: Template Overview, Color Scheme, Signature Design Elements, Page Roster (matching the actual SVG files on disk). Skip Typography / Assets / Placeholder Overrides when they would just restate defaults. Declare brief frontmatter for `register_template.py`. **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.md` / `design_spec_reference.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` vs `fidelity` mode, 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.
4. Template assets (optional) — Logos / PNG / JPG / reference SVG bundled with the template package
@@ -189,8 +189,8 @@ python3 skills/ppt-master/scripts/svg_quality_checker.py "skills/ppt-master/temp
**Checklist**:
-- [ ] `design_spec.md` contains complete design specification, with §VI listing every emitted page
-- [ ] Every page declared in `design_spec.md §VI` exists as an SVG file in the template directory (and vice versa — no orphan files)
+- [ ] `design_spec.md` follows the personality-only skeleton (Overview / Color / Signature / Page Roster); generic constraints (SVG rules, pattern libraries, ratio bands, canonical placeholder table) are NOT restated. §V Page Roster lists every emitted page
+- [ ] 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)
- [ ] 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
- [ ] SVG viewBox matches the chosen canvas format (for `ppt169`: `0 0 1280 720`)
@@ -204,7 +204,7 @@ This step is a **hard gate**. Do not register the template into the library inde
## Step 5: Register Template in Library Index
-Run the unified registrar; it derives the `layouts_index.json` entry and refreshes the `README.md` Quick Index from `design_spec.md` (frontmatter when present, §I / §III tables otherwise) plus the actual SVG file list:
+Run the unified registrar; it derives the `layouts_index.json` entry and refreshes the `README.md` Quick Index from `design_spec.md` (frontmatter when present, prose fallback otherwise) plus the actual SVG file list:
```bash
python3 skills/ppt-master/scripts/register_template.py <template_id>
@@ -294,8 +294,8 @@ For a standard-mode template the card looks like:
## Notes
-1. **SVG technical constraints**: See [template-designer.md → SVG Technical Constraints](../references/template-designer.md)
-2. **Color consistency**: All SVG files must use the same color scheme as `design_spec.md §III`
+1. **SVG technical constraints**: See [shared-standards.md](../references/shared-standards.md) — do not restate them in the template's `design_spec.md`
+2. **Color consistency**: All SVG files must use the same color scheme as `design_spec.md §II Color Scheme`
3. **Placeholder convention**: `{{}}` format only; default names listed in [Placeholder Reference](../references/template-designer.md#4-placeholder-reference-canonical-convention-overridable-per-template). Override per template via `placeholders:` frontmatter when needed.
4. **Discovery requirement**: A template directory is only discoverable after `register_template.py` has been run against it (Step 5)