Deck Pipeline
A 4-stage, audit-trailed Chinese→English deck globalization system with a swappable project profile.
This skill bundles the generic deck-globalization engine (originally upstream DeckGlobalizer v2.1.1) and an editable PROFILE block (palette, fonts, glossary, style preferences). The two are separated by section so the profile can be swapped per project / brand without touching the engine.
For a marketing-style overview, see README.md in this directory.
For implementation, see scripts/ and the per-stage runbooks below.
0. Modes & activation
| Mode | Trigger | Stages |
|---|---|---|
| Full pipeline | CN deck (± EN draft) + user wants English output | 1 → 2 → 3 → 4 |
| Polish-only | Single-language deck + "layout / format only / skip translation" | 1 → 3 → 4 |
| Reverse-sync only | User hand-edited a PPT after a comparison Excel was generated | 3.5 (sync sub-routine) |
Detect the mode in the first turn. If ambiguous, ask one yes/no question ("This deck is already in EN — should I just polish layout, or also rewrite McKinsey-style?"). Do not guess silently.
1. PROFILE block — defaults (swappable)
Edit this block to retarget the skill for your project / brand. Everything below this block is profile-agnostic.
PROFILE:
# ---- L1 Tokens ----
palette:
# Replace with your brand colors.
ink: "#1A1A1A"
primary: "#000000" # accent / brand primary
soft: "#FFFFFF" # soft fill behind banners
page_bg: "#FFFFFF"
fonts:
# Choose a serif title face + a sans-serif body face for best contrast.
title: "Georgia"
body: "Verdana"
title_bold: true
unit_table:
# Chinese number magnitudes → English. 亿 is 100M, NOT "billion".
"百万": "M"
"千万": "10M"
"亿": "100M"
"十亿": "1B"
"百亿": "10B"
"千亿": "100B"
"万亿": "1T"
# Currency suffix is left to the user — append "$" / "RMB" / "€" as appropriate.
# ---- L2 Constants ----
size_ladder: [22, 14, 10, 8, 6, 4] # H1, H2, body, caption, footnote, source
floors:
body: 7
caption: 6
source: 4
compression_step: 0.1 # discrete -0.1pt iterations only
line_height_default: 1.25
line_height_fallback: 1.15 # used before sub-floor compression
quote_style: "single" # 'McKinsey' single quotes
footer_format: "Confidential · For Intended Recipients Only · {month} {year}"
separator_in_footer: "·" # middle dot, NOT em-dash
# ---- L1 Glossary (extensible) ----
# Replace the example entries below with your project's locked terms.
# Categories are illustrative; you can rename / add / remove.
glossary:
locked:
people_orgs:
# "<source term>": "<canonical translation>"
# e.g. "John Smith": "John Smith"
# e.g. "Acme Capital": "Acme Capital"
{}
business_terms:
# Common Chinese business-deck idioms with industry-standard
# English mappings. Edit / extend as needed.
"流水": "gross revenue"
"私域": "owned audience"
"出海": "global expansion"
domain_specific:
# Project / industry / domain terms.
# "<source term>": "<canonical translation>"
{}
rejected_rewrites:
# Entries the user vetoed during prior sessions.
# Format: { source: "...", proposed: "...", reason: "..." }
[]
pending: []
session_added: []
# ---- Style rules ----
# McKinsey is the default baseline. Additional style references can be
# uploaded and distilled via scripts/style_distill.py; their rules layer
# ON TOP of the McKinsey base.
style_baseline: "mckinsey"
mckinsey:
title_is_takeaway: true # title = the so-what, not the topic
lead_with_so_what: true
parallel_structure: true # bullets share tense, opening part-of-speech
strong_action_verbs: true # cut "is/has", prefer concrete verb
cut_filler:
- "in order to → to"
- "a number of → many"
- "due to the fact that → because"
- "at this point in time → now"
case: "sentence" # lowercase unless proper noun or locked term
em_dash_policy: "use em-dash for parentheticals; use · (middle dot) in lists/footers"
style_references:
# Each entry is a PDF / .pptx reference. style_distill.py reads it and
# emits rules (cadence, signature phrases, paragraph length, tone) that
# layer on top of the McKinsey base. Conflicts: more recent entry wins;
# user is asked at first conflict.
# Example:
# - path: "/path/to/sample.pdf"
# weight: 0.7
[]
# ---- Structural anchor heuristics ----
anchor_detection:
min_pages: 3 # appears on ≥3 slides
match_on: # signature components
- position_xy
- fill_color
- font_size_class
auto_protect: true
# ---- Overflow estimator ----
overflow:
severity:
high: 1.5
med: 1.15
low: 1.0
surface_only: "high" # surface MED/LOW only when explicitly asked
defer_to_user_threshold: 10 # if HIGH > 10 → ask user to render externally
# ---- CN ↔ EN slide alignment ----
# Default is 1:1 (EN slide N maps to CN slide N).
# Set overrides only when the two decks have been restructured.
# Pass this config to excel_sync.py via `--cn-offset <yaml>`.
cn_en_slide_offset:
default: 0 # offset added to EN slide number (0 = 1:1)
overrides: {} # e.g. {"9-26": -1, "20": null}
# int = relative offset; null = no CN counterpart
Profile-agnostic note: all sections below treat
PROFILEas an opaque dict. Do not hardcode project-specific values anywhere outside the PROFILE block.
2. Pipeline stages
Each stage has: inputs · what it does · outputs · stop-and-ask conditions.
Stage 1 — Sense Pass
Inputs: one or two .pptx paths (CN, optional EN draft)
What it does:
- Run
scripts/sense_pass.pyto extract:- palette (top fill colors)
- font usage histogram
- size distribution
- title-zone shapes (top ≤ 600K EMU)
- layout heuristics
- Cross-check sensed values against
PROFILE.palette/PROFILE.fonts. If a sensed font is NOT in the whitelist AND NOT inSKIP_POLLUTION, record it as font pollution. - Surface candidate glossary entries: any CN noun phrase that appears
≥2 times and isn't already in
glossary.locked.
Outputs:
Style_Manifest.md(in-memory; not written to disk unless requested)pollution_report(slide → font → count)candidate_glossary(term → count → sample context)
Stop-and-ask:
- Candidate glossary surfaces a term Claude can't confidently translate →
ask user, write answer to
glossary.session_added. - Sensed primary palette color differs from
PROFILE.palette.primary→ ask whether to update profile or keep existing.
Stage 2 — McKinsey Translation (skipped in polish-only mode)
Inputs: Stage 1 outputs + the CN deck (and optional EN draft for diff context) + any uploaded style_references.
Style layering: McKinsey base rules (PROFILE.mckinsey) apply first. If
PROFILE.style_references is non-empty, run scripts/style_distill.py on
each reference before translation begins; the distilled rules (cadence,
signature phrases, paragraph length, tone) layer on top. More recent entry
wins on conflict; ask user at the first conflict.
Page-by-page execution (hard requirement):
- Overall confirmation first — after Stage 1, show the user the planned per-page edit count + sample of style rules in effect; wait for "go".
- Then loop slides 1 → N, one at a time:
- Collect paragraph-level CN text on this slide via
scripts/extract.py. - For each paragraph, produce EN per the layered style rules:
- lowercase by default; title =
- Collect paragraph-level CN text on this slide via