From fdcf285007e15aab44ee1482fe8341fa3973fe0d Mon Sep 17 00:00:00 2001 From: "songtianyi.theo" Date: Wed, 8 Jul 2026 21:01:20 +0800 Subject: [PATCH] feat: harden svg slides generation receipts --- .../prompt-sources/svg-slides/README.md | 12 + .../svg-slides}/full.debranded.md | 38 +-- .../svg-slides}/split-manifest.json | 4 +- .../references/svg-slides/README.md | 24 +- .../deck-design-reference-catalog.md | 7 - .../svg-slides/generate-svg-chart/README.md | 4 - .../chart-agent-contract.md | 4 - .../generate-svg-chart/design-envelope.md | 4 - .../svg-slides/generate-svg-chart/full.md | 7 - .../generate-svg-chart/input-schema.md | 4 - .../snippets/100-percent-indicator.md | 4 - .../generate-svg-chart/snippets/README.md | 49 ++- .../snippets/above-cluster-group-title.md | 4 - .../snippets/axis-break-marker.md | 4 - .../snippets/bottom-multi-column-legend.md | 4 - .../generate-svg-chart/snippets/cagr-arrow.md | 4 - .../snippets/category-span-bracket.md | 4 - .../snippets/column-divider.md | 4 - .../snippets/delta-badge.md | 4 - .../snippets/ellipse-callout.md | 4 - .../snippets/endpoint-difference-bracket.md | 4 - .../generate-svg-chart/snippets/error-bar.md | 4 - .../snippets/mini-legend-pair.md | 4 - .../snippets/quadrant-guides.md | 4 - .../generate-svg-chart/snippets/range-band.md | 4 - .../snippets/secondary-metric-overlay.md | 4 - .../snippets/series-connector.md | 4 - .../snippets/slice-breakout.md | 4 - .../snippets/total-difference-arrow.md | 4 - .../snippets/triangle-pointer.md | 4 - .../generate-svg-chart/snippets/value-line.md | 4 - .../snippets/vertical-bracket-measurement.md | 4 - .../snippets/waterfall-connector.md | 4 - .../generate-svg-chart/tool-description.md | 4 - .../svg-slides/resolve-design-brief/README.md | 4 - .../design-director-prompt.md | 4 - .../svg-slides/resolve-design-brief/full.md | 19 +- .../style-director-prompt.md | 16 +- .../resolve-design-brief/tool-contract.md | 4 - .../references/svg-slides/svg-reference.md | 7 - .../references/svg-slides/system-prompt.md | 27 +- .../svg-slides/tools/activate-slides-edit.md | 7 - .../tools/compute-custom-shape-bbox.md | 7 - .../svg-slides/tools/finish-slides-edit.md | 7 - .../svg-slides/tools/slide-organize.md | 7 - .../svg-slides/tools/slide-outline.md | 7 - .../svg-slides/tools/slides-convert.md | 7 - .../svg-slides/tools/slides-edit.md | 13 +- .../svg-slides/tools/slides-parse-template.md | 7 - .../svg-slides/validation/README.md | 7 +- .../svg-slides/validation/asset-readiness.md | 72 +++++ .../validation/prompt-read-trace.md | 5 - .../svg-slides/validation/source-coverage.md | 16 +- .../svg-slides/validation/typography-plan.md | 36 +++ .../scripts/svg_slides_asset_readiness.mjs | 284 +++++++++++++++++ .../svg_slides_asset_readiness_test.mjs | 301 ++++++++++++++++++ .../lark-slides/scripts/svg_slides_bundle.mjs | 26 +- .../scripts/svg_slides_bundle_test.mjs | 154 +++++++-- .../scripts/svg_slides_extract_references.mjs | 246 ++++++++++---- .../svg_slides_extract_references_test.mjs | 67 ++-- .../scripts/svg_slides_prompt_trace.mjs | 13 +- .../scripts/svg_slides_prompt_trace_test.mjs | 68 ++-- .../svg_slides_source_coverage_check.mjs | 95 +++--- .../svg_slides_source_coverage_check_test.mjs | 63 ++-- .../scripts/svg_slides_typography_plan.mjs | 179 +++++++++++ .../svg_slides_typography_plan_test.mjs | 92 ++++++ .../svg_slides_visual_identity_check.mjs | 101 ++++++ .../svg_slides_visual_identity_check_test.mjs | 79 +++++ 68 files changed, 1762 insertions(+), 534 deletions(-) create mode 100644 skills/lark-slides/prompt-sources/svg-slides/README.md rename skills/lark-slides/{references/svg-slides/source => prompt-sources/svg-slides}/full.debranded.md (97%) rename skills/lark-slides/{references/svg-slides/source => prompt-sources/svg-slides}/split-manifest.json (94%) create mode 100644 skills/lark-slides/references/svg-slides/validation/asset-readiness.md create mode 100644 skills/lark-slides/references/svg-slides/validation/typography-plan.md create mode 100644 skills/lark-slides/scripts/svg_slides_asset_readiness.mjs create mode 100644 skills/lark-slides/scripts/svg_slides_asset_readiness_test.mjs create mode 100644 skills/lark-slides/scripts/svg_slides_typography_plan.mjs create mode 100644 skills/lark-slides/scripts/svg_slides_typography_plan_test.mjs create mode 100644 skills/lark-slides/scripts/svg_slides_visual_identity_check.mjs create mode 100644 skills/lark-slides/scripts/svg_slides_visual_identity_check_test.mjs diff --git a/skills/lark-slides/prompt-sources/svg-slides/README.md b/skills/lark-slides/prompt-sources/svg-slides/README.md new file mode 100644 index 000000000..92811a80d --- /dev/null +++ b/skills/lark-slides/prompt-sources/svg-slides/README.md @@ -0,0 +1,12 @@ +# SVG Slides Prompt Sources + +This directory is the maintainer-only source for the SVG Slides runtime references. + +Do not read these files while generating or editing a deck. Runtime agents should read `skills/lark-slides/references/svg-slides/` instead. + +When changing prompt behavior: + +1. Edit `full.debranded.md` and `split-manifest.json` here. +2. Run `node skills/lark-slides/scripts/svg_slides_extract_references.mjs`. +3. Run the SVG Slides tests and source coverage check. + diff --git a/skills/lark-slides/references/svg-slides/source/full.debranded.md b/skills/lark-slides/prompt-sources/svg-slides/full.debranded.md similarity index 97% rename from skills/lark-slides/references/svg-slides/source/full.debranded.md rename to skills/lark-slides/prompt-sources/svg-slides/full.debranded.md index bedd46852..169d5bc2f 100644 --- a/skills/lark-slides/references/svg-slides/source/full.debranded.md +++ b/skills/lark-slides/prompt-sources/svg-slides/full.debranded.md @@ -72,21 +72,21 @@ When you do present it, call `show_form` ONCE with `meta.form_purpose: "outline_ Slide count rule for this outline: the proposed outline is the actual slide sequence, not a chapter list. Use the user's explicit page count when given. Otherwise, default to 8-12 slides for normal requests. Do not plan fewer than 8 slides unless the user explicitly asks for a short / concise deck. Broad topic-only requests such as F1 introductions, financial analysis, product comparisons, or design guides still need 8-12 substantive slides with concrete material, not 5-6 generic chapters. ### Phase 6 — Write slide_content.md -Write a `slide_content.md` structural outline to the project directory, **following the brief's `narrative_spine` for the narrative arc and each slide's role, and its `depth` directive for how much material each slide carries**: the key material (data points, claims, quotes) with source references. This is the content plan, NOT final wording — exact text, layout, and visuals are decided when writing each slide. It is also delivered to the user so they can reference sections when requesting changes. -What it should NOT lock in: exact final sentences, image file paths, or chart layout details. +Write a `slide_content.md` structural outline to the project directory, **following the brief's `narrative_spine` for the narrative arc and each slide's role, and its `depth` directive for how much material each slide carries**: the key material (data points, claims, quotes) with source references. For every slide, include `slide_role`, `key_message`, `visual_job`, `primary_visual_required`, `visual_subject`, `source_strategy`, and `expected_asset_kind`; cover, section-divider, closing, and key-showcase slides require an expressive primary visual plan. +What it should NOT lock in: exact final sentences, image file paths, or chart layout details. It SHOULD lock the conceptual visual subject and why the visual supports the slide's key message, so asset preparation cannot become decorative afterthought. ### Phase 7 — Lock the visual direction & plan visuals The design brief's `visual_system` is AUTHORITATIVE for the look — do NOT override it with your own taste. Translate it (resolved in Phase 4) into the concrete `style_instruction` you pass to {{.ToolSlideOutline}}: - `aesthetic_direction`: the visual_system's design language + mood, verbatim in spirit. - `color_palette`: realize the visual_system's color system (its hues + roles), not your own. -- `typography`: MATCH the visual_system's typography — keep its font **category and treatment** (serif vs sans-serif vs rounded vs mono, weight, UPPERCASE + letter-spacing) exactly. When mapping to fonts, choose from `` when present; otherwise use the Font Palette in ``. Pick a font in the SAME category (e.g. if the visual_system specifies a sans-serif uppercase display, pick a sans-serif display font — do NOT substitute a serif like Playfair; do NOT flip serif↔sans). Never re-pick fonts from your own editorial intuition; never the banned generic fonts. -This becomes the deck's locked style — carry its `aesthetic_direction`, `color_palette`, and `typography` consistently across EVERY slide. -Then plan visuals per slide — images AND charts together: how many images each needs and what aspect ratio, and for every slide whose point rests on a real quantitative data series (trend, multi-category comparison, part-to-whole split, distribution, 2D positioning) a chart. These are generated as assets BEFORE slide_edit, the same as images: once {{.ToolSlideOutline}} has created the project, call {{.ToolGenerateSvgChart}} for every planned chart (dispatch all together in one turn); slide_edit then embeds each returned `.svg` by ``. A real data series goes through this tool — never hand-draw it from primitives. (See and .) +- `typography`: MATCH the visual_system's typography — keep its font **category and treatment** (serif vs sans-serif vs rounded vs mono, weight, UPPERCASE + letter-spacing) exactly. When mapping to fonts, choose from `` when present; otherwise use the Font Palette in ``. Pick a font in the SAME category (do NOT substitute serif↔sans or rounded↔formal). Write `receipts/typography_plan.json` with `version`, `font_category`, `display_font`, `body_font`, `label_font`, `source`, `selection_reason`, `forbidden_substitutions`, and `runtime_candidates_used`; never re-pick fonts from your own editorial intuition or banned generic fonts. +This becomes the deck's locked style — carry its `aesthetic_direction`, `color_palette`, `typography`, and `typography_plan` consistently across EVERY slide. +Then plan visuals per slide — images AND charts together: how many images each needs, what aspect ratio, which named entities require web image search, and which pages are cover / section-divider / closing / key-showcase. Write `receipts/asset_readiness.json` with a deck-level `visual_identity_fingerprint`, required search entities, prepared local assets, asset `purpose` / `asset_kind` / `expressive_role` / `content_relevance` / `format`, and per-slide `slide_role` / `visual_tier` / `primary_visual_required` / `primary_visual` / `layout_family` / `text_overlay` / `mask_required` / `mask_strategy` before slide_edit; in multi-deck/team runs, compare sibling fingerprints and do not reuse the same style family + composition signature. Once {{.ToolSlideOutline}} has created the project, call {{.ToolGenerateSvgChart}} for every planned chart (dispatch all together in one turn); slide_edit then embeds each returned `.svg` by ``. A real data series goes through this tool — never hand-draw it from primitives. (See and .) ### Phase 8 — Generate & deliver 1. **{{.ToolSlideOutline}}** — pass the confirmed outline (main_title, pages, and the style_instruction locked in Phase 7). Creates the project directory, `outline.json`, style, and one empty `.svg` per slide. The language of your arguments sets the slide language. IMPORTANT: it overwrites ALL slide files — never call it again after slides are written (use {{.ToolSlideOrganize}} to add/delete pages later). 2. **{{.ToolActivateSlidesEdit}}** — call immediately after slide_outline, before any slide_edit. Pass `project_dir`. This switches to a faster model optimized for slide writing. -3. **{{.ToolSlideEdit}}** — write each slide as a COMPLETE SVG document following ``. In `content_thinking`, state the layout intent, which visual assets you'll use, AND the animation decision for this slide (its build order, or `static`) per ``. Compose freely (no canned templates). Slides display incrementally as each completes. Add a per-slide build sequence and/or the deck's one page transition where it earns its place (see `` for when / how much; the elements are defined in ``). +3. **{{.ToolSlideEdit}}** — write each slide as a COMPLETE SVG document following `` only after the slide's searched/generated local assets exist and are recorded in `asset_readiness.json`, and the locked font stacks are recorded in `typography_plan.json`. In `content_thinking`, state `slide_role`, key message, primary visual path, why the visual supports the message, text-overlay / mask strategy, layout intent, visual assets, typography role, and the animation decision for this slide (its build order, or `static`) per ``. Compose freely (no canned templates). Slides display incrementally as each completes. Add a per-slide build sequence and/or the deck's one page transition where it earns its place (see `` for when / how much; the elements are defined in ``). 4. **{{.ToolFinishSlidesEdit}}** — call after all slides are written; restores the default model. 5. **Deliver** — the deck is complete; the UI shows it automatically (do not re-summarize slide content). Share the `slide_content.md` path and remind the user they can edit in the editor or request changes in chat. @@ -108,15 +108,15 @@ Modifying structure after creation: add pages via {{.ToolSlideOrganize}} "add" ( -Visuals re-engage attention and carry meaning. Plan them deliberately; don't decorate. +Visuals re-engage attention and carry meaning. Plan them deliberately; don't decorate. Key pages need images that carry the idea or emotion, not just any asset. - **Image sourcing priority**: 1. **Generation (default)** — exact aspect ratios, palette-consistent, any ratio on demand. Best for abstract concepts, backgrounds, conceptual illustrations, non-standard ratios. Describe the concrete subject first, then add the deck's palette/mood as style qualifiers. - 2. **Search** ({{.ToolAssignImageSearchAgent}}) — ONLY for specific identifiable real-world entities (a named product, landmark, company). Do not search for logos. + 2. **Search** ({{.ToolAssignImageSearchAgent}}) — REQUIRED for specific identifiable real-world entities (a named product, landmark, company, person, place, artwork, paper, or venue). Do not search for logos; record the query/outcome in `asset_readiness.json` even when search fails and generation fallback is used. 3. **Search + generation refinement** — when search has the right subject but wrong ratio/tone, use it as an image-to-image reference. -- NEVER crop to force a ratio — generate at the exact ratio. Every content image should be unique across slides; backgrounds may repeat for consistency. +- NEVER crop to force a ratio — generate at the exact ratio. Every content image should be unique across slides; backgrounds may repeat for consistency. Cover, section-divider, closing, and key-showcase slides require a strong primary visual; abstract geometry, icons, pale textures, and pure decorative backgrounds do not satisfy that requirement. - **Aspect ratio**: informational images (charts, diagrams, screenshots, infographics) MUST preserve their original ratio — extract dimensions from the filename pattern `image_w{W}_h{H}_...` and size the SVG `` to match. Decorative photos may be composed freely. - **SVG elements** (see `` for full attributes): place an image with `` (a single `` element — never wrapped in ``); set a full-bleed slide background image with ``. -- **Cover/closing**: prefer generation for style consistency (search only for a specific subject). Generated images must contain NO baked-in text — typography is rendered by the slide on top. Match the image's composition to the chosen cover layout (full-bleed background vs. a positioned image zone vs. no image). +- **Hero/key pages**: cover, section-divider, closing, and key-showcase pages must use a primary visual as the layout core (full-bleed hero, large image zone, dominant screenshot/document capture, or editorial crop). Use PNG/JPG/WebP for photographic, product, people, store, screenshot, or document-capture assets; SVG is for charts, icons, line decorations, and self-drawn diagrams. If text sits on a hero image, add a concrete `slide:role="text-scrim"` or `slide:role="image-mask"` overlay, gradient mask, or safe text zone so the image has impact and the text remains readable. @@ -898,7 +898,7 @@ The deliverable is one **Style Deconstruction** document with 7 design dimension ## Core principles 1. **Anchor to the user's explicit asks, then design a coherent direction for the topic.** If the user stated a palette / mood / font feel, honor it exactly and build the rest around it. Otherwise, choose a distinctive, topic-appropriate direction — do NOT default to a generic corporate look. -2. **Commit to ONE distinctive, deconstructable style.** Pick a clear visual language (e.g. editorial poster, brand system, magazine layout, cinematic photography treatment) and deconstruct it concretely. Avoid a vague mash-up. +2. **Commit to ONE distinctive, deconstructable style.** Pick a clear visual language (e.g. editorial poster, brand system, magazine layout, cinematic photography treatment) and deconstruct it concretely. Avoid a vague mash-up; in multi-deck/team runs, make this style intentionally different from sibling decks and name a stable `visual_identity_fingerprint`. 3. **Deconstruct to buildable granularity.** Each dimension must be concrete enough to directly guide implementation (hex values, font categories, ratios) — not vague adjectives. 4. **Visual style only — never content decisions.** A Style Deconstruction describes "what this design looks like" (color, type, material, decoration), NOT "how content is organized" (how much info per slide, density, information architecture). The same visual style can carry wildly different content densities — a black-white-red minimalist style is one big image per page on a product site, but dense charts and data tables on a financial review. Information architecture is decided by the content itself, not constrained by the visual style. 5. **Aim ABOVE the obvious default.** Whatever treatment first comes to mind for a topic is the training-data median — the on-the-nose cliché that reads as generic AI slop. Treat your first instinct as the floor to rise above, not the answer. Sophistication comes from **restraint and intention** — a confident, slightly-unexpected palette; editorial typography as the hero; deliberate negative space; real material/print references; precise composition and alignment — **never from applied "effects" or manufactured atmosphere**. Glows, spotlights, ambient haze, and gratuitous gradients are not design; they are the absence of it — a page's mood must come from its color, type, and composition, not from a light effect layered on top. When a direction feels like the expected look for this topic, push to something more specific and more restrained — that is the line between *designed* and *generated*. @@ -962,12 +962,12 @@ This describes visual composition technique ONLY, NOT content density or informa Do NOT write density / architecture constraints in this dimension (no "one data point per slide" / "lots of whitespace"). Those are information-architecture decisions, decided by the content, not part of visual style. -#### Dimension 4: Imagery treatment +#### Dimension 4: Imagery treatment and imagery_system - **Image type**: photo / illustration / icon / vector / 3D / chart - **Color treatment**: original / desaturated / monochrome / duotone - **Texture**: halftone / blur / grain / none - **Cropping**: regular crop / shaped crop / bleed / cut-out -- **Relationship to text**: image-text separated / overlaid / image as background +- **Relationship to text**: image-text separated / overlaid / image as background; also define an `imagery_system` with `hero_treatment`, `key_page_visual_rule`, `small_image_format_preference` (png/jpg/webp for photos, products, people, stores, screenshots, document captures), `image_text_relationship`, `mask_strategy`, and `primary_visual_do_not_use` (icons, abstract geometry, low-opacity texture, decorative patterns) #### Dimension 5: Material & texture - **Surface quality**: clean flat / paper texture / noise / metallic / matte, etc. @@ -1003,8 +1003,8 @@ Output one Markdown document (no code fences), in the deck's language (Chinese w [fill per Dimension 2 — give concrete Chinese font names] ### 3. Layout language [fill per Dimension 3] -### 4. Imagery treatment -[fill per Dimension 4] +### 4. Imagery treatment and imagery_system +[fill per Dimension 4, including the explicit `imagery_system` fields] ### 5. Material & texture [fill per Dimension 5] ### 6. Decoration language @@ -1017,7 +1017,7 @@ Output one Markdown document (no code fences), in the deck's language (Chinese w ## Quality check Verify all items before output: -- [ ] All 7 dimensions filled, no gaps +- [ ] All 7 dimensions filled, no gaps, including the explicit `imagery_system` fields under Dimension 4 - [ ] The visual direction honors the user's explicit color / mood / font asks from the conversation (if any) - [ ] Color system has concrete hex values, not a vague "warm tone" - [ ] Typography has concrete categories (serif / sans / handwriting) + concrete Chinese font names, not "a nice font" @@ -1288,7 +1288,7 @@ A text-only slide with decorative shapes signals skipped preparation. It is rare ## Image usage - NEVER reference a non-existent or non-local image. Always use absolute paths for images, fonts, and other resources. -- Use ONLY the image path(s) prepared for the slide (to avoid duplicates). Place content images with concrete subjects (UI mockups, illustrations) as `` in a split or side layout — do not fade them to low opacity and use as full-screen backgrounds, which creates ghost-like visual noise behind foreground content. +- Use ONLY the image path(s) prepared for the slide and recorded in `receipts/asset_readiness.json` (to avoid duplicates), including any declared `primary_visual`. Place content images with concrete subjects (photos, products, people, stores, screenshots, document captures, UI mockups, illustrations) as ``; small photographic assets should be PNG/JPG/WebP. SVG is for charts, icons, line decorations, and self-drawn diagrams, not a substitute for searched/generated bitmap imagery. ## Incremental processing - Slides are written and displayed as soon as each one is complete. @@ -1299,7 +1299,7 @@ A text-only slide with decorative shapes signals skipped preparation. It is rare Compose every slide's layout from scratch to fit its specific content and the deck's aesthetic direction — follow "Design Thinking", "Aesthetic Guidelines", and "Layout Freedom" in ``. Do NOT rotate through a fixed menu of canned patterns, and do NOT apply formulaic "diagram" templates — that produces the template-stamped feel we are avoiding. Favor unexpected, asymmetric, content-specific composition: overlap, diagonal flow, grid-breaking elements, a single dominant hero element, generous negative space. Vary the structural arrangement between adjacent slides while keeping the deck's background, card-surface style, and decoration density CONSTANT across the whole deck. -Use visual elements (shapes, lines, icons, accent bars, gradients) to break up text and build hierarchy; apply the accent color sparingly for emphasis; maintain white space and contrast. When text sits on a background image, overlay the image with a semi-transparent shape first so the text stays readable. +Use visual elements (shapes, lines, icons, accent bars, gradients) to break up text and build hierarchy; apply the accent color sparingly for emphasis; maintain white space and contrast. When text sits on a background image, add a concrete readable overlay (`slide:role="text-scrim"`), image mask (`slide:role="image-mask"`), gradient, or safe text zone first so the text stays readable. @@ -1317,7 +1317,7 @@ Use visual elements (shapes, lines, icons, accent bars, gradients) to break up t Before writing the SVG, use the `content_thinking` parameter to document: -1. **Visual assets**: which images/charts you will use (list file paths). If none are available, the slide is missing preparation — go prepare visuals first. +1. **Visual assets**: the slide_role, primary visual path when required, which images/charts you will use (list file paths and the asset_readiness entry), why the primary visual supports the key message, and whether text overlays require a mask/scrim. If none are available, the slide is missing preparation — go search/generate/download visuals first. 2. **Layout**: what composition best fits this content, and how it differs from adjacent slides. 3. **Key message**: the ONE takeaway, and how typography and spacing emphasize it. 4. **Data visualization**: can any content be shown as a chart or large stat number instead of text? diff --git a/skills/lark-slides/references/svg-slides/source/split-manifest.json b/skills/lark-slides/prompt-sources/svg-slides/split-manifest.json similarity index 94% rename from skills/lark-slides/references/svg-slides/source/split-manifest.json rename to skills/lark-slides/prompt-sources/svg-slides/split-manifest.json index 2a9ecab07..0cf541aa5 100644 --- a/skills/lark-slides/references/svg-slides/source/split-manifest.json +++ b/skills/lark-slides/prompt-sources/svg-slides/split-manifest.json @@ -1,8 +1,8 @@ { "version": "svg-slides.split-manifest.v1", - "source": "skills/lark-slides/references/svg-slides/source/full.debranded.md", + "source": "skills/lark-slides/prompt-sources/svg-slides/full.debranded.md", "source_export": "/Users/bytedance/Documents/Codex/2026-07-01/https-bytedance-larkoffice-com-docx-kncld7xr5ohwonxhksncz3lxnvd/outputs/lark_doc_KnCLd7xr5ohWONxhKsncZ3Lxnvd/full.debranded.md", - "source_role": "provenance_and_coverage_authority_not_default_runtime_context", + "source_role": "maintainer_prompt_source_not_runtime_generation_context", "sections": [ { "id": "title", diff --git a/skills/lark-slides/references/svg-slides/README.md b/skills/lark-slides/references/svg-slides/README.md index bfaeb0813..b31e5ab79 100644 --- a/skills/lark-slides/references/svg-slides/README.md +++ b/skills/lark-slides/references/svg-slides/README.md @@ -1,6 +1,8 @@ # SVG Slides Local Generation -This reference family is generated from `source/full.debranded.md` and organized by runtime unit. +This directory is the runtime reference contract for local SVG Slides generation. + +Do not use maintainer prompt-source files as generation context. Runtime agents should follow the read routes below. ## Read Routes @@ -9,9 +11,11 @@ This reference family is generated from `source/full.debranded.md` and organized | Understand the main SVG Slides workflow | `system-prompt.md` | `svg-reference.md`, `tools/slides-edit.md` | | Author or repair SVG protocol content | `svg-reference.md` | `tools/slides-edit.md`, `tools/compute-custom-shape-bbox.md` | | Resolve deck design direction | `resolve-design-brief/README.md` | `deck-design-reference-catalog.md` | +| Choose or audit typography | `resolve-design-brief/style-director-prompt.md` | `system-prompt.md`, `svg-reference.md`, `validation/typography-plan.md` | | Generate or revise charts | `generate-svg-chart/README.md` | matching files under `generate-svg-chart/snippets/` | | Continue or convert an existing deck | `tools/slides-convert.md` | `tools/slide-organize.md`, `tools/slides-edit.md` | -| Audit source coverage | `validation/source-coverage.md` | `source/split-manifest.json`, `source/full.debranded.md` | +| Prove asset search/readiness | `validation/asset-readiness.md` | `../../../scripts/svg_slides_asset_readiness.mjs`, `../../../scripts/svg_slides_visual_identity_check.mjs` | +| Prove typography planning | `validation/typography-plan.md` | `../../../scripts/svg_slides_typography_plan.mjs` | | Prove prompt reads for a generated deck | `validation/prompt-read-trace.md` | `../../scripts/svg_slides_prompt_trace.mjs` | ## Boundary @@ -22,10 +26,16 @@ Local SVG Slides generation and validation produce local artifacts. Publishing t Every generated local bundle must include `receipts/prompt_read_trace.json` before `manifest.json` may set `publish_ready=true`. -The trace records the prompt/reference Markdown files read for the generation task, including path, role, reason, source lines, and SHA-256. +The trace records the runtime prompt/reference Markdown files read for the generation task, including path, role, reason, and SHA-256. -## Source Coverage +## Asset Readiness Gate -- Covers manifest sections: title -- Source lines: 1-1 -- Coverage mode: routing entry; executable content lives in the linked runtime-unit files. +Every generated local bundle must include `receipts/asset_readiness.json` before `manifest.json` may set `publish_ready=true`. + +The receipt records the deck's visual identity fingerprint, required image-search entities, prepared local assets, and per-slide layout families. + +## Typography Plan Gate + +Every generated local bundle must include `receipts/typography_plan.json` before `manifest.json` may set `publish_ready=true`. + +The receipt records the deck's selected font category, display/body/label stacks, source, and rejected substitutions. Slide SVG text must use only those planned stacks. diff --git a/skills/lark-slides/references/svg-slides/deck-design-reference-catalog.md b/skills/lark-slides/references/svg-slides/deck-design-reference-catalog.md index 9c0c6da65..0c6452136 100644 --- a/skills/lark-slides/references/svg-slides/deck-design-reference-catalog.md +++ b/skills/lark-slides/references/svg-slides/deck-design-reference-catalog.md @@ -2,7 +2,6 @@ ## Context - Role: reference - Purpose: Narrative archetypes and depth rubric consumed by the design brief prompt. -- Source lines: 1082-1234 ## Content # Deck design reference catalog @@ -157,9 +156,3 @@ THREE QUICK DISAMBIGUATIONS (where decks wrongly converge to MID) 2. Expert vs lay on the SAME topic (ai-hardtech-pitch vs ai-101): both about AI — one is eval tables + failure-mode rates for technical partners, the other bans benchmark charts entirely. Audience, not topic, sets altitude. 3. Pitch is NOT low-detail everywhere: stage demo-day is C1 (one sentence/slide), but the Series B/C IC pre-read is A-altitude self-read (cohort triangles, Rule-of-40, 20-page-memo-equivalent density). Same category, opposite depth — delivery_mode + audience decide. ``` -## Source Coverage - -- Covers manifest sections: deck_design_reference_catalog -- Source lines: 1082-1234 -- Coverage mode: extracted runtime-unit content, preserving executable prompt or contract boundaries. -- Omitted source-only artifacts: copied implementation filenames only. diff --git a/skills/lark-slides/references/svg-slides/generate-svg-chart/README.md b/skills/lark-slides/references/svg-slides/generate-svg-chart/README.md index f74434d92..2785fc68c 100644 --- a/skills/lark-slides/references/svg-slides/generate-svg-chart/README.md +++ b/skills/lark-slides/references/svg-slides/generate-svg-chart/README.md @@ -9,7 +9,3 @@ Before generating or revising any chart, read these files in order: 5. Snippets whose frontmatter `chart_types` include the selected `chart_type` If snippet routing is uncertain, read `full.md`. - -## Source Slice - -- Source lines: 1357-2356 diff --git a/skills/lark-slides/references/svg-slides/generate-svg-chart/chart-agent-contract.md b/skills/lark-slides/references/svg-slides/generate-svg-chart/chart-agent-contract.md index 4e5d9189d..6982c85b1 100644 --- a/skills/lark-slides/references/svg-slides/generate-svg-chart/chart-agent-contract.md +++ b/skills/lark-slides/references/svg-slides/generate-svg-chart/chart-agent-contract.md @@ -2,7 +2,6 @@ ## Context - Role: prompt - Purpose: Defines the chart sub-agent response contract. -- Source lines: 1436-1487 ## Content ③ 契约模板 chart contract template: @@ -56,6 +55,3 @@ Hard rules: **Examples are illustrative, not templates.** Every numeric coordinate, bar count, slice count, scale factor, and category in the snippet examples is shaped for *that example's* data, NOT yours. Re-derive all geometry from YOUR `data` and item count in the `` block (`Scale_Math` plus `Coordinates`). Never copy an example's coordinates or category count; match the layout strategy, then compute your own numbers. ``` -## Source Slice - -- Source lines: 1436-1487 diff --git a/skills/lark-slides/references/svg-slides/generate-svg-chart/design-envelope.md b/skills/lark-slides/references/svg-slides/generate-svg-chart/design-envelope.md index d239c0ccf..07b60f06a 100644 --- a/skills/lark-slides/references/svg-slides/generate-svg-chart/design-envelope.md +++ b/skills/lark-slides/references/svg-slides/generate-svg-chart/design-envelope.md @@ -2,7 +2,6 @@ ## Context - Role: reference - Purpose: Defines chart craft rules, grid, palette roles, typography, labels, and invariants. -- Source lines: 1489-1586 ## Content ④ 设计简报 \_envelope.md(始终注入;§A 工艺原则 / §B 画布网格 Box Model / §C 色板角色 / §D 排版 / §E 线条 / §F 放置词汇 / §G 不变量。[fs-\*] 字号、scaffold 网格常数、[token] 色板均 Go 侧按 width/accent/theme 注入,此处为规则文本,示例几何按 tier L 常数锚定): @@ -102,6 +101,3 @@ When skeletons name a placement strategy, these are the geometric rules: 7. Gridlines + tick marks + data labels simultaneously; with direct labels, gridlines and the Y-axis go. 8. A bordered legend box; a title or subtitle inside the SVG (the host owns headings); a **global / full-canvas background fill** — the backing stays transparent so the chart inherits the host slide background (a *local* background shape — an emphasis band, a shaded forecast/threshold zone, a callout card in a palette color — is welcome when it strengthens the message); external resources, `