Skip to content

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

Merged
fangshuyu-768 merged 2 commits into
mainfrom
chore/sync-lark-doc-from-online-doc
Jul 3, 2026
Merged

chore: sync lark-doc skill from online-doc#1701
fangshuyu-768 merged 2 commits into
mainfrom
chore/sync-lark-doc-from-online-doc

Conversation

@liuxin-0319

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

Copy link
Copy Markdown
Collaborator

Summary

Sync the open-source lark-doc skill from the latest special online-doc package, converting it back to the lark-doc layout used by this repository.

Changes

  • Update skills/lark-doc references and workflows from the online-doc source package.
  • Restore mechanically-cleansed lark-shared prerequisite/reference lines where applicable for the open-source CLI skill.
  • Update document word-count validation guidance for skills/lark-doc/scripts/doc_word_stat.py.

Test Plan

  • node scripts/skill-format-check/index.js skills
  • git diff --check
  • PYTHONPYCACHEPREFIX=/tmp/larksuite-cli-pycache python3 -m py_compile skills/lark-doc/scripts/doc_word_stat.py
  • printf '你好,world 123!\n' | python3 skills/lark-doc/scripts/doc_word_stat.py --protocol xml --pretty
  • Markdown relative-link validation for skills/lark-doc/**/*.md
  • make unit-test (fails in internal/qualitygate/publiccontent and internal/qualitygate/rules with TempDir RemoveAll cleanup: .../.git/ai: directory not empty; retrying those packages shows the same cleanup failure)

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Clarified required-read instructions for both creating and editing documents, including the specific additional workflow docs for new vs existing content.
    • Rewrote writing principles into a “when to use what” checklist, setting default paragraph writing, stricter formatting/numbering/heading consistency, and more restrained use of components (callouts, grids, tables, whiteboards).
    • Updated create/update workflows to favor single-agent, section-by-section drafting and review, with improved board/diagram insertion handling (Mermaid direct insertion; SVG handled separately).
    • Added a word-count verification step with a capped adjustment loop.

@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 1, 2026
@coderabbitai

coderabbitai Bot commented Jul 1, 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

This PR updates lark-doc guidance across SKILL.md and reference docs, tightening required-reading lists, rewriting style guidance into writing-principles rules, and changing create/update workflows to sequential single-agent authoring with revised Mermaid/SVG whiteboard handling.

Changes

Lark-doc skill documentation update

Layer / File(s) Summary
SKILL.md prerequisites and routing
skills/lark-doc/SKILL.md
Differentiates required reading for creating vs editing docs and routes Mermaid insertion directly to the main agent.
Create reference updates
skills/lark-doc/references/lark-doc-create.md
Updates MUST READ list, format-selection wording, and reference descriptions to reflect single-agent sequential authoring.
Update reference updates
skills/lark-doc/references/lark-doc-update.md
Updates MUST-READ list, whiteboard syntax cross-references, and reference section wording to reflect single-agent sequential rewriting.
XML tag reference reminder
skills/lark-doc/references/lark-doc-xml.md
Adds a reminder to consult writing principles before using callout and grid/column tags.
Style guide rewrite
skills/lark-doc/references/style/lark-doc-style.md
Rewrites the guide into a writing-principles checklist covering format priority, content-type routing, numbering/heading rules, component restraint, and self-check.
Create workflow restructure
skills/lark-doc/references/style/lark-doc-create-workflow.md
Restructures the workflow into serial skeleton-then-fill authoring, review checklist, and revised SubAgent whiteboard handling.
Update workflow restructure
skills/lark-doc/references/style/lark-doc-update-workflow.md
Restructures the workflow into serial section-by-section rewriting, review, word-count validation, and whiteboard SubAgent task boundaries with fetch-scope guidance.

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

Possibly related PRs

  • larksuite/cli#502: Updates the same lark-doc whiteboard insertion and routing guidance.
  • larksuite/cli#901: Covers related SVG whiteboard support and guidance changes.
  • larksuite/cli#1579: Modifies the same MUST READ prerequisite lists for create and edit flows.

Suggested labels: documentation, size/L

Suggested reviewers: SunPeiYang996, caojie0621, ViperCai

🚥 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
Title check ✅ Passed The title clearly matches the main change: syncing the lark-doc skill from online-doc.
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.
Description check ✅ Passed The PR description matches the required template and includes summary, changes, test plan, and related issues.
✨ 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-from-online-doc

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.

Comment thread skills/lark-doc/scripts/count_chars.py Fixed
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.40%. Comparing base (3788405) to head (7e696c1).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1701      +/-   ##
==========================================
- Coverage   74.52%   74.40%   -0.13%     
==========================================
  Files         851      853       +2     
  Lines       87155    88311    +1156     
==========================================
+ Hits        64952    65704     +752     
- Misses      17231    17544     +313     
- Partials     4972     5063      +91     

☔ 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 1, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@7e696c1b6ba3dc4fd64ce7a84daba233684252a1

🧩 Skill update

npx skills add larksuite/cli#chore/sync-lark-doc-from-online-doc -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: 1

🧹 Nitpick comments (3)
skills/lark-doc/references/lark-doc-update.md (1)

17-27: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Potential documentation gap: --reference-map parameter removal.

The parameter table at Lines 21-23 adds --api-version but removes the previously documented --reference-map row. However, the upstream code (shortcuts/doc/docs_update_v2.go:16-65) still registers and validates this flag as a structured input for external payload/reference mapping scenarios.

If --reference-map is intentionally hidden from the main reference, consider adding it to an advanced section or the update workflow document. Otherwise, users with reference_map needs will have no documentation discovery path.

📋 Suggested documentation recovery

Add a note in the "典型工作流" or "最佳实践" section, or restore --reference-map as a hidden/advanced table row:

| `--reference-map` || 结构化 `reference_map` JSON 对象;当 `--content` 使用正文外部载荷 / 引用映射时与内容一起传给服务。支持直接 JSON、`@reference-map.json`(相对路径)或 `-` 从 stdin 读取 |
🤖 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 17 - 27, The
parameter reference in lark-doc-update.md drops the documented `--reference-map`
option even though `docs_update_v2.go` still supports and validates it; restore
it in the main parameter table or add it to an advanced/hidden section. Update
the documentation around the `docs +fetch` / `--content` workflow to mention
`--reference-map` usage, especially for structured reference payloads, so users
can discover and use it consistently.
skills/lark-doc/scripts/count_chars.py (2)

39-51: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Add timeout to subprocess.run and validate doc_id format.

The subprocess.run call lacks a timeout, risking indefinite hangs if lark-cli stalls. Also, doc_id is interpolated into the URL path without format validation; while shell=False prevents command injection (the S603/BLE001 warnings are false positives here), a malformed doc_id could produce an invalid API path.

 def fetch_raw_content(doc_id, identity):
+    # Basic doc_id format validation
+    if not re.fullmatch(r'[A-Za-z0-9_-]+', doc_id):
+        sys.exit(f"Invalid document_id format: {doc_id}")
     cmd = ["lark-cli", "api", "GET",
            f"/open-apis/docx/v1/documents/{doc_id}/raw_content", "--as", identity]
     try:
-        out = subprocess.run(cmd, capture_output=True, text=True)
+        out = subprocess.run(cmd, capture_output=True, text=True, timeout=60)
     except FileNotFoundError:
🤖 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/scripts/count_chars.py` around lines 39 - 51, In
fetch_raw_content, add a timeout to the subprocess.run invocation so lark-cli
cannot hang indefinitely, and validate doc_id before building the
/open-apis/docx/v1/documents/{doc_id}/raw_content path to ensure it matches the
expected document ID format. Keep the shell=False usage unchanged, and update
the error handling in fetch_raw_content to surface timeout or validation
failures clearly alongside the existing FileNotFoundError and returncode checks.

94-133: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use with statement for file I/O and add min/max validation.

Line 108 opens a file without explicit close. While CPython will eventually garbage-collect the handle, explicit resource management is cleaner. Also, if both --min and --max are provided with --min > --max, the script silently accepts inconsistent bounds.

     elif args.file:
-        try:
-            text = open(args.file, encoding="utf-8").read()
-        except OSError as e:
-            sys.exit(f"读取文件失败: {e}")
+        try:
+            with open(args.file, encoding="utf-8") as f:
+                text = f.read()
+        except OSError as e:
+            sys.exit(f"读取文件失败: {e}")

And add validation after approx handling:

     mn, mx = args.min, args.max
     if args.approx is not None:
         mn, mx = round(args.approx * 0.9), round(args.approx * 1.1)
+    if mn is not None and mx is not None and mn > mx:
+        ap.error(f"--min ({mn}) cannot be greater than --max ({mx})")
🤖 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/scripts/count_chars.py` around lines 94 - 133, In main(),
replace the raw open(args.file, ...) read with a context-managed file read so
the handle is always closed, and add bounds validation after the approx
expansion logic. Specifically, in the argument handling around
fetch_raw_content(), args.file, and the mn/mx assignment, ensure that when both
--min and --max are set the script rejects cases where min is greater than max,
including when values come from --approx, by calling ap.error() with a clear
message before count() and judge() run.
🤖 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/style/lark-doc-style.md`:
- Around line 35-44: The numbering guidance in lark-doc-style.md is internally
inconsistent: the “一、→(一)→ 1.→(1)” example conflicts with the “all-Chinese”
label, and the “阿拉伯小数” rule conflicts with the mixed examples. In the section on
numbering and hierarchy, update the wording to use one clear rule in
lark-doc-style.md: either explicitly permit the mixed Chinese-Arabic hierarchy
with the matching examples, or remove the mixed examples and keep only pure
Chinese or pure Arabic schemes; make the prohibition and examples in the “编号与层级”
section consistent.

---

Nitpick comments:
In `@skills/lark-doc/references/lark-doc-update.md`:
- Around line 17-27: The parameter reference in lark-doc-update.md drops the
documented `--reference-map` option even though `docs_update_v2.go` still
supports and validates it; restore it in the main parameter table or add it to
an advanced/hidden section. Update the documentation around the `docs +fetch` /
`--content` workflow to mention `--reference-map` usage, especially for
structured reference payloads, so users can discover and use it consistently.

In `@skills/lark-doc/scripts/count_chars.py`:
- Around line 39-51: In fetch_raw_content, add a timeout to the subprocess.run
invocation so lark-cli cannot hang indefinitely, and validate doc_id before
building the /open-apis/docx/v1/documents/{doc_id}/raw_content path to ensure it
matches the expected document ID format. Keep the shell=False usage unchanged,
and update the error handling in fetch_raw_content to surface timeout or
validation failures clearly alongside the existing FileNotFoundError and
returncode checks.
- Around line 94-133: In main(), replace the raw open(args.file, ...) read with
a context-managed file read so the handle is always closed, and add bounds
validation after the approx expansion logic. Specifically, in the argument
handling around fetch_raw_content(), args.file, and the mn/mx assignment, ensure
that when both --min and --max are set the script rejects cases where min is
greater than max, including when values come from --approx, by calling
ap.error() with a clear message before count() and judge() run.
🪄 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: aea33bf3-b995-4b23-9737-3e3ffe704fdc

📥 Commits

Reviewing files that changed from the base of the PR and between 3bda9e1 and 88a64ac.

📒 Files selected for processing (12)
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-create.md
  • skills/lark-doc/references/lark-doc-fetch.md
  • skills/lark-doc/references/lark-doc-md.md
  • skills/lark-doc/references/lark-doc-media-insert.md
  • skills/lark-doc/references/lark-doc-update.md
  • skills/lark-doc/references/lark-doc-whiteboard.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 thread skills/lark-doc/references/style/lark-doc-style.md
@liuxin-0319 liuxin-0319 force-pushed the chore/sync-lark-doc-from-online-doc branch from 88a64ac to ba05c91 Compare July 1, 2026 09:31

@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

🧹 Nitpick comments (5)
skills/lark-doc/scripts/count_chars.py (1)

39-51: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Validate doc_id before passing to subprocess.

doc_id flows directly from user input (--doc) into a subprocess.run command list. While this is a CLI tool (not a network service), add a format validation (e.g., alphanumeric, expected length/pattern) to fail fast on malformed input and reduce command injection surface.

🤖 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/scripts/count_chars.py` around lines 39 - 51, Validate the
user-supplied doc_id before it reaches fetch_raw_content’s subprocess.run
command list, since --doc flows directly into the lark-cli invocation. Add a
fast-fail format check in fetch_raw_content (or the CLI argument parsing path)
using the existing doc_id value, enforcing the expected document ID
pattern/length and exiting with a clear message on malformed input. Keep the
subprocess call unchanged, but only after doc_id passes validation.
skills/lark-doc/references/style/lark-doc-create-workflow.md (4)

25-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Command prefix inconsistency extends to block_insert_after.

Line 28 presents block_insert_after as a bare command without any lark-cli docs prefix, while line 10 instructs to run lark-cli docs commands. If block_insert_after is a subcommand of lark-cli docs, it should be written as lark-cli docs block_insert_after or docs block_insert_after for consistency with the convention established in line 10.

🤖 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/style/lark-doc-create-workflow.md` around lines 25
- 31, This section has a command prefix inconsistency: block_insert_after is
shown without the lark-cli docs prefix, which conflicts with the command style
used elsewhere. Update the workflow text in lark-doc-create-workflow.md so the
block_insert_after usage matches the same invocation convention as docs +create,
using the proper full subcommand form consistently throughout the instructions.

49-57: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Clarify working directory for count_chars.py invocation.

Line 54 uses uv run scripts/count_chars.py with the note that the script is at "lark-doc skill 根的 scripts/ 下". Since this workflow document is in references/style/, a user running from this file's directory would need ../../scripts/count_chars.py. Consider either:

  1. Adding a cd instruction to the skill root before command examples
  2. Using ../../scripts/count_chars.py in the example
  3. Adding a note that commands assume the skill root as working directory
🤖 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/style/lark-doc-create-workflow.md` around lines 49
- 57, The `count_chars.py` invocation in the “字数校验” step is ambiguous because
the workflow lives under `references/style/` but the command assumes the skill
root as the working directory. Clarify this by updating the instruction around
`uv run scripts/count_chars.py` to either explicitly say to run from the
lark-doc skill root, or adjust the path to the script accordingly, so users can
reliably locate and execute the command.

10-10: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Unify CLI command prefix convention.

Line 10 uses lark-cli docs while lines 25, 28, 35, and 47 use docs +create, block_insert_after, and docs +fetch without the lark-cli prefix. Pick one convention and apply it throughout to avoid confusion about whether lark-cli is required.

🤖 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/style/lark-doc-create-workflow.md` at line 10, The
workflow doc uses inconsistent CLI prefixing between the Execute step and later
command examples; standardize the command convention across the document by
updating the affected markdown sections that mention docs actions, and make the
same choice consistently in the steps around the symbols `lark-cli docs`, `docs
+create`, `block_insert_after`, and `docs +fetch` so readers can tell whether
`lark-cli` is required everywhere.

62-64: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Inconsistent path specification for lark-doc-xml.md.

Line 64 lists "lark-doc-xml.md 路径" without a relative path, while line 47 and line 64's lark-doc-whiteboard.md use ../lark-doc-whiteboard.md. If lark-doc-xml.md is in the same references/ directory as lark-doc-whiteboard.md, specify ../lark-doc-xml.md for consistency and correct resolution from this file's location.

🤖 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/style/lark-doc-create-workflow.md` around lines 62
- 64, The SVG SubAgent requirements in the workflow doc use an अस्पष्ट reference
for lark-doc-xml.md; update the instruction text near the SVG SubAgent section
to use the same relative-path style as lark-doc-whiteboard.md, specifically
referencing lark-doc-xml.md with a path relative to this document. Keep the rest
of the SVG SubAgent contract unchanged, including the existing symbols
lark-doc-whiteboard.md and “SVG 设计 Workflow”.
🤖 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/scripts/count_chars.py`:
- Around line 76-77: The word-count regex in count_chars.py is too broad because
the en_words pattern includes non-letter symbols like × and ÷ via the À-ÿ range.
Update the regex used in the en_words calculation to exclude those code points,
either by narrowing the allowed Unicode ranges or explicitly removing the
offending characters, while keeping the rest of the count_chars logic unchanged.
- Around line 104-114: The `count_chars.py` CLI file-loading path in the
`args.file` branch still opens files directly and accepts unvalidated paths.
Update the `elif args.file` handling to use a context manager in the file-read
logic so the handle is always closed, and add path validation/normalization
before reading to block traversal or absolute-path access (for example by
constraining inputs to an allowed base or reusing any existing `@file`
restriction helper). Keep the change localized around the `fetch_raw_content`,
`args.file`, and `sys.stdin` branches.

---

Nitpick comments:
In `@skills/lark-doc/references/style/lark-doc-create-workflow.md`:
- Around line 25-31: This section has a command prefix inconsistency:
block_insert_after is shown without the lark-cli docs prefix, which conflicts
with the command style used elsewhere. Update the workflow text in
lark-doc-create-workflow.md so the block_insert_after usage matches the same
invocation convention as docs +create, using the proper full subcommand form
consistently throughout the instructions.
- Around line 49-57: The `count_chars.py` invocation in the “字数校验” step is
ambiguous because the workflow lives under `references/style/` but the command
assumes the skill root as the working directory. Clarify this by updating the
instruction around `uv run scripts/count_chars.py` to either explicitly say to
run from the lark-doc skill root, or adjust the path to the script accordingly,
so users can reliably locate and execute the command.
- Line 10: The workflow doc uses inconsistent CLI prefixing between the Execute
step and later command examples; standardize the command convention across the
document by updating the affected markdown sections that mention docs actions,
and make the same choice consistently in the steps around the symbols `lark-cli
docs`, `docs +create`, `block_insert_after`, and `docs +fetch` so readers can
tell whether `lark-cli` is required everywhere.
- Around line 62-64: The SVG SubAgent requirements in the workflow doc use an
अस्पष्ट reference for lark-doc-xml.md; update the instruction text near the SVG
SubAgent section to use the same relative-path style as lark-doc-whiteboard.md,
specifically referencing lark-doc-xml.md with a path relative to this document.
Keep the rest of the SVG SubAgent contract unchanged, including the existing
symbols lark-doc-whiteboard.md and “SVG 设计 Workflow”.

In `@skills/lark-doc/scripts/count_chars.py`:
- Around line 39-51: Validate the user-supplied doc_id before it reaches
fetch_raw_content’s subprocess.run command list, since --doc flows directly into
the lark-cli invocation. Add a fast-fail format check in fetch_raw_content (or
the CLI argument parsing path) using the existing doc_id value, enforcing the
expected document ID pattern/length and exiting with a clear message on
malformed input. Keep the subprocess call unchanged, but only after doc_id
passes validation.
🪄 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: d95b1c23-38cd-4311-90ec-21c24b44e25d

📥 Commits

Reviewing files that changed from the base of the PR and between 88a64ac and ba05c91.

📒 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
✅ Files skipped from review due to trivial changes (1)
  • skills/lark-doc/references/lark-doc-update.md

Comment thread skills/lark-doc/scripts/count_chars.py Outdated
Comment thread skills/lark-doc/scripts/count_chars.py Outdated
@fangshuyu-768 fangshuyu-768 force-pushed the chore/sync-lark-doc-from-online-doc branch 8 times, most recently from cfa7f28 to e5b9f7c Compare July 2, 2026 04:26
@github-actions github-actions Bot added size/M Single-domain feat or fix with limited business impact and removed size/L Large or sensitive change across domains or core paths labels Jul 2, 2026

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

🧹 Nitpick comments (2)
skills/lark-doc/references/lark-doc-word-stat.md (1)

41-43: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Define the 上下浮动 rule.

Step 1 accepts requests like 上下浮动, but the normalization rule only covers x 字左右. Add an explicit conversion for that case so the target interval is deterministic.

Proposed wording
-1. 把要求归一成目标区间:`>x`→`[x, +∞)`;`<y`→`(-∞, y]`;`x-y`→`[x, y]`;`x 字左右`→`[round(0.9x), round(1.1x)]`
+1. 把要求归一成目标区间:`>x`→`[x, +∞)`;`<y`→`(-∞, y]`;`x-y`→`[x, y]`;`x 字左右` / `上下浮动`→`[round(0.9x), round(1.1x)]`
🤖 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-word-stat.md` around lines 41 - 43, The
word-count normalization in the reference doc is missing an explicit rule for
“上下浮动,” even though Step 1 accepts it. Update the normalization guidance around
the word-count flow so the `上下浮动` case is converted into a deterministic target
interval, alongside the existing `x 字左右` handling, using the same normalization
section in `lark-doc-word-stat.md`.
skills/lark-doc/references/style/lark-doc-update-workflow.md (1)

8-8: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Clarify the SubAgent split.

Line 8 reads as if all board rendering is offloaded, but Line 53 keeps Mermaid insertion on the main agent. Narrow this to SVG / existing-board work so the workflow doesn't read as contradictory.

Proposed wording
-2. **Execute(执行)** — 由主 Agent 自己运行 `lark-cli docs` 命令推进改写;仅画板渲染按需隔离到 SubAgent(见步骤二)
+2. **Execute(执行)** — 由主 Agent 自己运行 `lark-cli docs` 命令推进改写;仅 SVG 画板 / 已有画板更新按需隔离到 SubAgent(见步骤二)
🤖 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/style/lark-doc-update-workflow.md` at line 8, The
workflow text is ambiguous about what the SubAgent handles, since it sounds like
all board rendering is delegated while Mermaid insertion still stays with the
main agent. Update the wording in the step that mentions “Execute(执行)” and the
related board-rendering guidance so it clearly limits SubAgent use to SVG /
existing-board work, while keeping Mermaid insertion on the main Agent, using
the existing “Execute(执行)” and “步骤二” references to keep the split consistent.
🤖 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.

Nitpick comments:
In `@skills/lark-doc/references/lark-doc-word-stat.md`:
- Around line 41-43: The word-count normalization in the reference doc is
missing an explicit rule for “上下浮动,” even though Step 1 accepts it. Update the
normalization guidance around the word-count flow so the `上下浮动` case is
converted into a deterministic target interval, alongside the existing `x 字左右`
handling, using the same normalization section in `lark-doc-word-stat.md`.

In `@skills/lark-doc/references/style/lark-doc-update-workflow.md`:
- Line 8: The workflow text is ambiguous about what the SubAgent handles, since
it sounds like all board rendering is delegated while Mermaid insertion still
stays with the main agent. Update the wording in the step that mentions
“Execute(执行)” and the related board-rendering guidance so it clearly limits
SubAgent use to SVG / existing-board work, while keeping Mermaid insertion on
the main Agent, using the existing “Execute(执行)” and “步骤二” references to keep
the split consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 956f1e8d-6057-4b74-b583-d066ce4caabf

📥 Commits

Reviewing files that changed from the base of the PR and between e5b9f7c and 18250d6.

📒 Files selected for processing (3)
  • skills/lark-doc/references/lark-doc-word-stat.md
  • skills/lark-doc/references/style/lark-doc-create-workflow.md
  • skills/lark-doc/references/style/lark-doc-update-workflow.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/lark-doc/references/style/lark-doc-create-workflow.md

@fangshuyu-768 fangshuyu-768 force-pushed the chore/sync-lark-doc-from-online-doc branch 3 times, most recently from 522288b to 65f9260 Compare July 2, 2026 06:28
Sync the lark-doc skill docs with online guidance.

Refine create/update workflow checks, word-count validation, whiteboard routing, and style rules.

Co-authored-by: fangshuyu-768 <shuyufang768@outlook.com>
@liuxin-0319 liuxin-0319 force-pushed the chore/sync-lark-doc-from-online-doc branch from 1ba681e to 978edbc Compare July 3, 2026 06:34
@fangshuyu-768 fangshuyu-768 merged commit 3595356 into main Jul 3, 2026
36 of 38 checks passed
@fangshuyu-768 fangshuyu-768 deleted the chore/sync-lark-doc-from-online-doc branch July 3, 2026 07:55
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/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants