Skip to content

chore(slides): update lark-slides skill to 0715 (rev59) bundle#1972

Open
R0bynZhu wants to merge 8 commits into
mainfrom
update-lark-slides-skill-0715-v10
Open

chore(slides): update lark-slides skill to 0715 (rev59) bundle#1972
R0bynZhu wants to merge 8 commits into
mainfrom
update-lark-slides-skill-0715-v10

Conversation

@R0bynZhu

@R0bynZhu R0bynZhu commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Refresh skills/lark-slides to the 0715 (rev59) bundle and add a scenario-driven design-system layer. Docs/scripts only — no Go code changed.

Summary

Update the lark-slides skill on top of the merged 0715 snapshot (#1933): refresh SKILL.md / references / scripts to rev59, introduce a scenario design system (slides_categories + 7 scenario docs) with doubao-design.md as the fallback, and refactor SKILL.md so design opinions live in the design-system layer instead of as global hard constraints.

Changes

  • Scenario design system (new): references/slides_categories.md (scenario index/router) + 7 scenario docs — analysis-decision, business-plan, management-report, academic-research, education-training, tech-engineering, brand-creative. Planning now picks one primary scenario first and follows its doc.
  • Fallback design system (new): references/doubao-design.md; the former inline “豆包设计原则” becomes the fallback used only when no scenario matches.
  • SKILL.md refactor: inline design section → compact ## 设计系统 pointer; ## 权威经验 slimmed to pure technical constraints (design opinions — cards / fonts / image density / cover visual — moved into the design-system docs); scenario-selection added as the first planning step in ### 生成流程 (recorded into slide_plan.json).
  • visual-planning.md: drop the hardcoded card-grid mandate so it stays design-system-neutral (geometry / density / text-fit only).
  • Lint: add scripts/xml_layout_density_lint.py (+ tests) for paragraph-aware overflow / out-of-canvas / image-text occlusion checks; minor update to xml_text_overlap_lint.py.
  • Refreshed references: slides_chart_demo.xml, lark-slides-screenshot.md, validation-checklist.md, troubleshooting.md, xml-schema-quick-ref.md, planning-layer.md, lark-slides-pptx-template-workflows.md.

@github-actions github-actions Bot added the size/L Large or sensitive change across domains or core paths label Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR tightens Lark Slides creation and visual-review workflows, expands XML linting for paragraph-aware overflow and occlusion detection, updates layout and schema references, and normalizes the chart demonstration XML.

Changes

Lark Slides workflow and validation

Layer / File(s) Summary
XML linting and overflow detection
skills/lark-slides/scripts/xml_text_overlap_lint.py, skills/lark-slides/scripts/xml_text_overlap_lint_test.py
Adds tag-aware roundtrip attribute handling, structured paragraph extraction, overflow and occlusion detection, and expanded diagnostic tests.
Slide creation and visual review workflow
skills/lark-slides/SKILL.md, skills/lark-slides/references/lark-slides-screenshot.md, skills/lark-slides/references/validation-checklist.md, skills/lark-slides/references/troubleshooting.md, skills/lark-slides/references/lark-slides-pptx-template-workflows.md
Requires asset planning, pre-create linting, slide_id-based screenshot review, per-slide status records, revalidation after fixes, and updated image/template-editing rules.
Layout and schema guidance
skills/lark-slides/references/planning-layer.md, skills/lark-slides/references/visual-planning.md, skills/lark-slides/references/xml-schema-quick-ref.md
Documents the relationship-network layout, stricter geometry and label rules, conclusion-page imagery, and fixed table dimensions.
Chart XML demo normalization
skills/lark-slides/references/slides_chart_demo.xml
Updates the XML namespace, typography, pie and donut label placement, and section counters across the chart examples.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • larksuite/cli#516: Introduces the related +replace-slide workflow referenced by the slide-editing guidance.
  • larksuite/cli#847: Modifies the same XML linting implementation and tests.
  • larksuite/cli#1933: Updates overlapping slide-generation and validation workflow rules.

Suggested reviewers: liangshuo-1

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise and accurately reflects the rev59 bundle refresh.
Description check ✅ Passed It includes the required Summary and Changes sections, but omits Test Plan and Related Issues from the template.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch update-lark-slides-skill-0715-v10

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@21d73b239cce06cbe49beac294bfe974883e1034

🧩 Skill update

npx skills add larksuite/cli#update-lark-slides-skill-0715-v10 -y -g

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/lark-slides/references/lark-slides-screenshot.md`:
- Line 30: Update the slide selector table row to state that at least one of
--slide-id or --slide-number must be provided and both cannot be omitted,
reflecting the CLI’s either-or validation; retain the existing successful
slide_id behavior and add the missing trailing table delimiter.

In `@skills/lark-slides/references/validation-checklist.md`:
- Line 169: Update the validation checklist entry to report
xml_text_overlap_lint.py results separately from manual content/layout checks.
Keep error_count=0 limited to the linter’s actual XML/schema, overlap, canvas,
text-overflow, table-size, and icon validations, and list title hierarchy and
visual focus as independently verified checks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2b3fb781-84ce-43b4-8015-6852fa07d926

📥 Commits

Reviewing files that changed from the base of the PR and between 4daddf9 and 4b1d3f2.

📒 Files selected for processing (4)
  • skills/lark-slides/SKILL.md
  • skills/lark-slides/references/lark-slides-screenshot.md
  • skills/lark-slides/references/validation-checklist.md
  • skills/lark-slides/scripts/xml_text_overlap_lint.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • skills/lark-slides/SKILL.md
  • skills/lark-slides/scripts/xml_text_overlap_lint.py

Comment thread skills/lark-slides/references/lark-slides-screenshot.md
Comment thread skills/lark-slides/references/validation-checklist.md
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.07%. Comparing base (d4168ab) to head (21d73b2).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1972      +/-   ##
==========================================
+ Coverage   75.05%   75.07%   +0.02%     
==========================================
  Files         901      901              
  Lines       95391    95560     +169     
==========================================
+ Hits        71591    71739     +148     
- Misses      18307    18319      +12     
- Partials     5493     5502       +9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@R0bynZhu
R0bynZhu force-pushed the update-lark-slides-skill-0715-v10 branch from 4b1d3f2 to fa6106b Compare July 20, 2026 12:57

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
skills/lark-slides/scripts/xml_text_overlap_lint.py (1)

795-819: 🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Malformed paragraph spacing silently disables overflow detection for the whole shape.

If any paragraph's lineSpacing/beforeLineSpacing/afterLineSpacing fails the (multiple|fixed):N regex, line_count is reset to 0 and the loop breaks, so the entire element is skipped from detect_text_may_overflow_shapes with no warning emitted — a silent false negative in the exact check meant to catch overflow. Consider emitting a diagnostic (e.g., a lower-severity text_overflow_unknown issue) instead of dropping the element silently.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/lark-slides/scripts/xml_text_overlap_lint.py` around lines 795 - 819,
Update the paragraph-spacing failure path in detect_text_may_overflow_shapes so
invalid lineSpacing, beforeLineSpacing, or afterLineSpacing values do not
silently skip the element. Emit a lower-severity text_overflow_unknown
diagnostic with the relevant element context, then preserve the existing
behavior of stopping height estimation for that element.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/lark-slides/SKILL.md`:
- Line 230: Update the visual-review workflow in the slide skill documentation
to keep screenshot-access failures represented consistently: either record them
as not_reviewed or formally include not_verified in the review-state lifecycle
and completion gate. Ensure any not_verified state prevents claiming visual
review completion, alongside existing not_reviewed and fix states.

---

Nitpick comments:
In `@skills/lark-slides/scripts/xml_text_overlap_lint.py`:
- Around line 795-819: Update the paragraph-spacing failure path in
detect_text_may_overflow_shapes so invalid lineSpacing, beforeLineSpacing, or
afterLineSpacing values do not silently skip the element. Emit a lower-severity
text_overflow_unknown diagnostic with the relevant element context, then
preserve the existing behavior of stopping height estimation for that element.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e964708e-2dfe-4a4e-a443-4fb127ede3e1

📥 Commits

Reviewing files that changed from the base of the PR and between 4b1d3f2 and fa6106b.

📒 Files selected for processing (10)
  • skills/lark-slides/SKILL.md
  • skills/lark-slides/references/lark-slides-pptx-template-workflows.md
  • skills/lark-slides/references/lark-slides-screenshot.md
  • skills/lark-slides/references/planning-layer.md
  • skills/lark-slides/references/slides_chart_demo.xml
  • skills/lark-slides/references/troubleshooting.md
  • skills/lark-slides/references/validation-checklist.md
  • skills/lark-slides/references/visual-planning.md
  • skills/lark-slides/references/xml-schema-quick-ref.md
  • skills/lark-slides/scripts/xml_text_overlap_lint.py
💤 Files with no reviewable changes (1)
  • skills/lark-slides/references/lark-slides-pptx-template-workflows.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • skills/lark-slides/references/xml-schema-quick-ref.md
  • skills/lark-slides/references/planning-layer.md
  • skills/lark-slides/references/troubleshooting.md
  • skills/lark-slides/references/validation-checklist.md
  • skills/lark-slides/references/slides_chart_demo.xml

Comment thread skills/lark-slides/SKILL.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
skills/lark-slides/scripts/xml_text_overlap_lint.py (1)

175-188: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Prevent literal newlines from being incorrectly preserved as hard breaks.

When preserve_line_breaks=True is used, literal newlines (\n) embedded in pretty-printed XML text nodes are currently kept and split into multiple lines. In standard XML rendering, literal newlines inside text nodes are treated as whitespace, and only <p> or <br> dictate layout breaks. Retaining them will cause artificially inflated line counts and false-positive vertical overflow warnings.

Replace literal \r and \n with spaces before converting <br> tags to align with standard XML logic.

🐛 Proposed fix
 def strip_xml(value: str, preserve_line_breaks: bool = False) -> str:
     stripped = re.sub(r"<!\[CDATA\[([\s\S]*?)\]\]>", r"\1", value)
     if preserve_line_breaks:
+        stripped = re.sub(r"[\r\n]+", " ", stripped)
         stripped = re.sub(r"<br\b[^>]*>", "\n", stripped)
     stripped = re.sub(r"<[^>]+>", " ", stripped)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/lark-slides/scripts/xml_text_overlap_lint.py` around lines 175 - 188,
Update strip_xml to normalize literal carriage returns and newlines to spaces
before the preserve_line_breaks branch converts <br> tags, so only explicit
break tags produce line boundaries while existing whitespace collapsing remains
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/lark-slides/scripts/xml_text_overlap_lint_test.py`:
- Around line 639-659: Update should_flag_horizontal_text_overflow to skip text
shapes that use horizontal wrapping, allowing the vertical overflow heuristic to
handle them instead. In
test_lint_xml_detects_horizontal_text_overflow_across_declared_box_gap,
explicitly set the source shape’s wrap attribute to false so the fixture tests
horizontal overflow without triggering text_may_overflow_shape.

---

Outside diff comments:
In `@skills/lark-slides/scripts/xml_text_overlap_lint.py`:
- Around line 175-188: Update strip_xml to normalize literal carriage returns
and newlines to spaces before the preserve_line_breaks branch converts <br>
tags, so only explicit break tags produce line boundaries while existing
whitespace collapsing remains unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 940fa848-bcf3-4333-b3ff-eb494def3211

📥 Commits

Reviewing files that changed from the base of the PR and between fa6106b and 9faa167.

📒 Files selected for processing (2)
  • skills/lark-slides/scripts/xml_text_overlap_lint.py
  • skills/lark-slides/scripts/xml_text_overlap_lint_test.py

Comment thread skills/lark-slides/scripts/xml_text_overlap_lint_test.py
@R0bynZhu
R0bynZhu force-pushed the update-lark-slides-skill-0715-v10 branch 2 times, most recently from afd3229 to e605fa6 Compare July 21, 2026 09:27
@github-actions github-actions Bot added size/XL Architecture-level or global-impact change and removed size/L Large or sensitive change across domains or core paths labels Jul 21, 2026
@R0bynZhu
R0bynZhu force-pushed the update-lark-slides-skill-0715-v10 branch from e14c300 to 7c84557 Compare July 21, 2026 13:42
R0bynZhu and others added 3 commits July 21, 2026 21:51
)

* feat: add layout density lint for sparse slide containers
  - add XML-based sparse container detection with coverage metrics
  - return structured, actionable lint JSON
  - document lint usage and visual-review workflow
  - add regression tests for density-lint behavior

* feat: add layout density lint for sparse slide containers
  - add XML-based sparse container detection with coverage metrics
  - return structured, actionable lint JSON
  - document lint usage and visual-review workflow
  - add regression tests for density-lint behavior

* feat(slides): detect sparse short cards and slide-level density

* docs: resolve slide lint scripts from loaded skill directory
@R0bynZhu
R0bynZhu force-pushed the update-lark-slides-skill-0715-v10 branch from 170057c to 21d73b2 Compare July 22, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL Architecture-level or global-impact change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants