Skip to content

refactor(whiteboard): introduce lark-doc-whiteboard.md and streamline whiteboard workflow#502

Merged
syh-cpdsss merged 1 commit intomainfrom
feat/whiteboard-skill-optimize
Apr 17, 2026
Merged

refactor(whiteboard): introduce lark-doc-whiteboard.md and streamline whiteboard workflow#502
syh-cpdsss merged 1 commit intomainfrom
feat/whiteboard-skill-optimize

Conversation

@zkh-bytedance
Copy link
Copy Markdown
Collaborator

@zkh-bytedance zkh-bytedance commented Apr 16, 2026

Summary

Changes

  • add lark-doc/references/lark-doc-whiteboard.md: defines role boundaries
    between lark-doc and lark-whiteboard, step-by-step doc↔whiteboard
    coordination flow, and semantic-to-chart-type mapping table
  • lark-doc-create.md: tighten post-create whiteboard flow (step 2 now
    directly references the "渲染 & 写入画板" section); strengthen 主动画板
    guideline with explicit placeholder syntax, prohibition on PNG/SVG
    substitution, and concrete routing examples
  • lark-whiteboard/SKILL.md: upgrade to v0.2, rewrite with structured
    quick-decision table, creation/modification workflows, render routing
    table, and dry-run write guard
  • extract rendering routes into routes/{dsl,mermaid,svg}.md; add
    per-chart scene guides under scenes/
  • remove lark-whiteboard-cli/SKILL.md (absorbed into lark-whiteboard)

Test Plan

  • Unit tests pass
  • Manual local verification confirms the lark xxx command works as expected

Related Issues

  • None

Summary by CodeRabbit

  • New Features

    • Added dedicated DSL, Mermaid and SVG diagram creation routes and a standardized script-based generation path; stronger safety gating (dry‑run + user confirmation) before overwriting boards.
  • Documentation

    • Clarified document vs. whiteboard responsibilities and mandated inserting blank whiteboard placeholders (no PNG/SVG substitutions).
    • Consolidated diagram-authoring guidance and updated scene/visual rules (swimlane, charts, layouts).
  • Chores

    • Enforced runtime prereqs and explicit consent for installing tooling.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

📝 Walkthrough

Walkthrough

Reorganizes documentation to split lark-doc and lark-whiteboard responsibilities, mandate inserting blank whiteboard placeholders and token-based rendering flows, introduces route-specific rendering guides (DSL/Mermaid/SVG), updates whiteboard-cli guidance (v0.2.x) and enforces CommonJS .cjs for scene script generation. (38 words)

Changes

Cohort / File(s) Summary
lark-doc guidance
skills/lark-doc/SKILL.md, skills/lark-doc/references/lark-doc-create.md
Consolidated whiteboard policy: require inserting <whiteboard type="blank"></whiteboard> placeholders, read data.board_tokens, and delegate rendering/writing to lark-whiteboard; removed prior freeform edit guidance.
Docs removed / redirected
skills/lark-doc/references/lark-doc-whiteboard-update.md (deleted)
Deleted legacy +whiteboard-update doc; references now point to lark-whiteboard skill docs.
Doc: lark-doc ↔ lark-whiteboard boundary
skills/lark-doc/references/lark-doc-whiteboard.md (new)
New file formalizing responsibility split: lark-doc inserts placeholders and returns tokens; lark-whiteboard handles generation, validation, and final writes; mandates filling each token.
Whiteboard skill core
skills/lark-whiteboard/SKILL.md, skills/lark-whiteboard/references/*
Restructured workflows and decision branches; added pre-checks (whiteboard-cli@0.2.x), rendering router (DSL/Mermaid/SVG), SVG fallback, idempotency token, dry-run/overwrite gating, and adjusted relative links.
Removed CLI skill
skills/lark-whiteboard-cli/SKILL.md (deleted)
Deleted prior whiteboard-cli skill doc; CLI guidance migrated into lark-whiteboard route/reference docs.
New rendering routes
skills/lark-whiteboard/routes/dsl.md, .../routes/mermaid.md, .../routes/svg.md
Added end-to-end route docs for DSL/Mermaid/SVG: artifact dirs, preview/render-check loops, conversion to OpenAPI JSON, and piping into lark-cli whiteboard +update with idempotency and dry‑run steps.
Reference & examples updates
skills/lark-whiteboard/references/lark-whiteboard-update.md, .../references/lark-whiteboard-query.md, .../references/layout.md
Adjusted example commands to use whiteboard-cli@^0.2.0, added --idempotent-token, switched some reference paths, and changed node xxx.jsnode xxx.cjs.
Scene script standardization
skills/lark-whiteboard/scenes/*.{md} (bar-chart,fishbone,flywheel,funnel,line-chart,treemap)
Require CommonJS .cjs scripts for coordinate/JSON generation; examples switched to require/CommonJS and .cjs filenames.
Scene style & small edits
skills/lark-whiteboard/scenes/swimlane.md, .../organization.md, .../pyramid.md, .../mermaid.md
Swimlane: background and spacing rule changes; Organization: removed fs.writeFileSync side effect; Pyramid: convert to CommonJS import; Mermaid: removed CLI snippet.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant lark-doc as "lark-doc\n(read/update)"
  participant lark-whiteboard as "lark-whiteboard\n(generate/render)"
  participant whiteboard-cli as "whiteboard-cli\n(renderer/converter)"
  participant lark-cli as "lark-cli\n(+update)"
  participant Feishu as "Feishu Whiteboard"

  User->>lark-doc: docs +update (insert <whiteboard type=\"blank\">)
  lark-doc-->>User: returns data.board_tokens
  User->>lark-whiteboard: prepare diagram (DSL/Mermaid/SVG) per SKILL.md
  lark-whiteboard->>whiteboard-cli: render/convert -> diagram.json or png
  whiteboard-cli-->>lark-whiteboard: artifact (diagram.json / png)
  lark-whiteboard->>lark-cli: lark-cli whiteboard +update --source <artifact> --idempotent-token ...
  lark-cli-->>Feishu: write/update board
  Feishu-->>lark-cli: board_token/result
  lark-cli-->>lark-whiteboard: success + board_token
  lark-whiteboard-->>User: report board_token/completion
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • zhouyue-bytedance

Poem

🐰 I hopped through docs with glee and cheer,

Blank boards set ready, tokens near.
DSL, Mermaid, SVG take flight,
Routes and rules all set just right.
A rabbit’s nod — the boards delight! 🎨🧩

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: introducing lark-doc-whiteboard.md and streamlining the whiteboard workflow, matching the primary objectives of the PR.
Description check ✅ Passed The description is mostly complete with a clear summary, comprehensive list of changes, test plan checkboxes, and related issues section following the template structure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/whiteboard-skill-optimize

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 and usage tips.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 16, 2026

CLA assistant check
All committers have signed the CLA.

@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 Apr 16, 2026
@zkh-bytedance zkh-bytedance force-pushed the feat/whiteboard-skill-optimize branch 12 times, most recently from 3157370 to 3bd5973 Compare April 16, 2026 17:24
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.09%. Comparing base (5280517) to head (4d923a3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #502   +/-   ##
=======================================
  Coverage   59.09%   59.09%           
=======================================
  Files         384      384           
  Lines       32672    32672           
=======================================
  Hits        19307    19307           
  Misses      11556    11556           
  Partials     1809     1809           

☔ View full report in Codecov by Sentry.
📢 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.

@zkh-bytedance zkh-bytedance force-pushed the feat/whiteboard-skill-optimize branch 2 times, most recently from d5b6fcd to 35c3d86 Compare April 17, 2026 07:17
@zkh-bytedance zkh-bytedance changed the title Feat/whiteboard skill optimize refactor(whiteboard): introduce lark-doc-whiteboard.md and streamline whiteboard workflow Apr 17, 2026
@zkh-bytedance zkh-bytedance force-pushed the feat/whiteboard-skill-optimize branch 7 times, most recently from 417e22b to 38de665 Compare April 17, 2026 09:10
@zkh-bytedance zkh-bytedance marked this pull request as ready for review April 17, 2026 09:17
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 17, 2026

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@4d923a38db06a62f2ec0a49b7d7834dc4f986f7a

🧩 Skill update

npx skills add larksuite/cli#feat/whiteboard-skill-optimize -y -g

@zkh-bytedance zkh-bytedance force-pushed the feat/whiteboard-skill-optimize branch from 38de665 to 03dd03d Compare April 17, 2026 09:24
@zkh-bytedance zkh-bytedance force-pushed the feat/whiteboard-skill-optimize branch from 03dd03d to 1ce3309 Compare April 17, 2026 09:24
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

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

⚠️ Outside diff range comments (1)
skills/lark-whiteboard/scenes/swimlane.md (1)

192-202: ⚠️ Potential issue | 🟡 Minor

示例与“带 label 连线需 gap >= 64”规则不一致。

Line 347 使用了 label,但骨架示例在 Line 202 / Line 271 仍是 gap: 40。建议统一为 64+,否则会和上文强制规则冲突。

💡 建议修正
-          "gap": 40,
+          "gap": 64,
...
-          "gap": 40,
+          "gap": 64,

Also applies to: 271-271, 347-348

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-whiteboard/scenes/swimlane.md` around lines 192 - 202, The
examples in swimlane.md show a skeleton frame with "gap": 40 while the text
enforces "带 label 连线需 gap >= 64", causing a contradiction; update the skeleton
examples that define "gap" (notably the frame with "id": "lane-a" and any other
swimlane frames that include a label) to use gap: 64 (or greater) so the
examples match the rule, and ensure any other instances in the same document
that include a "label" are updated likewise.
🧹 Nitpick comments (1)
skills/lark-whiteboard/routes/svg.md (1)

28-39: 建议在本路由文档补一条“失败即切 DSL”提示。

当前流程写了渲染与检查命令,但没在本页直接强调失败回退策略。建议补一段,避免执行者在 SVG 路径内反复修补。

📝 建议补充文案
 ### 3. 渲染审查
@@
 `npx -y `@larksuite/whiteboard-cli`@^0.2.0 --check` 检测 `text-overflow` 和 `node-overlap`, 并结合视觉效果(查看 PNG)进行调整
+
+### 4. 失败回退(必须)
+
+- 若渲染命令出现语法级报错(非 `--check` 的 warn/error),**丢弃当前 SVG**。
+- 立即切换到 `routes/dsl.md` 从零重画,**不要在原 SVG 上逐行修补**。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-whiteboard/routes/svg.md` around lines 28 - 39, 在“3.
渲染审查”段落中补一条“失败即切 DSL”提示:在描述渲染/检查的命令(例如使用 npx -y `@larksuite/whiteboard-cli`@^0.2.0
的 -f svg、--check、--to openapi 等命令)之后,追加一行明确说明:若白板 SVG 渲染或检查失败(如出现 text-overflow
或 node-overlap 且无法在 SVG 内快速修复),应立即停止在 SVG 文件中反复修补并回退到编辑源 DSL(或对应的原始白板 DSL
文件)进行修正和重生成,而不是在 SVG 路径内继续手工调整;同时建议说明优先级(首选修改 DSL -> 重新生成 SVG ->
再次检查),以便执行者快速采取回退策略。
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/lark-whiteboard/routes/dsl.md`:
- Line 7: The fenced code block in dsl.md that begins with "Step 1: 路由 & 读取知识"
is missing a language identifier, causing markdownlint MD040; update the opening
fence (the triple backticks that start that workflow block) to include the
language token text (i.e., change ``` to ```text) so the block is
language-labelled and the linter passes.

In `@skills/lark-whiteboard/routes/mermaid.md`:
- Line 7: The fenced workflow code block in
skills/lark-whiteboard/routes/mermaid.md is missing a language tag (MD040);
update the opening triple-backtick for the block that starts with "Step 1: 读取知识"
to include a language tag (recommended "text") so it becomes ```text to silence
the markdownlint warning and keep the block markup valid.

In `@skills/lark-whiteboard/SKILL.md`:
- Around line 120-140: The execution step of the write-to-whiteboard example is
missing the required --overwrite flag: when the dry-run used npx ... | lark-cli
whiteboard +update ... --overwrite --dry-run to preview deletions, the follow-up
execution command must include both --overwrite and --yes to actually apply
deletions; update the second block (the lark-cli whiteboard +update invocation)
to add the --overwrite flag alongside --yes (retain --as user and the
idempotent-token usage).

---

Outside diff comments:
In `@skills/lark-whiteboard/scenes/swimlane.md`:
- Around line 192-202: The examples in swimlane.md show a skeleton frame with
"gap": 40 while the text enforces "带 label 连线需 gap >= 64", causing a
contradiction; update the skeleton examples that define "gap" (notably the frame
with "id": "lane-a" and any other swimlane frames that include a label) to use
gap: 64 (or greater) so the examples match the rule, and ensure any other
instances in the same document that include a "label" are updated likewise.

---

Nitpick comments:
In `@skills/lark-whiteboard/routes/svg.md`:
- Around line 28-39: 在“3. 渲染审查”段落中补一条“失败即切 DSL”提示:在描述渲染/检查的命令(例如使用 npx -y
`@larksuite/whiteboard-cli`@^0.2.0 的 -f svg、--check、--to openapi
等命令)之后,追加一行明确说明:若白板 SVG 渲染或检查失败(如出现 text-overflow 或 node-overlap 且无法在 SVG
内快速修复),应立即停止在 SVG 文件中反复修补并回退到编辑源 DSL(或对应的原始白板 DSL 文件)进行修正和重生成,而不是在 SVG
路径内继续手工调整;同时建议说明优先级(首选修改 DSL -> 重新生成 SVG -> 再次检查),以便执行者快速采取回退策略。
🪄 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: b5bb23a4-1ddb-48da-8d9c-5388b051dfb6

📥 Commits

Reviewing files that changed from the base of the PR and between 5280517 and 38de665.

📒 Files selected for processing (31)
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-create.md
  • skills/lark-doc/references/lark-doc-whiteboard-update.md
  • skills/lark-doc/references/lark-doc-whiteboard.md
  • skills/lark-whiteboard-cli/SKILL.md
  • skills/lark-whiteboard/SKILL.md
  • skills/lark-whiteboard/references/connectors.md
  • skills/lark-whiteboard/references/content.md
  • skills/lark-whiteboard/references/lark-whiteboard-query.md
  • skills/lark-whiteboard/references/lark-whiteboard-update.md
  • skills/lark-whiteboard/references/layout.md
  • skills/lark-whiteboard/references/schema.md
  • skills/lark-whiteboard/references/style.md
  • skills/lark-whiteboard/references/typography.md
  • skills/lark-whiteboard/routes/dsl.md
  • skills/lark-whiteboard/routes/mermaid.md
  • skills/lark-whiteboard/routes/svg.md
  • skills/lark-whiteboard/scenes/architecture.md
  • skills/lark-whiteboard/scenes/bar-chart.md
  • skills/lark-whiteboard/scenes/comparison.md
  • skills/lark-whiteboard/scenes/fishbone.md
  • skills/lark-whiteboard/scenes/flowchart.md
  • skills/lark-whiteboard/scenes/flywheel.md
  • skills/lark-whiteboard/scenes/funnel.md
  • skills/lark-whiteboard/scenes/line-chart.md
  • skills/lark-whiteboard/scenes/mermaid.md
  • skills/lark-whiteboard/scenes/milestone.md
  • skills/lark-whiteboard/scenes/organization.md
  • skills/lark-whiteboard/scenes/pyramid.md
  • skills/lark-whiteboard/scenes/swimlane.md
  • skills/lark-whiteboard/scenes/treemap.md
💤 Files with no reviewable changes (3)
  • skills/lark-whiteboard/scenes/mermaid.md
  • skills/lark-doc/references/lark-doc-whiteboard-update.md
  • skills/lark-whiteboard-cli/SKILL.md

Comment thread skills/lark-whiteboard/routes/dsl.md
Comment thread skills/lark-whiteboard/routes/mermaid.md
Comment thread skills/lark-whiteboard/SKILL.md
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
skills/lark-whiteboard/SKILL.md (1)

135-141: ⚠️ Potential issue | 🟠 Major

执行命令缺少 --overwrite,与前置 dry-run 语义不一致。

Line 123-124 强制先用 --overwrite --dry-run 探测删除;但 Line 141 执行命令未携带 --overwrite,会导致“确认删除后实际不按覆盖执行”的流程偏差。

✅ Suggested fix
 npx -y `@larksuite/whiteboard-cli`@^0.2.0 -i <产物文件> --to openapi --format json \
   | lark-cli whiteboard +update \
     --whiteboard-token <Token> \
     --source - --input_format raw \
     --idempotent-token <10+字符唯一串> \
-    --yes --as user
+    --overwrite --yes --as user
#!/bin/bash
# Verify dry-run and execute command consistency inside this section
set -euo pipefail

FILE="skills/lark-whiteboard/SKILL.md"
echo "== target section around write flow =="
sed -n '120,145p' "$FILE"

echo
echo "== check whether execute block includes --overwrite =="
rg -n -- '--overwrite --dry-run|--yes --as user|--overwrite --yes' "$FILE"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-whiteboard/SKILL.md` around lines 135 - 141, The execute command
in the second step (the pipeline starting with "npx -y
`@larksuite/whiteboard-cli`@^0.2.0 ... | lark-cli whiteboard +update
--whiteboard-token <Token> --source - --input_format raw --idempotent-token
<10+字符唯一串> --yes --as user") is missing the --overwrite flag, causing
inconsistency with the prior dry-run which used "--overwrite --dry-run"; update
that command to include --overwrite (e.g., add "--overwrite" alongside the
existing flags) so the confirmation step actually performs overwrites as
intended.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/lark-whiteboard/SKILL.md`:
- Line 37: The example command shows using `whiteboard +update` with a
positional `<token>` which is invalid; update the example to pass the token via
the explicit `--whiteboard-token <token>` flag (i.e., change the snippet that
currently shows `lark-cli whiteboard +update <token> --source - --input_format
mermaid` to use `--whiteboard-token <token>`), ensuring the command uses the
`whiteboard +update` subcommand and the `--whiteboard-token` flag name exactly
as required.

---

Duplicate comments:
In `@skills/lark-whiteboard/SKILL.md`:
- Around line 135-141: The execute command in the second step (the pipeline
starting with "npx -y `@larksuite/whiteboard-cli`@^0.2.0 ... | lark-cli whiteboard
+update --whiteboard-token <Token> --source - --input_format raw
--idempotent-token <10+字符唯一串> --yes --as user") is missing the --overwrite flag,
causing inconsistency with the prior dry-run which used "--overwrite --dry-run";
update that command to include --overwrite (e.g., add "--overwrite" alongside
the existing flags) so the confirmation step actually performs overwrites as
intended.
🪄 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: 0a7c59af-adb8-4dea-bb32-d3afc4ab8fcf

📥 Commits

Reviewing files that changed from the base of the PR and between 38de665 and 1ce3309.

📒 Files selected for processing (31)
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-create.md
  • skills/lark-doc/references/lark-doc-whiteboard-update.md
  • skills/lark-doc/references/lark-doc-whiteboard.md
  • skills/lark-whiteboard-cli/SKILL.md
  • skills/lark-whiteboard/SKILL.md
  • skills/lark-whiteboard/references/connectors.md
  • skills/lark-whiteboard/references/content.md
  • skills/lark-whiteboard/references/lark-whiteboard-query.md
  • skills/lark-whiteboard/references/lark-whiteboard-update.md
  • skills/lark-whiteboard/references/layout.md
  • skills/lark-whiteboard/references/schema.md
  • skills/lark-whiteboard/references/style.md
  • skills/lark-whiteboard/references/typography.md
  • skills/lark-whiteboard/routes/dsl.md
  • skills/lark-whiteboard/routes/mermaid.md
  • skills/lark-whiteboard/routes/svg.md
  • skills/lark-whiteboard/scenes/architecture.md
  • skills/lark-whiteboard/scenes/bar-chart.md
  • skills/lark-whiteboard/scenes/comparison.md
  • skills/lark-whiteboard/scenes/fishbone.md
  • skills/lark-whiteboard/scenes/flowchart.md
  • skills/lark-whiteboard/scenes/flywheel.md
  • skills/lark-whiteboard/scenes/funnel.md
  • skills/lark-whiteboard/scenes/line-chart.md
  • skills/lark-whiteboard/scenes/mermaid.md
  • skills/lark-whiteboard/scenes/milestone.md
  • skills/lark-whiteboard/scenes/organization.md
  • skills/lark-whiteboard/scenes/pyramid.md
  • skills/lark-whiteboard/scenes/swimlane.md
  • skills/lark-whiteboard/scenes/treemap.md
💤 Files with no reviewable changes (3)
  • skills/lark-whiteboard/scenes/mermaid.md
  • skills/lark-doc/references/lark-doc-whiteboard-update.md
  • skills/lark-whiteboard-cli/SKILL.md
✅ Files skipped from review due to trivial changes (11)
  • skills/lark-whiteboard/scenes/fishbone.md
  • skills/lark-whiteboard/scenes/pyramid.md
  • skills/lark-whiteboard/scenes/flywheel.md
  • skills/lark-whiteboard/references/layout.md
  • skills/lark-whiteboard/scenes/funnel.md
  • skills/lark-whiteboard/references/lark-whiteboard-query.md
  • skills/lark-whiteboard/scenes/line-chart.md
  • skills/lark-whiteboard/routes/mermaid.md
  • skills/lark-whiteboard/scenes/swimlane.md
  • skills/lark-doc/references/lark-doc-whiteboard.md
  • skills/lark-whiteboard/references/lark-whiteboard-update.md
🚧 Files skipped from review as they are similar to previous changes (4)
  • skills/lark-whiteboard/scenes/organization.md
  • skills/lark-whiteboard/scenes/treemap.md
  • skills/lark-whiteboard/scenes/bar-chart.md
  • skills/lark-doc/references/lark-doc-create.md

Comment thread skills/lark-whiteboard/SKILL.md
@zkh-bytedance zkh-bytedance force-pushed the feat/whiteboard-skill-optimize branch from 1ce3309 to 3434eea Compare April 17, 2026 09:37
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
skills/lark-whiteboard/SKILL.md (1)

37-37: ⚠️ Potential issue | 🔴 Critical

Use explicit --whiteboard-token flag instead of positional argument.

The example command shows +update <token> with a positional token argument, but whiteboard +update requires the explicit flag --whiteboard-token <token>. The current example will fail when executed.

🔧 Proposed fix
-> 例:`cat chart.mmd | lark-cli whiteboard +update <token> --source - --input_format mermaid`
+> 例:`cat chart.mmd | lark-cli whiteboard +update --whiteboard-token <token> --source - --input_format mermaid`
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-whiteboard/SKILL.md` at line 37, Update the example for the
whiteboard command to use the explicit --whiteboard-token flag instead of a
positional token; specifically change the shown invocation of whiteboard +update
(the example line containing `cat chart.mmd | lark-cli whiteboard +update
<token> --source - --input_format mermaid`) to pass the token with
`--whiteboard-token <token>` so it matches the required flag for the whiteboard
+update command.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/lark-whiteboard/SKILL.md`:
- Around line 135-140: The execution command under "第二步:确认后执行" in SKILL.md
currently uses the dry-run flag; update the CLI invocation (the npx ... |
lark-cli whiteboard +update ... command) to replace the --dry-run usage with
--yes so the update runs for real (ensure the command still includes
--whiteboard-token, --source -, --input_format raw, and --idempotent-token as
shown).

---

Duplicate comments:
In `@skills/lark-whiteboard/SKILL.md`:
- Line 37: Update the example for the whiteboard command to use the explicit
--whiteboard-token flag instead of a positional token; specifically change the
shown invocation of whiteboard +update (the example line containing `cat
chart.mmd | lark-cli whiteboard +update <token> --source - --input_format
mermaid`) to pass the token with `--whiteboard-token <token>` so it matches the
required flag for the whiteboard +update command.
🪄 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: 10940a76-4a8a-4ac7-acb4-d91948643201

📥 Commits

Reviewing files that changed from the base of the PR and between 1ce3309 and 3434eea.

📒 Files selected for processing (31)
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-create.md
  • skills/lark-doc/references/lark-doc-whiteboard-update.md
  • skills/lark-doc/references/lark-doc-whiteboard.md
  • skills/lark-whiteboard-cli/SKILL.md
  • skills/lark-whiteboard/SKILL.md
  • skills/lark-whiteboard/references/connectors.md
  • skills/lark-whiteboard/references/content.md
  • skills/lark-whiteboard/references/lark-whiteboard-query.md
  • skills/lark-whiteboard/references/lark-whiteboard-update.md
  • skills/lark-whiteboard/references/layout.md
  • skills/lark-whiteboard/references/schema.md
  • skills/lark-whiteboard/references/style.md
  • skills/lark-whiteboard/references/typography.md
  • skills/lark-whiteboard/routes/dsl.md
  • skills/lark-whiteboard/routes/mermaid.md
  • skills/lark-whiteboard/routes/svg.md
  • skills/lark-whiteboard/scenes/architecture.md
  • skills/lark-whiteboard/scenes/bar-chart.md
  • skills/lark-whiteboard/scenes/comparison.md
  • skills/lark-whiteboard/scenes/fishbone.md
  • skills/lark-whiteboard/scenes/flowchart.md
  • skills/lark-whiteboard/scenes/flywheel.md
  • skills/lark-whiteboard/scenes/funnel.md
  • skills/lark-whiteboard/scenes/line-chart.md
  • skills/lark-whiteboard/scenes/mermaid.md
  • skills/lark-whiteboard/scenes/milestone.md
  • skills/lark-whiteboard/scenes/organization.md
  • skills/lark-whiteboard/scenes/pyramid.md
  • skills/lark-whiteboard/scenes/swimlane.md
  • skills/lark-whiteboard/scenes/treemap.md
💤 Files with no reviewable changes (3)
  • skills/lark-whiteboard/scenes/mermaid.md
  • skills/lark-doc/references/lark-doc-whiteboard-update.md
  • skills/lark-whiteboard-cli/SKILL.md
✅ Files skipped from review due to trivial changes (10)
  • skills/lark-whiteboard/references/layout.md
  • skills/lark-whiteboard/scenes/pyramid.md
  • skills/lark-whiteboard/scenes/funnel.md
  • skills/lark-whiteboard/scenes/flywheel.md
  • skills/lark-whiteboard/scenes/fishbone.md
  • skills/lark-whiteboard/references/lark-whiteboard-query.md
  • skills/lark-whiteboard/scenes/bar-chart.md
  • skills/lark-whiteboard/routes/mermaid.md
  • skills/lark-doc/references/lark-doc-whiteboard.md
  • skills/lark-whiteboard/scenes/organization.md
🚧 Files skipped from review as they are similar to previous changes (5)
  • skills/lark-whiteboard/scenes/treemap.md
  • skills/lark-whiteboard/scenes/line-chart.md
  • skills/lark-doc/references/lark-doc-create.md
  • skills/lark-whiteboard/scenes/swimlane.md
  • skills/lark-whiteboard/references/lark-whiteboard-update.md

Comment thread skills/lark-whiteboard/SKILL.md
…teboard workflow

- add lark-doc/references/lark-doc-whiteboard.md: defines role boundaries
  between lark-doc and lark-whiteboard, step-by-step doc↔whiteboard
  coordination flow, and semantic-to-chart-type mapping table
- lark-doc-create.md: tighten post-create whiteboard flow (step 2 now
  directly references the "渲染 & 写入画板" section); strengthen 主动画板
  guideline with explicit placeholder syntax, prohibition on PNG/SVG
  substitution, and concrete routing examples
- lark-whiteboard/SKILL.md: upgrade to v0.2, rewrite with structured
  quick-decision table, creation/modification workflows, render routing
  table, and dry-run write guard
- extract rendering routes into routes/{dsl,mermaid,svg}.md; add
  per-chart scene guides under scenes/
- remove lark-whiteboard-cli/SKILL.md (absorbed into lark-whiteboard)
@zkh-bytedance zkh-bytedance force-pushed the feat/whiteboard-skill-optimize branch from 3434eea to 4d923a3 Compare April 17, 2026 09:45
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (4)
skills/lark-whiteboard/routes/mermaid.md (1)

7-7: ⚠️ Potential issue | 🟡 Minor

Add language tag to fenced code block (MD040).

The workflow block should specify a language identifier (recommended: text) to satisfy markdownlint.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-whiteboard/routes/mermaid.md` at line 7, Add a language
identifier to the fenced code block (the triple-backtick block in mermaid.md
that contains the workflow) to satisfy markdownlint MD040; update the opening
``` to ```text (recommended) so the workflow block has a language tag and the
lint rule passes.
skills/lark-whiteboard/routes/dsl.md (1)

7-7: ⚠️ Potential issue | 🟡 Minor

Add language tag to fenced code block (MD040).

The workflow block starting at line 7 should specify a language identifier (recommended: text) to satisfy markdownlint.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-whiteboard/routes/dsl.md` at line 7, Add a language tag to the
fenced code block in dsl.md that currently begins with ``` (the workflow block
at the top); replace the opening fence with ```text (or another appropriate
language) so the block has a language identifier and satisfies markdownlint rule
MD040.
skills/lark-whiteboard/SKILL.md (2)

135-142: ⚠️ Potential issue | 🔴 Critical

Add --yes flag to the execution step.

The execution command at line 141 (第二步:确认后执行) is missing the --yes flag. The dry-run step uses --overwrite --dry-run to preview deletions, and the execution step should use --overwrite --yes to perform the actual write. This pattern is consistent with the route files (dsl.md line 35 and mermaid.md line 24) which both include --yes in their execution commands.

🔧 Proposed fix
 # 第二步:确认后执行
 npx -y `@larksuite/whiteboard-cli`@^0.2.0 -i <产物文件> --to openapi --format json \
   | lark-cli whiteboard +update \
     --whiteboard-token <Token> \
     --source - --input_format raw \
     --idempotent-token <10+字符唯一串> \
-    --overwrite --as user
+    --overwrite --yes --as user
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-whiteboard/SKILL.md` around lines 135 - 142, Update the execution
pipeline command in SKILL.md (the npx ... | lark-cli whiteboard +update
invocation that currently uses --overwrite --as user) to include the --yes flag
so the write is confirmed (i.e., replace the current execution step's flags
--overwrite --as user with --overwrite --yes --as user) ensuring it matches the
dry-run / route file pattern.

35-37: ⚠️ Potential issue | 🟡 Minor

Fix example command to use --whiteboard-token flag instead of positional argument.

Line 37's example command is incorrect. The whiteboard-token is a required flag, not a positional argument. The code requires --whiteboard-token <token> syntax, not <token> as a bare positional argument.

Correct example
-> 例:`cat chart.mmd | lark-cli whiteboard +update <token> --source - --input_format mermaid`
+> 例:`cat chart.mmd | lark-cli whiteboard +update --whiteboard-token <token> --source - --input_format mermaid`
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-whiteboard/SKILL.md` around lines 35 - 37, Update the example
command in SKILL.md to pass the whiteboard token via the required flag rather
than as a positional argument: replace the bare "<token>" in the example `cat
chart.mmd | lark-cli whiteboard +update <token> --source - --input_format
mermaid` with the flag form `--whiteboard-token <token>` so the command reads
like `cat chart.mmd | lark-cli whiteboard +update --whiteboard-token <token>
--source - --input_format mermaid`; ensure the documentation text mentions the
required `--whiteboard-token` flag and mirrors the CLI's expected flag name.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@skills/lark-whiteboard/routes/dsl.md`:
- Line 7: Add a language tag to the fenced code block in dsl.md that currently
begins with ``` (the workflow block at the top); replace the opening fence with
```text (or another appropriate language) so the block has a language identifier
and satisfies markdownlint rule MD040.

In `@skills/lark-whiteboard/routes/mermaid.md`:
- Line 7: Add a language identifier to the fenced code block (the
triple-backtick block in mermaid.md that contains the workflow) to satisfy
markdownlint MD040; update the opening ``` to ```text (recommended) so the
workflow block has a language tag and the lint rule passes.

In `@skills/lark-whiteboard/SKILL.md`:
- Around line 135-142: Update the execution pipeline command in SKILL.md (the
npx ... | lark-cli whiteboard +update invocation that currently uses --overwrite
--as user) to include the --yes flag so the write is confirmed (i.e., replace
the current execution step's flags --overwrite --as user with --overwrite --yes
--as user) ensuring it matches the dry-run / route file pattern.
- Around line 35-37: Update the example command in SKILL.md to pass the
whiteboard token via the required flag rather than as a positional argument:
replace the bare "<token>" in the example `cat chart.mmd | lark-cli whiteboard
+update <token> --source - --input_format mermaid` with the flag form
`--whiteboard-token <token>` so the command reads like `cat chart.mmd | lark-cli
whiteboard +update --whiteboard-token <token> --source - --input_format
mermaid`; ensure the documentation text mentions the required
`--whiteboard-token` flag and mirrors the CLI's expected flag name.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8e93fe35-caec-4fb8-b8c7-0bcf424a8b79

📥 Commits

Reviewing files that changed from the base of the PR and between 3434eea and 4d923a3.

📒 Files selected for processing (31)
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-create.md
  • skills/lark-doc/references/lark-doc-whiteboard-update.md
  • skills/lark-doc/references/lark-doc-whiteboard.md
  • skills/lark-whiteboard-cli/SKILL.md
  • skills/lark-whiteboard/SKILL.md
  • skills/lark-whiteboard/references/connectors.md
  • skills/lark-whiteboard/references/content.md
  • skills/lark-whiteboard/references/lark-whiteboard-query.md
  • skills/lark-whiteboard/references/lark-whiteboard-update.md
  • skills/lark-whiteboard/references/layout.md
  • skills/lark-whiteboard/references/schema.md
  • skills/lark-whiteboard/references/style.md
  • skills/lark-whiteboard/references/typography.md
  • skills/lark-whiteboard/routes/dsl.md
  • skills/lark-whiteboard/routes/mermaid.md
  • skills/lark-whiteboard/routes/svg.md
  • skills/lark-whiteboard/scenes/architecture.md
  • skills/lark-whiteboard/scenes/bar-chart.md
  • skills/lark-whiteboard/scenes/comparison.md
  • skills/lark-whiteboard/scenes/fishbone.md
  • skills/lark-whiteboard/scenes/flowchart.md
  • skills/lark-whiteboard/scenes/flywheel.md
  • skills/lark-whiteboard/scenes/funnel.md
  • skills/lark-whiteboard/scenes/line-chart.md
  • skills/lark-whiteboard/scenes/mermaid.md
  • skills/lark-whiteboard/scenes/milestone.md
  • skills/lark-whiteboard/scenes/organization.md
  • skills/lark-whiteboard/scenes/pyramid.md
  • skills/lark-whiteboard/scenes/swimlane.md
  • skills/lark-whiteboard/scenes/treemap.md
💤 Files with no reviewable changes (3)
  • skills/lark-whiteboard/scenes/mermaid.md
  • skills/lark-doc/references/lark-doc-whiteboard-update.md
  • skills/lark-whiteboard-cli/SKILL.md
✅ Files skipped from review due to trivial changes (8)
  • skills/lark-whiteboard/references/layout.md
  • skills/lark-whiteboard/scenes/pyramid.md
  • skills/lark-whiteboard/scenes/funnel.md
  • skills/lark-whiteboard/scenes/flywheel.md
  • skills/lark-whiteboard/scenes/fishbone.md
  • skills/lark-whiteboard/references/lark-whiteboard-query.md
  • skills/lark-doc/references/lark-doc-whiteboard.md
  • skills/lark-whiteboard/references/lark-whiteboard-update.md
🚧 Files skipped from review as they are similar to previous changes (6)
  • skills/lark-whiteboard/scenes/line-chart.md
  • skills/lark-whiteboard/scenes/bar-chart.md
  • skills/lark-whiteboard/scenes/treemap.md
  • skills/lark-whiteboard/scenes/organization.md
  • skills/lark-doc/references/lark-doc-create.md
  • skills/lark-whiteboard/scenes/swimlane.md

Copy link
Copy Markdown
Collaborator

@syh-cpdsss syh-cpdsss left a comment

Choose a reason for hiding this comment

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

LGTM

@syh-cpdsss syh-cpdsss merged commit 830fb3b into main Apr 17, 2026
22 checks passed
@syh-cpdsss syh-cpdsss deleted the feat/whiteboard-skill-optimize branch April 17, 2026 09:51
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.

3 participants