Skip to content

chore: sync lark-doc skill from online-doc - #1727

Closed
liuxin-0319 wants to merge 1 commit into
mainfrom
chore/sync-lark-doc-v43-20260702-230927
Closed

chore: sync lark-doc skill from online-doc#1727
liuxin-0319 wants to merge 1 commit into
mainfrom
chore/sync-lark-doc-v43-20260702-230927

Conversation

@liuxin-0319

@liuxin-0319 liuxin-0319 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions github-actions Bot added domain/ccm PR touches the ccm domain size/L Large or sensitive change across domains or core paths labels Jul 2, 2026
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR updates lark-doc skill documentation to mandate Doc API v2 for docs create/fetch/update operations, restructures create/update workflows toward single-agent serial writing (replacing parallel sub-agent strategies), rewrites the style guide into concise writing principles, clarifies Mermaid/SVG whiteboard insertion responsibilities, and adds a new count_chars.py script for word-count validation against user-specified targets.

Changes

Lark Doc Skill Documentation and Tooling Overhaul

Layer / File(s) Summary
SKILL.md v2 requirement and quick decisions
skills/lark-doc/SKILL.md
Requires --api-version v2 for create/fetch/update, revises prerequisite reading and quick-decision rules for whiteboard/block handling, and updates synced_reference routing.
Create/update reference pointers
skills/lark-doc/references/lark-doc-create.md, skills/lark-doc/references/lark-doc-update.md
Prerequisite and reference sections point to updated style/workflow docs reflecting single-agent serial rewriting and revised board-handling pointers.
XML container tag notes
skills/lark-doc/references/lark-doc-xml.md
Adds reminders to consult the style guide before using <callout> and <grid>/<column>.
Rewritten writing-principles style guide
skills/lark-doc/references/style/lark-doc-style.md
Replaces the component reference manual with six writing principles: paragraph defaults, genre-based writing, numbering/hierarchy, restrained component use, and a self-check list.
Create workflow: serial writing and whiteboard/word-count steps
skills/lark-doc/references/style/lark-doc-create-workflow.md
Switches step one to single-agent serial drafting, refines review checklists, clarifies Mermaid vs SVG SubAgent insertion, and adds script-driven word-count iteration.
Update workflow: serial rewriting and whiteboard/word-count steps
skills/lark-doc/references/style/lark-doc-update-workflow.md
Updates Execute ownership, fetch-range selection, single-agent serial rewriting/verification, word-count validation, and whiteboard SubAgent responsibility boundaries.
New word-count CLI script
skills/lark-doc/scripts/count_chars.py
Adds a script computing total words/chars via Feishu-aligned rules, judging against target bounds, and outputting JSON with verdict and gap.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MainAgent
  participant count_chars.py
  participant lark-cli

  MainAgent->>count_chars.py: run with --doc/--file/--min/--max/--approx
  count_chars.py->>lark-cli: fetch_raw_content(doc_id)
  lark-cli-->>count_chars.py: raw_content JSON
  count_chars.py->>count_chars.py: count(text) -> total_words, total_chars
  count_chars.py->>count_chars.py: judge(words, mn, mx) -> verdict, gap
  count_chars.py-->>MainAgent: JSON {total_words, verdict, gap}
Loading

Possibly related PRs

  • larksuite/cli#890: Both PRs update shared v2 guidance for docs +create/+fetch/+update in skills/lark-doc/SKILL.md.
  • larksuite/cli#1508: Both PRs update the same lark-doc fetch/block-level operation guidance and block-ID handling rules.
  • larksuite/cli#1463: Both PRs modify lark-doc-style.md and related workflow docs' style guidance wording.

Suggested labels: documentation, size/M

Suggested reviewers: SunPeiYang996, caojie0621, ViperCai

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided, so the required Summary, Changes, Test Plan, and Related Issues sections are missing. Add the PR description using the repository template and include a brief summary, key changes, verification steps, and related issues.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: syncing the lark-doc skill from online-doc.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/sync-lark-doc-v43-20260702-230927

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.

text = fetch_raw_content(args.doc, args.identity)
elif args.file:
try:
text = open(args.file, encoding="utf-8").read()
@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.40%. Comparing base (c2d6038) to head (b07a189).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1727   +/-   ##
=======================================
  Coverage   74.40%   74.40%           
=======================================
  Files         854      854           
  Lines       88375    88375           
=======================================
  Hits        65752    65752           
  Misses      17552    17552           
  Partials     5071     5071           

☔ 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@b07a18936022da35066e6ec00b720935fb4ca216

🧩 Skill update

npx skills add larksuite/cli#chore/sync-lark-doc-v43-20260702-230927 -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-doc/references/lark-doc-create.md`:
- Around line 3-8: The MUST READ preflight in lark-doc-create.md is incomplete
because it omits the whiteboard guide even though this flow now handles
whiteboard insertion. Update the checklist to include the whiteboard reference
alongside lark-doc-xml.md, lark-doc-style.md, and lark-doc-create-workflow.md,
so the required board syntax and insertion rules are always read before content
generation.

In `@skills/lark-doc/references/lark-doc-update.md`:
- Around line 4-9: The MUST READ checklist in lark-doc-update.md is missing the
whiteboard prerequisite used later for board edits. Update the prerequisite list
to include lark-doc-whiteboard.md alongside lark-doc-xml.md, lark-doc-style.md,
and lark-doc-update-workflow.md so the update flow cannot proceed without
reading it first.
🪄 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: 581fd056-225a-49fe-ae98-a921f0771b7b

📥 Commits

Reviewing files that changed from the base of the PR and between c2d6038 and b07a189.

📒 Files selected for processing (8)
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-create.md
  • skills/lark-doc/references/lark-doc-update.md
  • skills/lark-doc/references/lark-doc-xml.md
  • skills/lark-doc/references/style/lark-doc-create-workflow.md
  • skills/lark-doc/references/style/lark-doc-style.md
  • skills/lark-doc/references/style/lark-doc-update-workflow.md
  • skills/lark-doc/scripts/count_chars.py

Comment on lines 3 to 8
> **前置条件(MUST READ):** 生成文档内容前,必须先用 Read 工具读取以下文件,缺一不可:
> 1. [`lark-doc-xml.md`](lark-doc-xml.md) — XML 语法规则(使用 Markdown 格式时改读 [`lark-doc-md.md`](lark-doc-md.md))
> 2. [`lark-doc-style.md`](style/lark-doc-style.md) — 排版指南(元素选择、丰富度规则、颜色语义
> 3. [`lark-doc-create-workflow.md`](style/lark-doc-create-workflow.md) — 从零创作工作流(Code-Act Loop、并行执行策略
> 2. [`lark-doc-style.md`](style/lark-doc-style.md) — 写作原则(默认段落、按体裁、组件克制
> 3. [`lark-doc-create-workflow.md`](style/lark-doc-create-workflow.md) — 从零创作工作流(Code-Act Loop、单 Agent 串行撰写
>
> **未读完以上文件就生成内容会导致格式错误。**

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add the whiteboard guide to the MUST READ list.

The create flow now has whiteboard insertion responsibilities elsewhere in the skill, but this preflight still only covers XML/style/create-workflow. A caller can satisfy the current checklist and still miss the board syntax/insertion rules.

Suggested fix
 > 1. [`lark-doc-xml.md`](lark-doc-xml.md) — XML 语法规则(使用 Markdown 格式时改读 [`lark-doc-md.md`](lark-doc-md.md))
 > 2. [`lark-doc-style.md`](style/lark-doc-style.md) — 写作原则(默认段落、按体裁、组件克制)
-> 3. [`lark-doc-create-workflow.md`](style/lark-doc-create-workflow.md) — 从零创作工作流(Code-Act Loop、单 Agent 串行撰写)
+> 3. [`lark-doc-whiteboard.md`](lark-doc-whiteboard.md) — 画板语法、插入与更新规则
+> 4. [`lark-doc-create-workflow.md`](style/lark-doc-create-workflow.md) — 从零创作工作流(Code-Act Loop、单 Agent 串行撰写)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
> **前置条件(MUST READ):** 生成文档内容前,必须先用 Read 工具读取以下文件,缺一不可:
> 1. [`lark-doc-xml.md`](lark-doc-xml.md) — XML 语法规则(使用 Markdown 格式时改读 [`lark-doc-md.md`](lark-doc-md.md)
> 2. [`lark-doc-style.md`](style/lark-doc-style.md) — 排版指南(元素选择、丰富度规则、颜色语义)
> 3. [`lark-doc-create-workflow.md`](style/lark-doc-create-workflow.md) — 从零创作工作流(Code-Act Loop、并行执行策略)
> 2. [`lark-doc-style.md`](style/lark-doc-style.md) — 写作原则(默认段落、按体裁、组件克制)
> 3. [`lark-doc-create-workflow.md`](style/lark-doc-create-workflow.md) — 从零创作工作流(Code-Act Loop、单 Agent 串行撰写)
>
> **未读完以上文件就生成内容会导致格式错误。**
> **前置条件(MUST READ):** 生成文档内容前,必须先用 Read 工具读取以下文件,缺一不可:
> 1. [`lark-doc-xml.md`](lark-doc-xml.md) — XML 语法规则(使用 Markdown 格式时改读 [`lark-doc-md.md`](lark-doc-md.md)
> 2. [`lark-doc-style.md`](style/lark-doc-style.md) — 写作原则(默认段落、按体裁、组件克制)
> 3. [`lark-doc-whiteboard.md`](lark-doc-whiteboard.md) — 画板语法、插入与更新规则
> 4. [`lark-doc-create-workflow.md`](style/lark-doc-create-workflow.md) — 从零创作工作流(Code-Act Loop、单 Agent 串行撰写)
>
> **未读完以上文件就生成内容会导致格式错误。**
🤖 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-doc/references/lark-doc-create.md` around lines 3 - 8, The MUST
READ preflight in lark-doc-create.md is incomplete because it omits the
whiteboard guide even though this flow now handles whiteboard insertion. Update
the checklist to include the whiteboard reference alongside lark-doc-xml.md,
lark-doc-style.md, and lark-doc-create-workflow.md, so the required board syntax
and insertion rules are always read before content generation.

Comment on lines 4 to 9
> **前置条件(MUST READ):** 生成文档内容前,必须先用 Read 工具读取以下文件,缺一不可:
> 1. [`lark-doc-xml.md`](lark-doc-xml.md) — XML 语法规则(使用 Markdown 格式时改读 [`lark-doc-md.md`](lark-doc-md.md))
> 2. [`lark-doc-style.md`](style/lark-doc-style.md) — 排版指南(元素选择、丰富度规则、颜色语义
> 3. [`lark-doc-update-workflow.md`](style/lark-doc-update-workflow.md) — 改写增强工作流(Code-Act Loop、并行执行策略
> 2. [`lark-doc-style.md`](style/lark-doc-style.md) — 写作原则(默认段落、按体裁、组件克制
> 3. [`lark-doc-update-workflow.md`](style/lark-doc-update-workflow.md) — 改写增强工作流(Code-Act Loop、单 Agent 串行改写
>
> **未读完以上文件就生成内容会导致格式错误。**

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add the whiteboard guide to the MUST READ list for update flows.

lark-doc-whiteboard.md is still required later in this file for board edits, so the current checklist can be satisfied while skipping a needed prerequisite.

Suggested fix
 > 1. [`lark-doc-xml.md`](lark-doc-xml.md) — XML 语法规则(使用 Markdown 格式时改读 [`lark-doc-md.md`](lark-doc-md.md))
 > 2. [`lark-doc-style.md`](style/lark-doc-style.md) — 写作原则(默认段落、按体裁、组件克制)
-> 3. [`lark-doc-update-workflow.md`](style/lark-doc-update-workflow.md) — 改写增强工作流(Code-Act Loop、单 Agent 串行改写)
+> 3. [`lark-doc-whiteboard.md`](lark-doc-whiteboard.md) — 画板语法、插入与更新规则
+> 4. [`lark-doc-update-workflow.md`](style/lark-doc-update-workflow.md) — 改写增强工作流(Code-Act Loop、单 Agent 串行改写)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
> **前置条件(MUST READ):** 生成文档内容前,必须先用 Read 工具读取以下文件,缺一不可:
> 1. [`lark-doc-xml.md`](lark-doc-xml.md) — XML 语法规则(使用 Markdown 格式时改读 [`lark-doc-md.md`](lark-doc-md.md)
> 2. [`lark-doc-style.md`](style/lark-doc-style.md) — 排版指南(元素选择、丰富度规则、颜色语义)
> 3. [`lark-doc-update-workflow.md`](style/lark-doc-update-workflow.md) — 改写增强工作流(Code-Act Loop、并行执行策略)
> 2. [`lark-doc-style.md`](style/lark-doc-style.md) — 写作原则(默认段落、按体裁、组件克制)
> 3. [`lark-doc-update-workflow.md`](style/lark-doc-update-workflow.md) — 改写增强工作流(Code-Act Loop、单 Agent 串行改写)
>
> **未读完以上文件就生成内容会导致格式错误。**
> **前置条件(MUST READ):** 生成文档内容前,必须先用 Read 工具读取以下文件,缺一不可:
> 1. [`lark-doc-xml.md`](lark-doc-xml.md) — XML 语法规则(使用 Markdown 格式时改读 [`lark-doc-md.md`](lark-doc-md.md)
> 2. [`lark-doc-style.md`](style/lark-doc-style.md) — 写作原则(默认段落、按体裁、组件克制)
> 3. [`lark-doc-whiteboard.md`](lark-doc-whiteboard.md) — 画板语法、插入与更新规则
> 4. [`lark-doc-update-workflow.md`](style/lark-doc-update-workflow.md) — 改写增强工作流(Code-Act Loop、单 Agent 串行改写)
>
> **未读完以上文件就生成内容会导致格式错误。**
🤖 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-doc/references/lark-doc-update.md` around lines 4 - 9, The MUST
READ checklist in lark-doc-update.md is missing the whiteboard prerequisite used
later for board edits. Update the prerequisite list to include
lark-doc-whiteboard.md alongside lark-doc-xml.md, lark-doc-style.md, and
lark-doc-update-workflow.md so the update flow cannot proceed without reading it
first.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

PR Quality Summary

CI did not complete successfully. Use the failed check links below to decide whether this PR needs a code change or a rerun.

Failed checks

  • license-header — failure — details
  • e2e-live — failure — details
  • results — failure — details

@liuxin-0319

Copy link
Copy Markdown
Collaborator Author

Closing as no longer needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/ccm PR touches the ccm domain size/L Large or sensitive change across domains or core paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant