refactor(whiteboard): introduce lark-doc-whiteboard.md and streamline whiteboard workflow#502
Conversation
📝 WalkthroughWalkthroughReorganizes 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 Changes
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
3157370 to
3bd5973
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
d5b6fcd to
35c3d86
Compare
417e22b to
38de665
Compare
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@4d923a38db06a62f2ec0a49b7d7834dc4f986f7a🧩 Skill updatenpx skills add larksuite/cli#feat/whiteboard-skill-optimize -y -g |
38de665 to
03dd03d
Compare
03dd03d to
1ce3309
Compare
There was a problem hiding this comment.
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
📒 Files selected for processing (31)
skills/lark-doc/SKILL.mdskills/lark-doc/references/lark-doc-create.mdskills/lark-doc/references/lark-doc-whiteboard-update.mdskills/lark-doc/references/lark-doc-whiteboard.mdskills/lark-whiteboard-cli/SKILL.mdskills/lark-whiteboard/SKILL.mdskills/lark-whiteboard/references/connectors.mdskills/lark-whiteboard/references/content.mdskills/lark-whiteboard/references/lark-whiteboard-query.mdskills/lark-whiteboard/references/lark-whiteboard-update.mdskills/lark-whiteboard/references/layout.mdskills/lark-whiteboard/references/schema.mdskills/lark-whiteboard/references/style.mdskills/lark-whiteboard/references/typography.mdskills/lark-whiteboard/routes/dsl.mdskills/lark-whiteboard/routes/mermaid.mdskills/lark-whiteboard/routes/svg.mdskills/lark-whiteboard/scenes/architecture.mdskills/lark-whiteboard/scenes/bar-chart.mdskills/lark-whiteboard/scenes/comparison.mdskills/lark-whiteboard/scenes/fishbone.mdskills/lark-whiteboard/scenes/flowchart.mdskills/lark-whiteboard/scenes/flywheel.mdskills/lark-whiteboard/scenes/funnel.mdskills/lark-whiteboard/scenes/line-chart.mdskills/lark-whiteboard/scenes/mermaid.mdskills/lark-whiteboard/scenes/milestone.mdskills/lark-whiteboard/scenes/organization.mdskills/lark-whiteboard/scenes/pyramid.mdskills/lark-whiteboard/scenes/swimlane.mdskills/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
There was a problem hiding this comment.
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
📒 Files selected for processing (31)
skills/lark-doc/SKILL.mdskills/lark-doc/references/lark-doc-create.mdskills/lark-doc/references/lark-doc-whiteboard-update.mdskills/lark-doc/references/lark-doc-whiteboard.mdskills/lark-whiteboard-cli/SKILL.mdskills/lark-whiteboard/SKILL.mdskills/lark-whiteboard/references/connectors.mdskills/lark-whiteboard/references/content.mdskills/lark-whiteboard/references/lark-whiteboard-query.mdskills/lark-whiteboard/references/lark-whiteboard-update.mdskills/lark-whiteboard/references/layout.mdskills/lark-whiteboard/references/schema.mdskills/lark-whiteboard/references/style.mdskills/lark-whiteboard/references/typography.mdskills/lark-whiteboard/routes/dsl.mdskills/lark-whiteboard/routes/mermaid.mdskills/lark-whiteboard/routes/svg.mdskills/lark-whiteboard/scenes/architecture.mdskills/lark-whiteboard/scenes/bar-chart.mdskills/lark-whiteboard/scenes/comparison.mdskills/lark-whiteboard/scenes/fishbone.mdskills/lark-whiteboard/scenes/flowchart.mdskills/lark-whiteboard/scenes/flywheel.mdskills/lark-whiteboard/scenes/funnel.mdskills/lark-whiteboard/scenes/line-chart.mdskills/lark-whiteboard/scenes/mermaid.mdskills/lark-whiteboard/scenes/milestone.mdskills/lark-whiteboard/scenes/organization.mdskills/lark-whiteboard/scenes/pyramid.mdskills/lark-whiteboard/scenes/swimlane.mdskills/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
1ce3309 to
3434eea
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
skills/lark-whiteboard/SKILL.md (1)
37-37:⚠️ Potential issue | 🔴 CriticalUse explicit
--whiteboard-tokenflag instead of positional argument.The example command shows
+update <token>with a positional token argument, butwhiteboard +updaterequires 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
📒 Files selected for processing (31)
skills/lark-doc/SKILL.mdskills/lark-doc/references/lark-doc-create.mdskills/lark-doc/references/lark-doc-whiteboard-update.mdskills/lark-doc/references/lark-doc-whiteboard.mdskills/lark-whiteboard-cli/SKILL.mdskills/lark-whiteboard/SKILL.mdskills/lark-whiteboard/references/connectors.mdskills/lark-whiteboard/references/content.mdskills/lark-whiteboard/references/lark-whiteboard-query.mdskills/lark-whiteboard/references/lark-whiteboard-update.mdskills/lark-whiteboard/references/layout.mdskills/lark-whiteboard/references/schema.mdskills/lark-whiteboard/references/style.mdskills/lark-whiteboard/references/typography.mdskills/lark-whiteboard/routes/dsl.mdskills/lark-whiteboard/routes/mermaid.mdskills/lark-whiteboard/routes/svg.mdskills/lark-whiteboard/scenes/architecture.mdskills/lark-whiteboard/scenes/bar-chart.mdskills/lark-whiteboard/scenes/comparison.mdskills/lark-whiteboard/scenes/fishbone.mdskills/lark-whiteboard/scenes/flowchart.mdskills/lark-whiteboard/scenes/flywheel.mdskills/lark-whiteboard/scenes/funnel.mdskills/lark-whiteboard/scenes/line-chart.mdskills/lark-whiteboard/scenes/mermaid.mdskills/lark-whiteboard/scenes/milestone.mdskills/lark-whiteboard/scenes/organization.mdskills/lark-whiteboard/scenes/pyramid.mdskills/lark-whiteboard/scenes/swimlane.mdskills/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
…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)
3434eea to
4d923a3
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (4)
skills/lark-whiteboard/routes/mermaid.md (1)
7-7:⚠️ Potential issue | 🟡 MinorAdd 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 | 🟡 MinorAdd 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 | 🔴 CriticalAdd
--yesflag to the execution step.The execution command at line 141 (第二步:确认后执行) is missing the
--yesflag. The dry-run step uses--overwrite --dry-runto preview deletions, and the execution step should use--overwrite --yesto perform the actual write. This pattern is consistent with the route files (dsl.md line 35 and mermaid.md line 24) which both include--yesin 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 | 🟡 MinorFix example command to use
--whiteboard-tokenflag instead of positional argument.Line 37's example command is incorrect. The
whiteboard-tokenis 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
📒 Files selected for processing (31)
skills/lark-doc/SKILL.mdskills/lark-doc/references/lark-doc-create.mdskills/lark-doc/references/lark-doc-whiteboard-update.mdskills/lark-doc/references/lark-doc-whiteboard.mdskills/lark-whiteboard-cli/SKILL.mdskills/lark-whiteboard/SKILL.mdskills/lark-whiteboard/references/connectors.mdskills/lark-whiteboard/references/content.mdskills/lark-whiteboard/references/lark-whiteboard-query.mdskills/lark-whiteboard/references/lark-whiteboard-update.mdskills/lark-whiteboard/references/layout.mdskills/lark-whiteboard/references/schema.mdskills/lark-whiteboard/references/style.mdskills/lark-whiteboard/references/typography.mdskills/lark-whiteboard/routes/dsl.mdskills/lark-whiteboard/routes/mermaid.mdskills/lark-whiteboard/routes/svg.mdskills/lark-whiteboard/scenes/architecture.mdskills/lark-whiteboard/scenes/bar-chart.mdskills/lark-whiteboard/scenes/comparison.mdskills/lark-whiteboard/scenes/fishbone.mdskills/lark-whiteboard/scenes/flowchart.mdskills/lark-whiteboard/scenes/flywheel.mdskills/lark-whiteboard/scenes/funnel.mdskills/lark-whiteboard/scenes/line-chart.mdskills/lark-whiteboard/scenes/mermaid.mdskills/lark-whiteboard/scenes/milestone.mdskills/lark-whiteboard/scenes/organization.mdskills/lark-whiteboard/scenes/pyramid.mdskills/lark-whiteboard/scenes/swimlane.mdskills/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
Summary
Changes
between lark-doc and lark-whiteboard, step-by-step doc↔whiteboard
coordination flow, and semantic-to-chart-type mapping table
directly references the "渲染 & 写入画板" section); strengthen 主动画板
guideline with explicit placeholder syntax, prohibition on PNG/SVG
substitution, and concrete routing examples
quick-decision table, creation/modification workflows, render routing
table, and dry-run write guard
per-chart scene guides under scenes/
Test Plan
lark xxxcommand works as expectedRelated Issues
Summary by CodeRabbit
New Features
Documentation
Chores