Skip to content

docs: add lark slides generation constraints#1720

Merged
ethan-zhx merged 3 commits into
mainfrom
docs/slides_style
Jul 2, 2026
Merged

docs: add lark slides generation constraints#1720
ethan-zhx merged 3 commits into
mainfrom
docs/slides_style

Conversation

@ethan-zhx

@ethan-zhx ethan-zhx commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a high-priority lark-slides skill constraint for PPT generation and template editing behavior, and remove the older built-in template-tool path to avoid conflicting template routing.

Changes

  • Add a CRITICAL rule covering PPT canvas bounds, image-rich generation, shape usage limits, background image prompt constraints, and template-preserving edit behavior.
  • Remove the lark-slides template toolchain: template_tool.py, its tests, template catalog/index, and bundled XML template assets.
  • Remove SKILL/planning references that routed natural-language template/theme/layout requests through template_tool.

Test Plan

  • Unit tests pass
  • Manual local verification confirms the documentation diff is scoped as expected
  • Ran git diff --check
  • Confirmed no template_tool / template-catalog / template-index / assets/templates references remain under skills/lark-slides

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Updated quick reference and execution rules with stricter PPT constraints (960×540, keep content within page bounds) and emphasized “plan first, then write.”
    • Added a clearer workflow for using user-provided templates: preserve original layout and fonts, then only fine-tune text/images/shapes as needed.
  • New Features
    • Improved background image prompt guidance to prevent any text from appearing in slide backgrounds.
  • Chores / Template Updates
    • Removed multiple built-in slide deck templates from the available assets.

@github-actions github-actions Bot added the size/M Single-domain feat or fix with limited business impact label Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • skills/lark-slides/scripts/xml_text_overlap_lint_test.py
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9fe231f2-990a-4a16-916f-eaf294f529b5

📥 Commits

Reviewing files that changed from the base of the PR and between 4772c38 and 88df158.

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

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR tightens lark-slides guidance in SKILL.md and removes multiple XML template assets from the repository.

Changes

Lark slides guidance update

Layer / File(s) Summary
Hard constraints and template editing
skills/lark-slides/SKILL.md
Updates the Quick Reference with slide size bounds, background prompt text restrictions, and template import/edit steps through lark-drive.
Writing guardrails and creation flow
skills/lark-slides/SKILL.md
Revises the placeholder-language rule and restructures the create-flow steps around planning, slide_plan.json, and asset_need.
Core rule wording
skills/lark-slides/SKILL.md
Retains the plan-first XML rule and removes the prior template/style/outline input qualifier.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • larksuite/cli#684: Changes the same lark-slides template workflow guidance in SKILL.md.
  • larksuite/cli#847: Also updates lark-slides template/script workflow instructions in SKILL.md.
  • larksuite/cli#1169: Adjusts lark-slides guardrails and routing guidance in the same documentation area.

Suggested labels: domain/ccm

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main change: adding lark slides generation constraints.
Description check ✅ Passed The description follows the required template and includes summary, changes, test plan, and related issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/slides_style

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.

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.72%. Comparing base (d0cde9a) to head (88df158).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1720      +/-   ##
==========================================
+ Coverage   74.51%   74.72%   +0.21%     
==========================================
  Files         852      853       +1     
  Lines       87655    88804    +1149     
==========================================
+ Hits        65312    66359    +1047     
- Misses      17315    17395      +80     
- Partials     5028     5050      +22     

☔ 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.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@88df158229476641e05ab238292588cc68348c72

🧩 Skill update

npx skills add larksuite/cli#docs/slides_style -y -g

@fangshuyu-768

Copy link
Copy Markdown
Collaborator

Thanks for tightening the slide-generation guidance. I think two parts here should be narrowed before merge:

  1. The new template instruction says that when a user specifies a PPT template, the agent should import it through lark-drive and edit the resulting Lark Slides directly. That conflicts with the existing template flow a few lines below, which says natural-language template/theme/layout requests must go through template_tool.py search -> summarize -> extract. As written, a request like “use a product launch template” could be routed to lark-drive even when the user has not provided a PPTX/cloud-drive file. Could we scope this to “when the user provides/uploads a PPTX template file or cloud-drive PPT resource”, and explicitly leave natural-language template/theme/layout requests on the template_tool path?

  2. “Use more generated images, search images as support, must be image-and-text rich” feels too strong as a global CRITICAL requirement. For technical, research, data, or accuracy-sensitive decks, forcing generated/searched images can introduce incorrect assets and also pulls against the existing asset-planning rule that only metadata should be planned before XML generation. Could we make this conditional, e.g. use generated/searched images when the user allows it and it helps the story, while preferring user-provided assets, charts, screenshots, whiteboard diagrams, or XML-native fallbacks when accuracy matters?

@github-actions github-actions Bot added size/XL Architecture-level or global-impact change and removed size/M Single-domain feat or fix with limited business impact labels Jul 2, 2026
@fangshuyu-768

Copy link
Copy Markdown
Collaborator

I found one blocking regression after the template toolchain removal.

skills/lark-slides/scripts/xml_text_overlap_lint_test.py still depends on skills/lark-slides/assets/templates/*.xml as required fixtures:

TEMPLATES_DIR = Path(__file__).resolve().parents[1] / "assets" / "templates"
...
template_paths = sorted(TEMPLATES_DIR.glob("*.xml"))
self.assertTrue(template_paths)

This PR deletes the entire skills/lark-slides/assets/templates/ directory, so the test now fails because template_paths is empty. I reproduced it locally from skills/lark-slides/scripts with:

python3 -m unittest xml_text_overlap_lint_test.py

Result:

FAIL: test_xml_text_overlap_lint_accepts_all_template_xml_files
AssertionError: [] is not true

Could you either keep a small fixture XML set for this lint coverage, or update the test to use inline XML samples instead of the removed template directory?

@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.

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/SKILL.md (1)

32-34: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Keep the template carve-out narrow. Only small existing-page edits should skip planning; imported-template rewrites that add/remove pages or replace structure still need .lark-slides/plan/.../slide_plan.json before XML.

🤖 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/SKILL.md` around lines 32 - 34, The planning exemption is
too broad and should be narrowed so only truly small edits to an existing page
skip planning. Update the guidance in SKILL.md to make clear that
imported-template rewrites which add/remove pages, replace structure, or
otherwise materially modify the deck still must create
.lark-slides/plan/<deck-or-task-id>/slide_plan.json before generating XML, and
keep the carve-out limited to minor single-page content edits.
🤖 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.

Outside diff comments:
In `@skills/lark-slides/SKILL.md`:
- Around line 32-34: The planning exemption is too broad and should be narrowed
so only truly small edits to an existing page skip planning. Update the guidance
in SKILL.md to make clear that imported-template rewrites which add/remove
pages, replace structure, or otherwise materially modify the deck still must
create .lark-slides/plan/<deck-or-task-id>/slide_plan.json before generating
XML, and keep the carve-out limited to minor single-page content edits.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9bdbe7b5-2f21-48ea-9369-2c7b06f199cc

📥 Commits

Reviewing files that changed from the base of the PR and between 3d70900 and 4772c38.

📒 Files selected for processing (49)
  • skills/lark-slides/SKILL.md
  • skills/lark-slides/assets/templates/administration--all_hands_meeting.xml
  • skills/lark-slides/assets/templates/administration--annual_gala.xml
  • skills/lark-slides/assets/templates/administration--company_intro.xml
  • skills/lark-slides/assets/templates/administration--corporate_culture.xml
  • skills/lark-slides/assets/templates/hr--employee_training.xml
  • skills/lark-slides/assets/templates/hr--employee_training_workshop.xml
  • skills/lark-slides/assets/templates/hr--onboarding.xml
  • skills/lark-slides/assets/templates/marketing--brand_communication.xml
  • skills/lark-slides/assets/templates/marketing--brand_logo_design.xml
  • skills/lark-slides/assets/templates/marketing--brand_operations_plan.xml
  • skills/lark-slides/assets/templates/marketing--business_plan.xml
  • skills/lark-slides/assets/templates/marketing--marketing_plan.xml
  • skills/lark-slides/assets/templates/marketing--marketing_strategy.xml
  • skills/lark-slides/assets/templates/marketing--product_whitepaper.xml
  • skills/lark-slides/assets/templates/marketing--roadshow_business_plan.xml
  • skills/lark-slides/assets/templates/misc--book_sharing.xml
  • skills/lark-slides/assets/templates/misc--club_event_plan.xml
  • skills/lark-slides/assets/templates/misc--student_career_plan.xml
  • skills/lark-slides/assets/templates/office--dark_general.xml
  • skills/lark-slides/assets/templates/office--dept_annual_report.xml
  • skills/lark-slides/assets/templates/office--light_general.xml
  • skills/lark-slides/assets/templates/office--project_kickoff.xml
  • skills/lark-slides/assets/templates/office--quarterly_review.xml
  • skills/lark-slides/assets/templates/office--work_report.xml
  • skills/lark-slides/assets/templates/office--work_summary.xml
  • skills/lark-slides/assets/templates/office--work_summary_report.xml
  • skills/lark-slides/assets/templates/operations--brand_logo_design.xml
  • skills/lark-slides/assets/templates/operations--brand_operations_plan.xml
  • skills/lark-slides/assets/templates/operations--marketing_plan.xml
  • skills/lark-slides/assets/templates/operations--product_promotion.xml
  • skills/lark-slides/assets/templates/personal--experience_sharing.xml
  • skills/lark-slides/assets/templates/personal--personal_resume.xml
  • skills/lark-slides/assets/templates/personal--promotion_defense.xml
  • skills/lark-slides/assets/templates/personal--promotion_report.xml
  • skills/lark-slides/assets/templates/personal--self_intro.xml
  • skills/lark-slides/assets/templates/personal--teaching_sharing.xml
  • skills/lark-slides/assets/templates/product--business_case_analysis.xml
  • skills/lark-slides/assets/templates/product--market_analysis.xml
  • skills/lark-slides/assets/templates/product--product_analysis.xml
  • skills/lark-slides/assets/templates/product--product_intro.xml
  • skills/lark-slides/assets/templates/product--product_promotion.xml
  • skills/lark-slides/assets/templates/product--product_promotion_2.xml
  • skills/lark-slides/references/planning-layer.md
  • skills/lark-slides/references/template-catalog.md
  • skills/lark-slides/references/template-index.json
  • skills/lark-slides/references/visual-planning.md
  • skills/lark-slides/scripts/template_tool.py
  • skills/lark-slides/scripts/template_tool_test.py
💤 Files with no reviewable changes (14)
  • skills/lark-slides/assets/templates/marketing--business_plan.xml
  • skills/lark-slides/assets/templates/marketing--product_whitepaper.xml
  • skills/lark-slides/assets/templates/hr--onboarding.xml
  • skills/lark-slides/assets/templates/administration--corporate_culture.xml
  • skills/lark-slides/assets/templates/marketing--marketing_strategy.xml
  • skills/lark-slides/assets/templates/marketing--brand_communication.xml
  • skills/lark-slides/assets/templates/administration--company_intro.xml
  • skills/lark-slides/assets/templates/administration--annual_gala.xml
  • skills/lark-slides/assets/templates/marketing--brand_operations_plan.xml
  • skills/lark-slides/assets/templates/hr--employee_training.xml
  • skills/lark-slides/assets/templates/marketing--marketing_plan.xml
  • skills/lark-slides/assets/templates/hr--employee_training_workshop.xml
  • skills/lark-slides/assets/templates/marketing--roadshow_business_plan.xml
  • skills/lark-slides/assets/templates/marketing--brand_logo_design.xml

@ethan-zhx
ethan-zhx merged commit c982df4 into main Jul 2, 2026
24 checks passed
@ethan-zhx
ethan-zhx deleted the docs/slides_style branch July 2, 2026 10:02
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