chore: sync lark-doc skill from online-doc#1727
Conversation
📝 WalkthroughWalkthroughThis 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 ChangesLark Doc Skill Documentation and Tooling Overhaul
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}
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) 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. Comment |
| text = fetch_raw_content(args.doc, args.identity) | ||
| elif args.file: | ||
| try: | ||
| text = open(args.file, encoding="utf-8").read() |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@b07a18936022da35066e6ec00b720935fb4ca216🧩 Skill updatenpx skills add larksuite/cli#chore/sync-lark-doc-v43-20260702-230927 -y -g |
There was a problem hiding this comment.
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
📒 Files selected for processing (8)
skills/lark-doc/SKILL.mdskills/lark-doc/references/lark-doc-create.mdskills/lark-doc/references/lark-doc-update.mdskills/lark-doc/references/lark-doc-xml.mdskills/lark-doc/references/style/lark-doc-create-workflow.mdskills/lark-doc/references/style/lark-doc-style.mdskills/lark-doc/references/style/lark-doc-update-workflow.mdskills/lark-doc/scripts/count_chars.py
| > **前置条件(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 串行撰写) | ||
| > | ||
| > **未读完以上文件就生成内容会导致格式错误。** |
There was a problem hiding this comment.
📐 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.
| > **前置条件(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.
| > **前置条件(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 串行改写) | ||
| > | ||
| > **未读完以上文件就生成内容会导致格式错误。** |
There was a problem hiding this comment.
📐 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.
| > **前置条件(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.
Summary
lark-docv43changes back to publicskills/lark-doc.v43 - v34viarestore_online_doc_to_lark_doc.py./Users/bytedance/xiage_workspaces/runs/20260702-230927-lark-doc-v43Verification
python3 -m py_compile skills/lark-doc/scripts/count_chars.pynode scripts/skill-format-check/index.js skillsgit diff --checkgit diff --cached --checkSummary by CodeRabbit
New Features
Documentation