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

feat(brand): add brand identity preset subsystem under templates/brands/

hugohe365c45fa5efba
diff --git a/CLAUDE.md b/CLAUDE.md
index 98cb60f2..a2a6b92c 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -21,6 +21,8 @@ PPT Master is an AI-driven presentation generation system. Multi-role collaborat
> Object-level animation tuning: when the user asks to change animation order, effect, timing, or a specific object's reveal behavior, run the standalone [`customize-animations`](skills/ppt-master/workflows/customize-animations.md) workflow. Default export already has global animations; do not create `animations.json` unless customization was requested.
>
> Live preview: any time the user mentions "live preview", "preview", "看效果", or wants to click/select a slide element, run [`live-preview`](skills/ppt-master/workflows/live-preview.md). Step 6 auto-starts it during generation; the workflow covers post-export re-entry and applying submitted annotations.
+>
+> Brand identity setup: when the user asks to "set up brand" / "建立品牌" / "做品牌规范", provides a brand asset (logo / brand site URL / branded PPTX / brand PDF), or wants to extract a brand from existing materials, run the standalone [`create-brand`](skills/ppt-master/workflows/create-brand.md) workflow. Output goes to `skills/ppt-master/templates/brands/<id>/`. Brands apply at SKILL.md Step 3 via the same explicit-path rule as layout templates — the user supplies the brand directory path to apply it; bare brand names never trigger.
## Execution Requirements
diff --git a/skills/ppt-master/SKILL.md b/skills/ppt-master/SKILL.md
index 4ea67a72..0183d667 100644
--- a/skills/ppt-master/SKILL.md
+++ b/skills/ppt-master/SKILL.md
@@ -66,6 +66,7 @@ For complete tool documentation, see `${SKILL_DIR}/scripts/README.md`.
| Index | Path | Purpose |
|-------|------|---------|
| Layout templates | `${SKILL_DIR}/templates/layouts/layouts_index.json` | Query available page layout templates |
+| Brand presets | `${SKILL_DIR}/templates/brands/brands_index.json` | Query available brand identity presets (color / typography / logo / voice) |
| Visualization templates | `${SKILL_DIR}/templates/charts/charts_index.json` | Query available visualization SVG templates (charts, infographics, diagrams, frameworks) |
| Icon library | `${SKILL_DIR}/templates/icons/` | See `${SKILL_DIR}/templates/icons/README.md`; search icons on demand with `ls templates/icons/<library>/ \| grep <keyword>` |
@@ -74,7 +75,8 @@ For complete tool documentation, see `${SKILL_DIR}/scripts/README.md`.
| Workflow | Path | Purpose |
|----------|------|---------|
| `topic-research` | `workflows/topic-research.md` | Pre-pipeline — gather web sources when the user supplies only a topic with no source files |
-| `create-template` | `workflows/create-template.md` | Standalone template creation workflow |
+| `create-template` | `workflows/create-template.md` | Standalone layout template creation workflow |
+| `create-brand` | `workflows/create-brand.md` | Standalone brand-only template creation (identity preset; no SVG page roster) |
| `resume-execute` | `workflows/resume-execute.md` | Phase B entry — resume execution in a fresh chat after Phase A (Step 1–5) completed in another session (split mode) |
| `verify-charts` | `workflows/verify-charts.md` | Chart coordinate calibration — run after SVG generation if the deck contains data charts |
| `customize-animations` | `workflows/customize-animations.md` | Object-level PPTX animation customization — run only when the user explicitly asks to tune animation order/effects/timing |
@@ -178,7 +180,30 @@ cp ${TEMPLATE_DIR}/*.jpg <project_path>/images/ 2>/dev/null || true
> To create a new template, read `workflows/create-template.md`.
-**✅ Checkpoint — Default path proceeds to Step 4 without user interaction. If the user's input contains an explicit template directory path, that directory is copied before advancing.**
+**Brand triggering follows the same explicit-path rule as layout templates.** A brand is structurally a layout template minus its SVG page roster — its `design_spec.md` declares `kind: brand` in YAML frontmatter and lives under `templates/brands/<id>/`. `brands_index.json` is discovery-only, same as `layouts_index.json` — listing brands never triggers Step 3.
+
+| User input contains | Step 3 brand action |
+|---|---|
+| An explicit path to a brand directory (e.g. `skills/ppt-master/templates/brands/acme/`, or any path that resolves to a directory whose `design_spec.md` declares `kind: brand`) | Copy `design_spec.md` + `logo.<ext>` + any present asset subdirectories into `<project_path>/brand/` |
+| Bare brand names ("use acme brand", "用 acme 品牌"), brand mentions without a path, or silence | Skip — same mechanical rule as layout templates: bare names never trigger |
+
+A brand path and a layout template path may both be supplied in the same message. When both are present, **brand identity tokens (color / typography / logo / voice) override the layout template's defaults**, while the layout template's page roster and structural design stay intact.
+
+```bash
+BRAND_DIR=<user-supplied brand path>
+mkdir -p <project_path>/brand
+cp ${BRAND_DIR}/design_spec.md <project_path>/brand/
+cp ${BRAND_DIR}/logo.* <project_path>/brand/ 2>/dev/null || true
+[ -d ${BRAND_DIR}/images ] && cp -r ${BRAND_DIR}/images <project_path>/brand/
+[ -d ${BRAND_DIR}/illustrations ] && cp -r ${BRAND_DIR}/illustrations <project_path>/brand/
+[ -d ${BRAND_DIR}/icons ] && cp -r ${BRAND_DIR}/icons <project_path>/brand/
+```
+
+> "What brands exist?" is out-of-band Q&A — answer by listing entries from `brands_index.json` together with their paths. Listing alone does not advance the pipeline; the user still has to send a path to trigger the Step 3 copy.
+
+> To create a new brand, read `workflows/create-brand.md`.
+
+**✅ Checkpoint — Default path proceeds to Step 4 without user interaction. If the user's input contains an explicit template directory path and/or an explicit brand directory path, those directories are copied before advancing.**
---
diff --git a/skills/ppt-master/references/strategist.md b/skills/ppt-master/references/strategist.md
index 528e6e3a..17a8a2ae 100644
--- a/skills/ppt-master/references/strategist.md
+++ b/skills/ppt-master/references/strategist.md
@@ -88,7 +88,9 @@ Accept user combinations and one-off coinages ("Scandinavian + slight industrial
### e. Color Scheme Recommendation
-**Hard rule**: User / template colors are truth. If the user has specified colors (HEX, brand colors, or natural-language directives like "use blue as primary"), or a template was loaded with its own theme colors, lock those directly and skip the recommendation table. Do not adjust them to fit any palette or industry default. Only when no color signal exists from user or template do you proactively propose a scheme below.
+**Hard rule**: User / brand / template colors are truth. If the user has specified colors (HEX, brand colors, or natural-language directives like "use blue as primary"), a brand was loaded at Step 3 via an explicit path (`<project_path>/brand/design_spec.md`), or a layout template was loaded with its own theme colors, lock those directly and skip the recommendation table. Do not adjust them to fit any palette or industry default. Only when no color signal exists from user, brand, or template do you proactively propose a scheme below.
+
+> **Precedence when multiple sources are present**: explicit user override > brand > layout template defaults. Brand identity tokens (primary / secondary / accent / text / bg) override layout template defaults; the layout template's page structure stays intact.
Proactively provide a color scheme (HEX values) based on content characteristics and industry.
@@ -163,6 +165,8 @@ See [`../templates/icons/README.md`](../templates/icons/README.md) for the curre
**Mandatory**: propose **two** combinations to the user — one concord (safe), one contrast (with tension). Do not default to "title = body, same font" without explicit user request.
+> **Brand precedence**: when a brand was loaded at Step 3 via an explicit path and declares `title` / `body` font stacks in `<project_path>/brand/design_spec.md §III Typography`, lock those directly and skip the two-combination presentation. Same precedence as e. — user override > brand > layout template defaults.
+
**Cross-platform pre-installed reference**:
| Category | Safe families |
@@ -277,7 +281,7 @@ After the candidates, append one line:
| Span a personality spectrum | Typically: one conservative-default (industry norm), one shifted-tone (same fit, 1-2 ticks different), one bold-contrast (more expressive, may challenge default). No near-duplicates. |
| `Mood` line MUST include a real-world analogy | Company / publication / event the user can picture. Adjective stacks alone are forbidden. |
| Adapt labels to chat language | Schema is English by default. Chinese chat → render as 「方案 A / 视觉 / 色彩 / 情绪」. Structure stays the same; only the labels translate. |
-| Skip presentation when user has specified | User-named rendering or palette (chat / template) bypasses the candidate flow — lock directly per the truth-precedence rule. |
+| Skip presentation when user has specified | User-named rendering or palette (chat / brand / template) bypasses the candidate flow — lock directly per the truth-precedence rule. |
**Forbidden — padding with conflicts**: if e.'s HEX cannot find ≥3 compatible palettes, present the smaller set (2 candidates) and state "your color is unusual — only N palettes can carry it without conflict." Never fill remaining slots with known-conflicting options.
diff --git a/skills/ppt-master/scripts/register_template.py b/skills/ppt-master/scripts/register_template.py
index eef02fca..d18a5160 100644
--- a/skills/ppt-master/scripts/register_template.py
+++ b/skills/ppt-master/scripts/register_template.py
@@ -1,24 +1,31 @@
#!/usr/bin/env python3
-"""Register a layout template into the global template index.
+"""Register a layout template or brand preset into the global template index.
-Reads ``templates/layouts/<template_id>/design_spec.md`` (preferring its YAML
-frontmatter when present, falling back to prose section values) and
-synchronizes two derived indexes:
+For layout templates (``--kind layout``, default), reads
+``templates/layouts/<template_id>/design_spec.md`` and synchronizes:
- ``templates/layouts/layouts_index.json`` — slim machine-readable map
- ``templates/layouts/README.md`` — human-facing "Quick Template Index" table
-This script is the single source-of-truth bridge between a template's design
-spec and the indexes. Run it after creating a new template (or after editing a
-spec) and the indexes update automatically — no manual JSON / Markdown surgery.
+For brand presets (``--kind brand``), reads
+``templates/brands/<brand_id>/design_spec.md`` and synchronizes:
+
+- ``templates/brands/brands_index.json`` — slim machine-readable map
+ (brand README under ``templates/brands/`` is hand-maintained)
+
+This script is the single source-of-truth bridge between a design spec and
+the indexes. Run it after creating a new template / brand (or after editing
+a spec) and the index updates automatically — no manual JSON surgery.
Usage:
python3 scripts/register_template.py <template_id>
python3 scripts/register_template.py <template_id> --dry-run
python3 scripts/register_template.py --rebuild-all
+ python3 scripts/register_template.py <brand_id> --kind brand
+ python3 scripts/register_template.py --kind brand --rebuild-all
-The last form rebuilds every entry from scratch, which is the recommended way
-to repair index drift across many templates at once.
+``--rebuild-all`` rebuilds every entry from scratch within the chosen kind;
+recommended for repairing index drift across many templates / brands at once.
"""
from __future__ import annotations
@@ -43,6 +50,9 @@ LAYOUTS_DIR = SKILL_DIR / "templates" / "layouts"
INDEX_PATH = LAYOUTS_DIR / "layouts_index.json"
README_PATH = LAYOUTS_DIR / "README.md"
+BRANDS_DIR = SKILL_DIR / "templates" / "brands"
+BRANDS_INDEX_PATH = BRANDS_DIR / "brands_index.json"
+
QUICK_INDEX_BEGIN = "<!-- quick-index:begin -->"
QUICK_INDEX_END = "<!-- quick-index:end -->"
@@ -327,6 +337,148 @@ def _patch_readme(
README_PATH.write_text(text, encoding="utf-8")
+# ---------------------------------------------------------------------------
+# Brand-mode helpers
+# ---------------------------------------------------------------------------
+
+def _extract_brand_entry(brand_id: str, brand_dir: Path) -> dict:
+ """Extract a brand-index entry from ``templates/brands/<brand_id>/design_spec.md``.
+
+ Brand specs are simpler than layout specs: no SVG roster, no §V signature
+ elements. Frontmatter is the primary source; section fallbacks cover the
+ bare minimum (summary + primary color) for hand-written specs.
+ """
+ spec_path = brand_dir / "design_spec.md"
+ if not spec_path.exists():
+ raise SpecParseError(f"missing design_spec.md in {brand_dir}")
+
+ frontmatter, body = _read_spec(spec_path)
+ fm = frontmatter or {}
+
+ declared_kind = fm.get("kind")
+ if declared_kind not in (None, "brand"):
+ raise SpecParseError(
+ f"design_spec.md frontmatter declares kind={declared_kind!r}; "
+ f"use --kind layout to register a layout template instead"
+ )
+
+ summary = (fm.get("summary") or "").strip()
+ if not summary:
+ summary = _summary_from_use_cases(
+ _extract_section_field(
+ body, "I. Brand Overview", ["Use Cases", "Use cases"]
+ )
+ ) or ""
+ summary = summary.strip()
+
+ keywords = _split_keywords(fm.get("keywords"))
+
+ primary_color = fm.get("primary_color") or _extract_primary_color(body)
+
+ entry = OrderedDict(
+ summary=summary,
+ keywords=keywords,
+ primary_color=str(primary_color or ""),
+ )
+ return {"entry": entry}
+
+
+def _enumerate_brands() -> list[str]:
+ if not BRANDS_DIR.exists():
+ return []
+ return sorted(
+ p.name for p in BRANDS_DIR.iterdir()
+ if p.is_dir() and (p / "design_spec.md").exists()
+ )
+
+
+def _load_brand_index() -> "OrderedDict[str, dict]":
+ if not BRANDS_INDEX_PATH.exists():
+ return OrderedDict()
+ raw_text = BRANDS_INDEX_PATH.read_text(encoding="utf-8").strip() or "{}"
+ raw = json.loads(raw_text)
+ return OrderedDict(sorted(raw.items()))
+
+
+def _write_brand_index(
+ data: "OrderedDict[str, dict]", *, dry_run: bool
+) -> None:
+ payload = json.dumps(data, ensure_ascii=False, indent=2) + "\n"
+ if dry_run:
+ print(f"--- {BRANDS_INDEX_PATH.name} (dry-run) ---")
+ print(payload)
+ return
+ BRANDS_INDEX_PATH.parent.mkdir(parents=True, exist_ok=True)
+ BRANDS_INDEX_PATH.write_text(payload, encoding="utf-8")
+
+
+def _print_brand_completion_card(brand_id: str, entry: dict) -> None:
+ print()
+ print("## Brand Registration Complete")
+ print()
+ print(f"**Brand ID**: {brand_id}")
+ print(f"**Brand Path**: `templates/brands/{brand_id}/`")
+ primary = entry.get("primary_color") or "—"
+ print(f"**Primary Color**: {primary}")
+ print(f"**Summary**: {entry.get('summary') or '—'}")
+ keywords = entry.get("keywords") or []
+ if keywords:
+ print(f"**Keywords**: {', '.join(keywords)}")
+ print("**Index Registration**: Done")
+ print()
+
+
+def _register_brand_main(args: argparse.Namespace) -> int:
+ if args.rebuild_all:
+ ids = _enumerate_brands()
+ if not ids:
+ print("[OK] No brand directories under templates/brands/; index left empty.")
+ _write_brand_index(OrderedDict(), dry_run=args.dry_run)
+ return 0
+ else:
+ ids = [args.template_id]
+ brand_dir = BRANDS_DIR / args.template_id
+ if not brand_dir.is_dir():
+ print(
+ f"Error: brand directory not found: {brand_dir}",
+ file=sys.stderr,
+ )
+ return 1
+
+ extracted: dict[str, dict] = {}
+ for bid in ids:
+ try:
+ extracted[bid] = _extract_brand_entry(bid, BRANDS_DIR / bid)
+ except SpecParseError as exc:
+ print(f"Error: {bid}: {exc}", file=sys.stderr)
+ return 1
+
+ if args.rebuild_all:
+ index = OrderedDict(
+ (bid, extracted[bid]["entry"]) for bid in sorted(extracted)
+ )
+ else:
+ index = _load_brand_index()
+ for bid, payload in extracted.items():
+ index[bid] = payload["entry"]
+ index = OrderedDict(sorted(index.items()))
+
+ _write_brand_index(index, dry_run=args.dry_run)
+
+ if not args.dry_run and not args.rebuild_all:
+ bid = args.template_id
+ _print_brand_completion_card(bid, extracted[bid]["entry"])
+ return 0
+
+ print()
+ print(
+ f"[OK] {'Dry-run preview' if args.dry_run else 'Updated'}: "
+ f"{len(extracted)} brand(s) processed; "
+ f"index now lists {len(index)} entries."
+ )
+ return 0
+
+
# ---------------------------------------------------------------------------
# Main
# ---------------------------------------------------------------------------
@@ -361,17 +513,34 @@ def _print_completion_card(template_id: str, entry: dict, extras: dict) -> None:
def main() -> int:
"""CLI entry: register one template (or rebuild all) into the index."""
parser = argparse.ArgumentParser(
- description="Register / refresh layout templates in the global index."
+ description=(
+ "Register / refresh layout templates or brand presets "
+ "in the global index."
+ )
)
parser.add_argument(
"template_id",
nargs="?",
- help="Template directory under templates/layouts/. Omit with --rebuild-all.",
+ help=(
+ "Template directory under templates/layouts/ "
+ "(or templates/brands/ when --kind brand). "
+ "Omit with --rebuild-all."
+ ),
+ )
+ parser.add_argument(
+ "--kind",
+ choices=["layout", "brand"],
+ default="layout",
+ help=(
+ "What kind of preset to register. 'layout' (default) writes to "
+ "layouts_index.json + README quick index; 'brand' writes to "
+ "brands_index.json and skips SVG-roster checks."
+ ),
)
parser.add_argument(
"--rebuild-all",
action="store_true",
- help="Rebuild every index entry from each template's design_spec.md.",
+ help="Rebuild every index entry from each spec.",
)
parser.add_argument(
"--dry-run",
@@ -383,6 +552,9 @@ def main() -> int:
if not args.template_id and not args.rebuild_all:
parser.error("provide a template_id or use --rebuild-all")
+ if args.kind == "brand":
+ return _register_brand_main(args)
+
if args.rebuild_all:
ids = _enumerate_templates()
else:
diff --git a/skills/ppt-master/scripts/svg_quality_checker.py b/skills/ppt-master/scripts/svg_quality_checker.py
index ebdab82c..c6672de4 100644
--- a/skills/ppt-master/scripts/svg_quality_checker.py
+++ b/skills/ppt-master/scripts/svg_quality_checker.py
@@ -55,6 +55,32 @@ RAMP_MIN_RATIO = 0.5
RAMP_MAX_RATIO = 5.0
+def _design_spec_is_brand(spec_path: Path) -> bool:
+ """Return True when a design_spec.md frontmatter declares ``kind: brand``.
+
+ Lightweight detector that does not require PyYAML — scans only the
+ frontmatter block (``---`` delimited) for a ``kind:`` line whose value
+ contains ``brand``. Used by ``check_directory`` to skip SVG validation
+ on brand-only template directories.
+ """
+ try:
+ text = spec_path.read_text(encoding='utf-8')
+ except OSError:
+ return False
+ if not text.startswith('---\n'):
+ return False
+ end = text.find('\n---\n', 4)
+ if end == -1:
+ return False
+ fm_block = text[4:end]
+ for line in fm_block.splitlines():
+ stripped = line.strip()
+ if stripped.startswith('kind:'):
+ value = stripped.split(':', 1)[1].strip().strip('"\'')
+ return value == 'brand'
+ return False
+
+
def _parse_placeholders_fallback(block: str) -> Dict[str, Tuple[str, ...]]:
"""Tiny YAML-free reader for the documented ``placeholders:`` shape.
@@ -823,6 +849,23 @@ class SVGQualityChecker:
print(f"[ERROR] Directory does not exist: {directory}")
return []
+ # Brand-only template directories (templates/brands/<id>/) have no SVG
+ # roster — design_spec.md frontmatter declares `kind: brand`. Skip SVG
+ # checks entirely; brand validation lives in register_template.py.
+ if self.template_mode and dir_path.is_dir():
+ spec = dir_path / 'design_spec.md'
+ if spec.exists() and _design_spec_is_brand(spec):
+ print(
+ f"[INFO] Brand directory detected (kind: brand) — "
+ f"SVG checks skipped."
+ )
+ print(
+ f"[INFO] Validate brand specs via: "
+ f"python3 scripts/register_template.py "
+ f"--kind brand <brand_id> --dry-run"
+ )
+ return self.results
+
# Find all SVG files
if dir_path.is_file():
svg_files = [dir_path]
diff --git a/skills/ppt-master/templates/README.md b/skills/ppt-master/templates/README.md
index 0cdf9e03..c10a8c06 100644
--- a/skills/ppt-master/templates/README.md
+++ b/skills/ppt-master/templates/README.md
@@ -21,6 +21,16 @@ The `layouts/` directory contains pre-built page layout templates organized by d
- **Human browsing**: [layouts/README.md](./layouts/README.md)
- **Slim lookup (discovery only)**: [layouts/layouts_index.json](./layouts/layouts_index.json) — used to answer "what templates exist?". Step 3 triggers on an explicit directory path supplied by the user, not on names from this index.
+## Brand Identity Presets
+
+The `brands/` directory holds brand-only templates: identity bundles (color / typography / logo / voice / icon style) without an SVG page roster. Brands follow the **same explicit-path trigger rule as layout templates** — at SKILL.md Step 3 the user supplies the brand directory path to apply it; bare brand names never trigger. Brands and layout templates may be applied together; brand identity overrides layout-template defaults while the template's page roster stays intact.
+
+A brand is structurally a layout template minus its page roster. Use a brand when the user wants identity locking with free page layout; use a layout template when fixed page structures are also required.
+
+- **Human browsing**: [brands/README.md](./brands/README.md)
+- **Discovery index (no trigger)**: [brands/brands_index.json](./brands/brands_index.json) — answers "what brands exist?"; Step 3 still requires an explicit directory path from the user
+- **Creation workflow**: [`../workflows/create-brand.md`](../workflows/create-brand.md)
+
## Visualization Templates
The `charts/` directory contains 57 standardized visualization templates. For backward compatibility, the directory name remains `charts/`, but its scope includes charts, infographics, process diagrams, relationship diagrams, strategic frameworks, and system architecture diagrams:
diff --git a/skills/ppt-master/templates/brands/README.md b/skills/ppt-master/templates/brands/README.md
new file mode 100644
index 00000000..3e1ef004
--- /dev/null
+++ b/skills/ppt-master/templates/brands/README.md
@@ -0,0 +1,46 @@
+# Brand Identity Presets
+
+This directory holds **brand-only templates**: identity bundles (colors / typography / logo / voice / icon style) without an SVG page roster. Structurally a brand is a layout template minus its page roster — Strategist locks the brand's identity tokens as truth; Executor designs pages freely under those constraints.
+
+## How brands are consumed
+
+Brand application follows the **same explicit-path rule as layout templates** at SKILL.md Step 3:
+
+| User input at SKILL.md Step 3 | Behavior |
+|---|---|
+| An explicit brand directory path (e.g. `templates/brands/acme/`) | Copy `design_spec.md` + `logo.<ext>` + any present asset subdirectories into `<project_path>/brand/`; Strategist locks color / typography / logo / voice as truth |
+| Bare brand name only ("use acme brand"), brand mention without path, or silence | Skip — same mechanical rule as layout templates: bare names never trigger |
+| Both a brand path and a layout template path supplied | Both apply; brand identity overrides layout-template defaults, layout template's page roster stays intact |
+
+`brands_index.json` is discovery-only; listing brands never advances the pipeline.
+
+## Creating a new brand
+
+Run the standalone workflow:
+
+```
+Read skills/ppt-master/workflows/create-brand.md
+```
+
+Three input paths are supported: brand asset (logo / brand site URL / branded PPTX / brand PDF), verbal spec dictated in chat, or empty skeleton for the user to fill in later.
+
+## Package structure
+
+Every brand directory is self-contained:
+
+```
+templates/brands/<brand_id>/
+├── design_spec.md # required — brand identity spec (7 sections)
+├── logo.<ext> # optional — primary brand logo
+├── images/ # optional — branded photos
+├── illustrations/ # optional — branded illustrations
+└── icons/ # optional — branded icon overrides
+```
+
+`design_spec.md` carries a YAML frontmatter block with `kind: brand` and is the single source of truth for the brand identity. The seven sections are: I Brand Overview / II Color Scheme / III Typography / IV Logo / V Voice & Tone / VI Icon Style / VII Visual Assets (optional).
+
+## Discovery index
+
+[brands_index.json](./brands_index.json) is a slim machine-readable map (`brand_id → { summary, keywords, primary_color }`). It is refreshed by `register_template.py --kind brand <brand_id>` after a brand is created or edited.
+
+Listing the index does not trigger any pipeline action — Step 3 triggers only on an explicit directory path supplied by the user, regardless of whether the brand appears in the index.
diff --git a/skills/ppt-master/templates/brands/brands_index.json b/skills/ppt-master/templates/brands/brands_index.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/skills/ppt-master/templates/brands/brands_index.json
@@ -0,0 +1 @@
+{}
diff --git a/skills/ppt-master/workflows/create-brand.md b/skills/ppt-master/workflows/create-brand.md
new file mode 100644
index 00000000..b7f4197c
--- /dev/null
+++ b/skills/ppt-master/workflows/create-brand.md
@@ -0,0 +1,226 @@
+---
+description: Generate a brand-only template under `templates/brands/<id>/` — a design_spec.md that captures the user's colors / typography / logo / voice / icon style without an SVG page roster, so subsequent PPT projects inherit brand identity while keeping page layout free.
+---
+
+# Create Brand Workflow
+
+> Standalone preset-creation workflow. Output is a brand template package at `skills/ppt-master/templates/brands/<brand_id>/`. Structurally a brand is a template minus the SVG page roster — Strategist locks the brand's color / typography / logo / voice as truth; Executor designs pages freely under those constraints.
+
+This workflow edits the global brand library, not any specific `projects/<x>/`. Consumption follows the same explicit-path rule as layout templates (see [Downstream consumption](#downstream-consumption-informational) at the end).
+
+> Companion: [`create-template.md`](./create-template.md) generates full templates with SVG pages. Use `create-brand.md` when the user wants identity-only locking with free page layout.
+
+## When to Run
+
+| User signal | Action |
+|---|---|
+| "set up brand" / "extract brand from this logo" / 建立品牌 / 做品牌规范 | Run this workflow |
+| User provides a brand asset (logo / brand site URL / branded PPTX / brand PDF) and wants it locked across future projects | Run this workflow |
+| User mentions brand color or font once for a single deck only | Skip — handle inline via Strategist h.5 |
+| `templates/brands/<requested_id>/` already exists | Ask: update / replace / use a new id — never silently overwrite |
+
+⛔ Never auto-trigger. Brand creation is a user-invoked identity setup; an empty `templates/brands/` is not an invitation to create one.
+
+---
+
+## Step 1: Detect input type
+
+| Type | User-supplied input | Path |
+|---|---|---|
+| **A** Brand asset | Logo (SVG/PNG/JPG), brand site URL, branded PPTX, brand PDF | Step 2A — Asset extraction |
+| **B** Verbal spec | User dictates HEX / font / tone directly in chat | Step 2B — Verbal capture |
+| **C** Nothing | User wants to set up a brand but provides no asset and no spec | Step 2C — Empty skeleton |
+
+---
+
+## Step 2A: Asset extraction
+
+Read assets directly using existing converters — no dedicated extraction script.
+
+| Asset format | Read method | Extractable fields |
+|---|---|---|
+| SVG logo | `Read` the SVG; grep `fill=` / `stroke=` for HEX | colors (literal), logo file |
+| PNG/JPG logo | `Read` (multimodal); AI vision identifies dominant colors | colors (approximate HEX, label `[approx]`), logo file |
+| Brand site URL | `python3 skills/ppt-master/scripts/source_to_md/web_to_md.py <URL>`, then `Read` the result | color references, font references, voice/tone |
+| Branded PPTX | `python3 skills/ppt-master/scripts/source_to_md/ppt_to_md.py <file>`, then read theme XML | colors, typography (literal) |
+| Brand PDF | `python3 skills/ppt-master/scripts/source_to_md/pdf_to_md.py <file>` | voice/tone; sometimes color/font references |
+
+Identify which of (colors / typography / logo / voice / icon style) the asset did NOT cover, then proceed to Step 3 for the rest. Most single assets cover 1–2 categories well.
+
+**Provenance labels** for each field in the draft `design_spec.md`:
+- `[fact]` — extracted directly (SVG fill HEX, PPTX theme XML)
+- `[approx]` — visual estimate (PNG/JPG color picking)
+- `[user]` — supplied via chat fill-in in Step 3
+
+---
+
+## Step 2B: Verbal spec capture
+
+Ask once, bundled (do NOT itemize each field). Match the user's language. Example bundled prompt:
+
+> "I'll record: primary / secondary / accent HEX, title font, body font, logo path (optional), tone (formal / neutral / casual), emoji allowed or not. Which do you want to lock now?"
+
+Whatever the user gives is `[user]`-labelled. Skip Step 3 unless the user explicitly invites more fields.
+
+---
+
+## Step 2C: Empty skeleton
+
+Write `templates/brands/<brand_id>/design_spec.md` with the full schema, every value as a TODO comment. Tell the user where the file is. No further prompting — the user owns it from here.
+
+---
+
+## Step 3: Chat fill-in (Type A only)
+
+For fields not covered by the asset, ask the user in a single bundled message. Skip fields irrelevant to the user's intent.
+
+| Field | When to ask |
+|---|---|
+| primary / secondary / accent HEX | always |
+| text / bg HEX | only if dark-mode or inverted scheme mentioned |
+| title / body font | when the asset gave no font reference |
+| logo usage | when a logo file was provided |
+| voice & tone | when audience or formality was mentioned |
+| icon style preference | when icon consistency was mentioned |
+
+---
+
+## Step 4: Materialize the brand package
+
+Create the package directory:
+
+```bash
+mkdir -p "skills/ppt-master/templates/brands/<brand_id>"
+```
+
+### Mandatory: `design_spec.md`
+
+```markdown
+---
+brand_id: <slug>
+kind: brand
+summary: <one-line use case, e.g. "ACME Corp marketing decks">
+keywords: [<3-5 short tags>]
+primary_color: "#XXXXXX"
+---
+
+# <Display Name> Brand Specification
+
+> Identity-only preset. No SVG page roster — pages are composed freely under these constraints.
+
+## I. Brand Overview
+| Property | Value |
+|---|---|
+| Brand Name | <display name> |
+| Use Cases | <summary> |
+| Tone | <one-line tone summary> |
+
+## II. Color Scheme
+| Role | HEX | Provenance |
+|---|---|---|
+| primary | #XXXXXX | fact \| approx \| user |
+| secondary | #XXXXXX | |
+| accent | #XXXXXX | |
+| text | #XXXXXX | optional, default `#1A1A1A` |
+| bg | #XXXXXX | optional, default `#FFFFFF` |
+
+## III. Typography
+| Role | Family | Weight |
+|---|---|---|
+| title | <family> | <weight> |
+| body | <family> | <weight> |
+| mono | <family> | optional |
+
+## IV. Logo
+- File: `./logo.<ext>` (relative to this design_spec.md)
+- Usage: cover-only \| every-page \| never
+
+## V. Voice & Tone
+- Formality: formal \| neutral \| casual
+- Person: informal-you \| formal-you \| we \| none
+- Emoji: allowed \| forbidden
+- Abbreviations: spell-out-first \| common-abbrev-allowed
+
+## VI. Icon Style
+- Preference: linear \| filled \| duotone # optional, drives icon library search
+
+## VII. Visual Assets (optional)
+- Images: `./images/` # branded photos, prioritised before AI image generation
+- Illustrations: `./illustrations/` # branded illustrations, prioritised before AI generation
+- Icons: `./icons/` # branded icon overrides; falls back to `templates/icons/`
+```
+
+**Section scope rules**:
+- Layout / canvas / spacing / radius / shadow / page roster / signature design elements are OUT of brand scope. Those live in layout templates (`templates/layouts/<id>/design_spec.md`) or `shared-standards.md`. Do NOT add those sections here.
+- HEX must be `#RRGGBB`
+- Font names are free strings; not validated against locally installed fonts
+- §VII is fully optional — list only directories that actually exist
+
+### Optional: logo file
+
+If the user provided a logo, copy it to `templates/brands/<brand_id>/logo.<ext>` (preserve source extension).
+
+### Optional: visual asset directories
+
+If the user provided brand photo / illustration / icon folders, copy them as `images/` / `illustrations/` / `icons/` under `templates/brands/<brand_id>/`. Reference each in §VII of `design_spec.md`. Skip the entire section if none exist.
+
+### NOT created here
+
+No SVG page roster. No canvas spec. No signature design elements. If the user later wants brand-anchored page templates, run `create-template.md` with this brand as a style reference.
+
+---
+
+## Step 5: Register and hand off
+
+Update `templates/brands/brands_index.json` with the new entry (create the file if missing):
+
+```json
+{
+ "<brand_id>": {
+ "summary": "<from design_spec.md frontmatter>",
+ "keywords": [...],
+ "primary_color": "#XXXXXX"
+ }
+}
+```
+
+Emit the confirmation card:
+
+```markdown
+## ✅ Brand Saved
+- Path: `skills/ppt-master/templates/brands/<brand_id>/`
+- Files: design_spec.md{, logo.<ext>}{, images/}{, illustrations/}{, icons/}
+- Fields locked: <list>
+- Provenance: <fact / approx / user counts>
+
+How to use in a project:
+- Include the brand directory path in your initial Step 3 input — e.g. "做一个 Q4 总结 PPT, 用 skills/ppt-master/templates/brands/<brand_id>/ 这个品牌"
+- Same explicit-path rule as layout templates: bare brand names never trigger
+- May be supplied together with a layout template path; brand identity overrides layout-template defaults
+- To list available brands: open `templates/brands/brands_index.json`
+- To edit: modify `templates/brands/<brand_id>/design_spec.md` directly, then re-run `python3 skills/ppt-master/scripts/register_template.py --kind brand <brand_id>`
+```
+
+---
+
+## Downstream consumption (informational)
+
+Brand application happens in [`SKILL.md` Step 3](../SKILL.md) under the **same explicit-path rule as layout templates**:
+
+| User input at SKILL.md Step 3 | Behavior |
+|---|---|
+| Explicit brand directory path supplied | Step 3 copies the brand into `<project_path>/brand/`; Strategist locks color / typography / logo / voice as truth at Step 4 |
+| Bare brand name, brand mention without path, or silence | Skip — no auto-application based on directory count or any other implicit signal |
+| Both a brand path and a layout template path supplied in the same message | Both apply; brand identity overrides layout-template defaults, layout template's page roster and structural design stay intact |
+
+`brands_index.json` is discovery-only (mirrors `layouts_index.json` semantics); listing brands never advances the pipeline.
+
+---
+
+## Notes
+
+1. **Brand is identity, not layout** — colors / typography / logo / voice / icon style only. Page roster, canvas spec, and signature design elements belong to layout templates; do not duplicate them here.
+2. **Self-contained package** — all brand assets (logo, images, illustrations, icons) live inside `templates/brands/<brand_id>/`. Nothing leaks to workspace root or `projects/`.
+3. **No script dependency** — Step 2A reuses existing converters plus AI inline reading. A dedicated `brand_extract.py` is not introduced unless future user feedback demands batch processing or precise color picking from raster logos.
+4. **Multi-brand support** — `templates/brands/` accepts any number of brands; agency / freelancer / multi-client workflows are natural.
+5. **Precedence rule** — when a brand and a layout template both apply, brand identity tokens (color / typography / logo / voice) override the layout template's defaults while the layout's page structure is preserved.
diff --git a/skills/ppt-master/workflows/create-template.md b/skills/ppt-master/workflows/create-template.md
index a7961637..eb16235b 100644
--- a/skills/ppt-master/workflows/create-template.md
+++ b/skills/ppt-master/workflows/create-template.md
@@ -10,6 +10,8 @@ Generate a complete set of reusable PPT layout templates for the **global templa
> This workflow is for **library asset creation**, not project-level one-off customization. The output must be reusable by future PPT projects and discoverable from `templates/layouts/layouts_index.json`.
+> **Companion workflow**: identity-only locking (colors / typography / logo / voice without SVG pages) is handled by [`create-brand.md`](./create-brand.md). Use that when the user wants brand identity but free page layout; use this when fixed page structures are also required.
+
## Process Overview
```