Compare commits

...

9 Commits

Author SHA1 Message Date
zhuyuanbin.gdut
8a5594616d feat(slides): update preset 7 (teaching slides) to the designer's new sky-blue style
Replace preset 7's palette, tone, layout, and fonts with the designer's
refreshed spec from the 生图风格 table (row 7, 教学课件/分学段):
- colors: primary sky blue #8FE3F9, secondary mint green #CDEFD9, accent
  cream yellow #FFE7A3, background warm white #FAF7F2, text_main charcoal
  #2F2F2F, text_sub warm gray #6B7280.
- tone: fresh, friendly, academic-approachable, youthful, global.
- layout: modular-classroom-courseware system — large titles, light-color
  knowledge cards, rounded containers, clear numbering; section /
  overview / content / comparison / flow / summary page rhythm.
- fonts: CJK 思源黑体 / 寒蝉全圆体; Latin Poppins / Quicksand; number
  Nunito Sans.

Color names stay English and font names stay CJK, consistent with the
rest of the file.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 14:26:13 +08:00
zhuyuanbin.gdut
4a60bab08e refactor(slides): English-ify style-presets.md (keep only CJK font names)
Translate everything in style-presets.md to English except the literal
font names (思源黑体, 寒蝉德黑体, 霞鹜 975 圆体, 寒蝉团圆体 圆体 …),
which stay as-is because they are the identifiers the renderer resolves:
- Use-for lines, color names (钢蓝 → steel blue, 砖红 → brick red, …),
  layout_system descriptions, and font-role labels (中文/英文/强调数字 →
  CJK/Latin/number) are now English.
- Color names are translated, not dropped — the semantic anchor that
  keeps preset adoption high is preserved (a prior ablation showed bare
  hex, with no name at all, halves adoption; English names keep the name).

Verified (v12, 7 preset cases): color adoption held — 5/6 in-plan cases
exact-hex (Cp1→p1, W31→p2, Cp3→p3, W52→p4, Cp7→p7), W7 adopts p5 with an
accent tweak; fonts still land (Rajdhani/Rubik/Oswald/Roboto Mono present,
Cp7 圆体 dominant). W18 (python-gen path) still bypasses the plan — a
pre-existing structural issue, unrelated to this change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 14:26:13 +08:00
zhuyuanbin.gdut
8229065f29 feat(slides): only adopt a preset on a genuine document-type match, else self-configure
Guard against over-matching: a preset now applies only when the deck
genuinely belongs to one of its 适用 document types. Match literally —
"it also presents something" or "it also lays out a plan" does not make a
deck a fundraising pitch or a business report. When no preset's 适用
clearly covers the deck (many personal / lifestyle / creative decks
won't), don't force the nearest preset — self-configure a coherent,
topic-appropriate palette using the same framework (six color_roles +
layout_system + font_family). visual-planning's Style System bullet is
aligned to the same rule.

Motivation: a PM résumé was being stretched onto the Pitch preset
(p3, 融资路演/商业计划书). After the change it self-configures instead.

Verified: 7 out-of-category decks (travel / wedding / résumé / photo
portfolio / company gala / recipe / 12-week fitness plan) all
self-configure with no preset force-fit — including the two boundary
cases (gala "向领导汇报", fitness "计划") that previously risked mapping to
pitch / course. In-category regression clean: research still → p1,
teaching still → p7 (exact-hex). Framework (roles + layout_system +
fonts) is inherited in every case.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 14:26:13 +08:00
zhuyuanbin.gdut
44a47dccd4 refactor(slides): make style/layout/font guidance more universal & concise
Follow-up wording pass on the preset guidance (no behavior change):
- Drop eval-specific color examples (浮力→海洋蓝 etc.); state the
  topic/industry-stereotype caveat generically.
- Soften absolutes: layout "every page must follow"/"dictates" →
  "content pages should generally follow", with covers/dividers allowed
  to deviate by page role.
- Font rule no longer demands writing fontFamily on every element; keep
  the protocol fact that fontFamily is a single font. Scope number-face
  to key data callouts rather than all table numerics.
- De-duplicate the layout_system explanation (planning-layer now names
  the field and points to visual-planning for how it applies).

Verified (v11, 7 preset cases): color 6/7 exact, layout 7/7 recorded,
fonts 6/7 land the number/display face — on par with v10, layout uptake
slightly better.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 14:26:13 +08:00
zhuyuanbin.gdut
2487e7a9a3 feat(slides): add per-preset fonts from 生图风格 spec, applied by content type
Re-add fonts to the style presets, sourced verbatim from the 生图风格
版式表 字体 column (the same table colors and layout came from). Each
preset now carries a CJK face, a Latin face, and a number-emphasis face,
using the schema's canonical font names (e.g. 寒蝉团圆体 圆体, 霞鹜 975 圆体).

Fonts were previously dropped because they never reached the XML — but the
real cause was application, not the platform: fonts render fine, agents
just defaulted every element to 思源黑体. Verified empirically:
- every preset font renders distinctly (sample sheet);
- `fontFamily` is one font per the protocol (no comma stacks);
- inline `<span fontFamily>` works, so CJK/number/Latin can differ within
  a paragraph.

visual-planning gains a mechanism-agnostic apply rule (not tied to
`<theme>`): assign fontFamily by what the text is — CJK-dominant text →
CJK face; number-forward elements (big numbers, KPI/metric values, chart
labels, table numerics) → number-emphasis face on that shape; a focal
inline number/Latin → wrap in `<span fontFamily>`. Applies on create,
+replace-slide, and +replace-pages.

Verified (v10, 7 preset cases): color 7/7 exact-hex; layout 5/7 realized;
fonts 6/7 land the number/display face in the XML (Rajdhani / Rubik /
Roboto Mono / Oswald present; Cp7 圆体 goes from 1 to dominant). W18
(data-heavy python-gen path) still bypasses the plan's visual_system and
is tracked separately.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 14:26:13 +08:00
zhuyuanbin.gdut
0a9dd12908 refactor(slides): presets carry color + layout; drop graphic-language & fonts
Rework the style-preset system so each preset carries the two axes that
reliably reach the rendered deck — color and layout — and drop the two
that did not.

Removed
- Graphic-language pool: per-preset `graphic language` rows, the
  `graphic_language_pool` field, planning-layer's section, and the
  visual-planning verification check.
- Fonts / typeface selection: per-preset `fonts` rows, the how-to-apply
  `typography_constraints.font_family`, planning-layer's `font_family`
  field, and visual-planning's font-apply rule. Ablation showed the
  preset fonts almost never landed in the XML `fontFamily` (agents
  defaulted to 思源黑体), so the field was noise.

Added
- `visual_system.layout_system` per preset — a density + layout-system
  description keyed to document type (咨询报告式 / 数据分析型 / 投研画册式 /
  亲和型教学课件 …), sourced from the 生图风格 版式 column. planning-layer
  carries the field; visual-planning maps its density to `text_density`
  and its layout phrase to page grid / column split / whitespace.

Also
- Softened the style-presets read trigger from imperative ("必须 Read")
  to guidance, and forbade deriving colors from topic/industry
  ("浮力→海洋蓝""金融→海军蓝" are unreliable).

Verified (v9, 7 preset cases): 6/7 adopt the preset color at exact-hex and
realize the layout system visually by document type; W18 (data-heavy,
python-gen path) still bypasses the planning layer and is tracked
separately.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 14:26:13 +08:00
zhuyuanbin.gdut
a7c4fd310c refactor(slides): tidy style presets and tighten Style System
- style-presets.md: replace the ⟲ derived-accent marker with `(derived)`,
  switch the `·` separators to commas, and label each preset's fonts by
  role (CJK / Latin / number) so the merged font_family keeps that info.
- planning-layer.md: describe font_family as role-labelled (CJK / Latin /
  number) to match.
- visual-planning.md: condense the Style System section — collapse the
  color_roles table into one line, fold the accent-gap rule into the
  accent role, and drop the redundant theme_style/density/motif restatement
  (kept only the font-application rule).

Ablation confirmed the Chinese color names are load-bearing (kept); font
labelling + the apply rule land Latin/number faces on clean prompts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 14:26:13 +08:00
zhuyuanbin.gdut
c89c8f9c37 fix(slides): apply plan fonts in XML and merge font_number into font_family
Eval found the preset font stack was recorded in slide_plan.json but never
written into the XML fontFamily attribute (5/6 decks defaulted to one face),
because the docs defined the font field but never said to apply it.

- visual-planning.md: add a Style System rule to write font_family into the
  fontFamily attribute of title/body text, and use the stack's mono/emphasis
  face for numeric/metric/big-number text — a font not written to fontFamily
  has no effect.
- planning-layer.md / style-presets.md: fold the separate font_number field
  into a single font_family stack (mono/number face appended), dropping the
  extra schema surface.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 14:26:13 +08:00
zhuyuanbin.gdut
cc8d309601 feat(slides): add reusable style presets and color-role system
Give the slides skill concrete, ready-to-use palettes so the model
references a defined style instead of inventing colors ad hoc.

- Add references/style-presets.md: 7 self-contained palettes (scenario,
  6 color roles, fonts, density, graphic-language pool). Derived accents
  fill the accent-gap where the source palette had no saturated emphasis
  color.
- visual-planning.md: new Style System section defining the six
  color_roles, the accent-gap rule, and color discipline; big-number and
  checklist hooks for role usage.
- planning-layer.md: extend the schema with the three extra color_roles
  (background, text_main, text_sub) and typography font_family/font_number;
  document graphic_language_pool and check_color_role_discipline.
- SKILL.md: point the create workflow at style-presets.md when no brand
  palette is supplied.

Kept self-contained: no internal taxonomy terms; presets are generic
scenario labels usable by any consumer of the skill.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 14:26:13 +08:00
4 changed files with 119 additions and 7 deletions

View File

@@ -81,6 +81,7 @@ lark-cli auth login --domain slides
按需再读:
- 配色:[`style-presets.md`](references/style-presets.md)(用户没给具体颜色时,读它按文档类型选一套)
- 创建:[`lark-slides-create.md`](references/lark-slides-create.md)
- 编辑:[`lark-slides-edit-workflows.md`](references/lark-slides-edit-workflows.md)、[`lark-slides-replace-slide.md`](references/lark-slides-replace-slide.md)、[`lark-slides-replace-pages.md`](references/lark-slides-replace-pages.md)
- 截图:[`lark-slides-screenshot.md`](references/lark-slides-screenshot.md)
@@ -97,7 +98,7 @@ lark-cli auth login --domain slides
不要生成无设计感的幻灯片。纯白背景 + 标题 + bullets 只能作为极简临时稿,不能作为正式交付。
开始写 XML 前,先在 `slide_plan.json` 里确定 deck 级视觉策略:
开始写 XML 前,先在 `slide_plan.json` 里确定 deck 级视觉策略。用户没在 prompt 里给具体颜色/色板hex、品牌色、或明确"用 XX 色")时,优先读 [style-presets.md](references/style-presets.md) 按文档类型挑一套成品配色;尽量不要仅凭主题或行业的固有印象去套色(这类直觉常常不可靠),也不要凭空造色
- **主题化配色**:配色必须服务本次主题、行业和受众,不要默认蓝色商务风。如果把同一套颜色换到另一个完全不同主题仍然成立,说明配色不够具体。
- **主次比例**:选择 1 个主色承担约 60-70% 视觉权重1-2 个辅助色承担结构和分区1 个强调色只用于关键数字、结论或行动点。不要让所有颜色权重相同。

View File

@@ -58,23 +58,29 @@ Exception:
"visual_system": {
"background_strategy": "Content pages use one light base; cover and closing may use a related dark treatment with the same accent system.",
"motif": "A reusable left accent bar and consistent card/header treatments.",
"layout_system": "Deck-wide layout character (density + grid / columns / whitespace / rhythm); copy the matched preset's layout line here. How it drives page geometry: visual-planning.md → Style System.",
"color_roles": {
"primary": "Used for the dominant structural motif and about 60-70% of visual weight.",
"secondary": "Used for grouped regions, comparison panels, or supporting categories.",
"accent": "Used only for key numbers, conclusions, or focus markers."
"accent": "Used only for key numbers, conclusions, or focus markers.",
"background": "Shared base fill for ordinary content pages.",
"text_main": "Body and title text color.",
"text_sub": "Caption, footer, and note text color."
}
},
"typography_constraints": {
"title_max_lines": 2,
"body_max_lines_per_box": 2,
"footer_max_lines": 1,
"long_text_handling": "Shorten, split into multiple boxes, or move detail to speaker notes instead of shrinking into a tight box."
"long_text_handling": "Shorten, split into multiple boxes, or move detail to speaker notes instead of shrinking into a tight box.",
"font_family": "Fonts by role — CJK / Latin / number-emphasis. When a style preset is used, copy its font line here. See visual-planning.md → Style System for how each role is applied to `fontFamily`."
},
"verification_plan": {
"check_background_consistency": true,
"check_text_fit": true,
"check_visual_focus": true,
"check_asset_rendering": true
"check_asset_rendering": true,
"check_color_role_discipline": true
},
"slides": [
{
@@ -103,9 +109,9 @@ Top-level fields:
- `presentation_goal`: what the whole deck is trying to achieve.
- `audience`: target readers or listeners and their assumed background.
- `theme_style`: visual tone, palette direction, and professional style.
- `visual_system`: deck-level visual rules that must stay stable across pages, including background strategy, recurring motif, and color roles.
- `visual_system`: deck-level visual rules that must stay stable across pages, including background strategy, recurring motif, color roles, and `layout_system` (deck density + layout character).
- `typography_constraints`: deck-level limits for line count, text box density, and how to handle long text before XML generation.
- `verification_plan`: explicit checks to perform after creation or major edits; include background consistency, text fit, visual focus, and asset rendering when relevant.
- `verification_plan`: explicit checks to perform after creation or major edits; include background consistency, text fit, visual focus, and asset rendering when relevant. When a fixed palette is used, also set `check_color_role_discipline` (only the 6 role colors are used; `accent` is not overused as large fills).
- `slides`: ordered page plans.
Each slide must include:
@@ -147,6 +153,8 @@ When `chart_contract.required == true`, XML generation must produce a `<chart>`
`data_series_required` means the generated XML must include `<chartData>`. It does not require user-provided real-world values. When real values are unavailable but chart expression is part of the user's intent, write mock or placeholder values into native `<chart>` and label them clearly instead of switching to manual drawing primitives or metric blocks.
A deck's palette and fonts may come from the user, your own design, or an external style library. Whatever the source, resolve it into the six `visual_system.color_roles`; the mapping and the accent-gap rule (derive an emphasis color when none is saturated enough) live in `visual-planning.md` → Style System.
## Layout Vocabulary
Use one of these `layout_type` values unless the user explicitly needs a custom structure:
@@ -182,7 +190,7 @@ Before generating XML, define a visual system that can survive the whole deck:
- `background_strategy`: specify the default background for normal content pages, and which page roles may intentionally differ. Do not let pages drift through near-identical but inconsistent background colors.
- `motif`: choose one or two reusable structural devices, such as a side bar, header rail, numbered node, card treatment, diagram lane, or section band. The motif should appear consistently enough that pages feel related.
- `color_roles`: assign primary, secondary, and accent roles. The same color must not mean unrelated things across pages.
- `color_roles`: assign the six roles — `primary`, `secondary`, `accent`, `background`, `text_main`, `text_sub`. Pages must use only these; the same color must not mean unrelated things across pages. If no sufficiently saturated emphasis color exists, derive one for `accent` (see `visual-planning.md` → Style System).
- `cover_content_relationship`: if the cover uses a different dark or image-led treatment, state how it connects to content pages through shared colors, motifs, or geometry.
- `closing_relationship`: if the closing page mirrors the cover, state that explicitly so it looks intentional rather than like a new theme.

View File

@@ -0,0 +1,89 @@
# Style Presets
Ready-made color + layout + font palettes. When the user does not supply a brand palette, and the deck **genuinely belongs to** one of the preset document types below, pick that preset — match the deck against each preset's **Use-for** line — then copy its values into `slide_plan.json`'s `visual_system.color_roles`, `visual_system.layout_system`, and `typography_constraints.font_family`, and let `visual-planning.md` → Style System govern how colors, layout, and fonts are applied. Do not invent colors when a preset genuinely fits.
Match on what the deck **is** (a data-analysis report, a pitch deck, a lesson…), not on the industry it is about. A finance / bank / government topic does not imply navy or red — resolve it to the document type first (e.g. a bank performance review is a *data-analysis report* → preset 4).
Match literally; do not stretch a preset by loose analogy. A preset's **Use-for** line names a specific document; "it also presents something" or "it also lays out a plan" does not make a deck a fundraising pitch or a business report. **When no preset's Use-for line clearly covers the deck (many personal, lifestyle, or creative decks won't), do not force the nearest one — self-configure a coherent, topic-appropriate palette using the same `color_roles` + `layout_system` + `font_family` framework** (six roles, a density + layout-system line, and CJK / Latin / number fonts).
Each preset fills all six color roles. Where the source palette had no saturated emphasis color, the `accent` was derived per the accent-gap rule and is marked `(derived)`; every preset is ready to use as-is.
## Presets
Each preset is self-contained: scenario heading, tone + density, the six color roles, a layout system, and fonts. Pick one, copy its values into the plan (shape shown in *How to apply*).
### 1. Investment / industry research report
*Use for: industry research reports, market / sector studies, investment & due-diligence reports*
*Tone: minimal, professional, data-driven, authoritative-restrained, Density: mediumhigh*
- **colors** — primary `#415A77` steel blue, secondary `#0D1B2A` deep navy, accent `#2E6FB0` (derived) bright steel blue, background `#F3F4F6` cool white, text_main `#0D1B2A`, text_sub `#6B7788` blue-gray
- **layout** (`layout_system`) — high density · consulting-report layout system: 12-column grid, thin dividers, data tables and chart pages; fixed header / page-number / section-number / annotation zones; rational, clear, review-ready rhythm
- **fonts** (`font_family`) — CJK 思源黑体, 思源宋体; Latin Inter, IBM Plex Sans; number Roboto Mono
### 2. Government / party work summary
*Use for: party-building summaries, policy interpretation, corporate-policy rollouts, government reporting*
*Tone: clean, dignified, credible, warm, low-saturation civic, Density: medium*
- **colors** — primary `#C0453D` brick red, secondary `#D4B15C` gold, accent `#D4B15C` gold, background `#F7F3EE` warm ivory, text_main `#333333` charcoal, text_sub `#7A756F` warm gray
- **layout** (`layout_system`) — medium density · modern civic-brochure layout system: cover uses a large color block + strong title, content pages use left/right zoning, regular grids, and clear whitespace; emphasize information hierarchy and a dignified, humane tone; avoid the traditional red-and-gold pile-up
- **fonts** (`font_family`) — CJK 思源黑体, 寒蝉德黑体; Latin Inter, Libre Franklin; number Rajdhani
### 3. Pitch deck / business plan
*Use for: fundraising pitches, business plans, project roadshows*
*Tone: minimal, premium, international, strategic, composed, Density: lowmedium*
- **colors** — primary `#415A77` steel blue, secondary `#0D1B2A` deep navy, accent `#2E6FB0` (derived) bright steel blue, background `#F5F6F8` cool white, text_main `#0D1B2A`, text_sub `#5F6F82` blue-gray
- **layout** (`layout_system`) — lowmedium density · premium business-brochure layout system: large titles, generous whitespace, color-block zoning, and small layout swatches throughout; section pages feel more brand-led, content pages keep a restrained business-narrative rhythm
- **fonts** (`font_family`) — CJK 思源宋体, 思源黑体; Latin Playfair Display, Inter; number Oswald
### 4. Market / data analysis
*Use for: data-analysis reports, market / competitor analysis, operations / performance / KPI analysis*
*Tone: clean, data-driven, analytical, credible, Density: mediumhigh*
- **colors** — primary `#3D6B63` gray-green, secondary `#0F1720` dark blue-black, accent `#1F9E7A` (derived) bright green, background `#F7F7F5` warm white, text_main `#0F1720`, text_sub `#6B7280` neutral gray
- **layout** (`layout_system`) — mediumhigh density · data-analysis layout system: topic narrative on the left, charts / key points / components / swatch modules on the right; an "insight → data → conclusion" rhythm; clearly zoned but not crowded
- **fonts** (`font_family`) — CJK 寒蝉德黑体, 思源黑体; Latin Inter, IBM Plex Sans; number Roboto Mono
### 5. Equity research
*Use for: single-stock / equity investment analysis, sell-side research, valuation reports*
*Tone: high-end research, calm, data-oriented, elite, Density: high*
- **colors** — primary `#348271` peacock green, secondary `#0D1B2A` deep navy, accent `#2FA98D` (derived) bright teal-green, background `#F6F8FA` cool white, text_main `#0D1B2A`, text_sub `#6B7A8A` blue-gray
- **layout** (`layout_system`) — high density · equity-research brochure layout system: large titles balanced with data charts, ample whitespace and refined columns; a core rhythm around metrics / trends / valuation / judgment; a professional review feel
- **fonts** (`font_family`) — CJK 思源宋体, 思源黑体; Latin Playfair Display, Inter; number Roboto Mono
### 6. Course design / lesson plan
*Use for: course design, course reports, lesson plans*
*Tone: clear, focused, learner-centered, structured, modern-teaching, Density: medium*
- **colors** — primary `#3B82F6` soft blue, secondary `#10B981` soft green, accent `#10B981` soft green, background `#FAFAFA` cool white, text_main `#1E293B`, text_sub `#64748B` slate gray
- **layout** (`layout_system`) — medium density · instructional-design-handbook layout system: large titles, clear zoning, regular grids, componentized explanations; organized around "objective → structure → activity → feedback"; emphasize actionability and low cognitive load
- **fonts** (`font_family`) — CJK 思源黑体, 霞鹜 975 圆体; Latin Inter, Nunito Sans; number Roboto Mono
### 7. Teaching slides
*Use for: teaching slides, grade-level courseware*
*Tone: fresh, friendly, academic-approachable, youthful, global, Density: lowmedium*
- **colors** — primary `#8FE3F9` sky blue, secondary `#CDEFD9` mint green, accent `#FFE7A3` cream yellow, background `#FAF7F2` warm white, text_main `#2F2F2F` charcoal, text_sub `#6B7280` warm gray
- **layout** (`layout_system`) — lowmedium density · modular-classroom-courseware layout system: large titles, light-color knowledge cards, rounded containers, and clear numbering throughout; section / course-overview / content / comparison / flow / summary pages form a complete teaching rhythm; ample whitespace, emphasizing readability, approachability, and a classroom-guidance feel
- **fonts** (`font_family`) — CJK 思源黑体, 寒蝉全圆体; Latin Poppins, Quicksand; number Nunito Sans
## How to apply
Copy the matched row into the plan. Example using preset 1:
```json
{
"theme_style": "minimal, professional, data-driven, authoritative-restrained",
"visual_system": {
"color_roles": {
"primary": "#415A77", "secondary": "#0D1B2A", "accent": "#2E6FB0",
"background": "#F3F4F6", "text_main": "#0D1B2A", "text_sub": "#6B7788"
},
"background_strategy": "content pages on #F3F4F6; cover/divider on #0D1B2A dark block reusing the steel-blue motif",
"motif": "low-saturation blocks + section tags + thin dividers + page-number system",
"layout_system": "high density · consulting-report layout system: 12-column grid, thin dividers, data tables and chart pages; fixed header / page-number / section-number / annotation zones; rational, clear, review-ready rhythm"
},
"typography_constraints": {
"font_family": "CJK 思源黑体, 思源宋体; Latin Inter, IBM Plex Sans; number Roboto Mono"
}
}
```
Notes:
- Presets are starting points, not mandates. If the user gives brand colors, use those and skip the preset.
- Accents marked `(derived)` were synthesized per the accent-gap rule; if the user later supplies a real emphasis color, replace it.

View File

@@ -4,6 +4,16 @@
默认画布按 `960 x 540` 规划。模板 XML 可以覆盖具体坐标,但不能覆盖这些原则:页面要有主视觉区域、文本要受密度约束、不同 `layout_type` 必须产生明显不同的坐标结构。
## Style System
- Style comes from `slide_plan.json`'s `visual_system` + `typography_constraints`. When the user hasn't specified concrete colors (hex, a brand palette, or "use color X"), pick a matching preset from [`style-presets.md`](style-presets.md) when the deck genuinely fits one of its document types; if none fits, self-configure a coherent palette rather than forcing the nearest preset (and don't fall back to a topic's or industry's stereotypical color, which is an unreliable basis). Resolve any palette into the six color roles and use only those on the page.
- color_roles: `primary` (dominant, ~60-70% weight — motif / header / title line), `secondary` (grouping, chart base), `accent` (key numbers / conclusions only, never confusable with `secondary`; if the palette has no saturated emphasis color, derive one from `primary`), `background` (content-page base), `text_main` (body & titles), `text_sub` (captions / footer / notes).
- `visual_system.layout_system` sets the deck's layout character: its density (低/中/高) informs the default `text_density`, and its layout-system phrase (e.g. 咨询报告式 12 栏网格 / 数据分析型左叙事右图表 / 亲和型大字号宽留白) guides the page structure, grid, column split, and whitespace. Content pages should generally follow it in their geometry rather than defaulting to a plain title+bullets layout; covers, dividers, and closings may deviate when the page role calls for it.
- `typography_constraints.font_family` lists fonts by role — a CJK set, a Latin set, and a number-emphasis face (each set is primary + fallback). `fontFamily` holds exactly one font (it is not a comma list). Assign the font by what the text is, and set it on the text you generate rather than relying on the default face — this holds on create, `+replace-slide`, and `+replace-pages` alike:
- CJK-dominant text (titles, body, captions) → set the shape's `fontFamily` to the CJK face.
- number-forward elements (big numbers, KPI / metric values, key data callouts) → set that shape's `fontFamily` to the number-emphasis face.
- a focal number or Latin term inside a CJK sentence → wrap just that run in `<span fontFamily="…">` with the number/Latin face; leave incidental digits in the CJK face.
## Core Rules
- `layout_type` must change geometry: element positions, region sizes, alignment, and visual rhythm must differ across page types.
@@ -134,6 +144,7 @@ Geometry:
- Set `autoFit="normal-auto-fit"` on the metric's `<content>` so an oversized number shrinks to fit its box instead of overflowing.
- Pair the number with one explanation and optional 2-3 small supporting labels.
- Do not bury the number in a bullet list or small card.
- Color: the large number uses `accent` (highest contrast on the page, never `secondary`); explanatory text uses `text_sub`. If accent is missing, use a darker variant of `primary`.
Text:
- `low` or `medium`. If detail is needed, add small annotations around the metric.
@@ -244,6 +255,9 @@ Before creating XML for each page, answer these checks:
6. Does the background follow the planned deck strategy, and are any deviations intentional?
7. Are all text boxes large enough for their intended font size and line count?
8. If the page uses a screenshot or paper figure, is it large enough to read and accompanied by concise interpretation?
9. Does the page use only the six `visual_system.color_roles`, with no ad-hoc colors?
10. Is `accent` used only for key numbers / conclusions, never as a large fill?
11. Is the motif consistent deck-wide?
After fetching the created presentation, verify: