docs(whiteboard): optimize whiteboard skill#1371
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis PR narrows lark-whiteboard's documented scope, adds a "快速决策" identity/intent routing table, introduces a new whiteboard creation/modification workflow doc, and remaps internal links from references/ to elements/ across element and scene docs. ChangesWhiteboard Documentation Structure Refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1371 +/- ##
=======================================
Coverage 71.90% 71.90%
=======================================
Files 691 691
Lines 65629 65629
=======================================
Hits 47191 47191
Misses 14791 14791
Partials 3647 3647 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@63c954e0da164e5c7f4fe3e0babc08a64043e193🧩 Skill updatenpx skills add larksuite/cli#fix/whiteboard-skill-optimization -y -g |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
skills/lark-whiteboard/references/lark-whiteboard-workflow.md (1)
34-34: ⚡ Quick winAdd missing anchor link.
Line 34 references the "渲染 & 写入画板" section but is missing the anchor link, unlike the properly linked reference on line 18.
🔗 Proposed fix
- │ └─ 重绘/结构调整 → +query --output_as image → 看图后进入 [§ 渲染 & 写入画板] + │ └─ 重绘/结构调整 → +query --output_as image → 看图后进入 [§ 渲染 & 写入画板](`#渲染--写入画板`)🤖 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-whiteboard/references/lark-whiteboard-workflow.md` at line 34, Add the missing anchor link for the "渲染 & 写入画板" reference on the line containing "└─ 重绘/结构调整 → +query --output_as image → 看图后进入 [§ 渲染 & 写入画板]": replace the plain section text with a proper Markdown internal link pointing to the "渲染 & 写入画板" section anchor (matching the existing link style used earlier in the file, e.g., the linked reference on line 18) so the reference navigates correctly.skills/lark-whiteboard/SKILL.md (1)
45-45: ⚡ Quick winRemove redundant "lark-doc" text.
The line contains redundant text "lark-doc" before the link. The arrow already indicates the target, and the link text provides the name.
📝 Proposed fix
-## 不在本 skill 范围 -- 文档内容编辑 → lark-doc [lark-doc](../lark-doc/SKILL.md) +## 不在本 skill 范围 +- 文档内容编辑 → [lark-doc](../lark-doc/SKILL.md)🤖 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-whiteboard/SKILL.md` at line 45, Remove the redundant plain-text "lark-doc" preceding the link in the SKILL.md entry by changing the line "文档内容编辑 → lark-doc [lark-doc](../lark-doc/SKILL.md)" to use only the arrow and the link, e.g. "文档内容编辑 → [lark-doc](../lark-doc/SKILL.md)"; update the text where this exact phrase appears so only the linked label remains.
🤖 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-whiteboard/references/lark-whiteboard-workflow.md`:
- Around line 50-52: The three markdown links to route docs in the table are
using wrong relative paths from this file
(references/lark-whiteboard-workflow.md); update the link targets for
`routes/mermaid.md`, `routes/svg.md`, and `routes/dsl.md` to include the
parent-folder prefix `../` (i.e., `../routes/mermaid.md`, `../routes/svg.md`,
`../routes/dsl.md`) so the `思维导图...`, `其他图表` (Claude/Gemini/GPT/GLM), and `其他图表`
(Doubao/Seed/Other) table rows point to the correct files.
---
Nitpick comments:
In `@skills/lark-whiteboard/references/lark-whiteboard-workflow.md`:
- Line 34: Add the missing anchor link for the "渲染 & 写入画板" reference on the line
containing "└─ 重绘/结构调整 → +query --output_as image → 看图后进入 [§ 渲染 & 写入画板]":
replace the plain section text with a proper Markdown internal link pointing to
the "渲染 & 写入画板" section anchor (matching the existing link style used earlier in
the file, e.g., the linked reference on line 18) so the reference navigates
correctly.
In `@skills/lark-whiteboard/SKILL.md`:
- Line 45: Remove the redundant plain-text "lark-doc" preceding the link in the
SKILL.md entry by changing the line "文档内容编辑 → lark-doc
[lark-doc](../lark-doc/SKILL.md)" to use only the arrow and the link, e.g.
"文档内容编辑 → [lark-doc](../lark-doc/SKILL.md)"; update the text where this exact
phrase appears so only the linked label remains.
🪄 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: 273e17c8-1033-446f-9103-bde6fbc675d9
📒 Files selected for processing (14)
skills/lark-whiteboard/SKILL.mdskills/lark-whiteboard/elements/connectors.mdskills/lark-whiteboard/elements/content.mdskills/lark-whiteboard/elements/image.mdskills/lark-whiteboard/elements/layout.mdskills/lark-whiteboard/elements/schema.mdskills/lark-whiteboard/elements/style.mdskills/lark-whiteboard/elements/typography.mdskills/lark-whiteboard/references/lark-whiteboard-workflow.mdskills/lark-whiteboard/routes/dsl.mdskills/lark-whiteboard/scenes/flowchart.mdskills/lark-whiteboard/scenes/mermaid.mdskills/lark-whiteboard/scenes/photo-showcase.mdskills/lark-whiteboard/scenes/swimlane.md
Change-Id: Iabcbe9f4e309ae9f467ceec265320cea6cdfa81b
4f41437 to
e4e8b54
Compare
Change-Id: I96d99037b3ba74a3ea9964991b67cdf15fb985be
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
skills/lark-whiteboard/references/lark-whiteboard-workflow.md (1)
50-52:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix relative paths to route documentation.
The relative paths in the table are incorrect. This file is in the
references/folder, so links to files in theroutes/folder need the../prefix.🔗 Proposed fix for table paths
| 图表类型 | 身份 | 路径 | |--------------------|-------------------------------------|------------------------------------------| -| 思维导图、时序图、类图、饼图、甘特图 | 任何身份 | [`routes/mermaid.md`](routes/mermaid.md) | -| 其他图表 | `Claude` / `Gemini` / `GPT` / `GLM` | [`routes/svg.md`](routes/svg.md) | -| 其他图表 | `Doubao` / `Seed` / `Other` | [`routes/dsl.md`](routes/dsl.md) | +| 思维导图、时序图、类图、饼图、甘特图 | 任何身份 | [`routes/mermaid.md`](../routes/mermaid.md) | +| 其他图表 | `Claude` / `Gemini` / `GPT` / `GLM` | [`routes/svg.md`](../routes/svg.md) | +| 其他图表 | `Doubao` / `Seed` / `Other` | [`routes/dsl.md`](../routes/dsl.md) |🤖 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-whiteboard/references/lark-whiteboard-workflow.md` around lines 50 - 52, The table in lark-whiteboard-workflow.md uses incorrect relative links to route docs (routes/mermaid.md, routes/svg.md, routes/dsl.md) because this file lives in references/; update each link to include the parent-dir prefix (../routes/mermaid.md, ../routes/svg.md, ../routes/dsl.md) so the markdown links resolve correctly—edit the table rows referencing these route files to prepend "../" to each routes/... path.
🧹 Nitpick comments (3)
skills/lark-whiteboard/references/lark-whiteboard-workflow.md (3)
28-36: ⚡ Quick winAdd language identifier to the code block.
The code block lacks a language specification. While this is a decision tree rather than executable code, adding
textorplaintextas the language identifier improves consistency and satisfies linter requirements.📝 Proposed fix
-``` +```text +query --output_as code ├─ 返回 Mermaid/PlantUML 代码🤖 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-whiteboard/references/lark-whiteboard-workflow.md` around lines 28 - 36, The fenced code block that begins with "query --output_as code" needs a language identifier to satisfy the linter; update the opening fence from "```" to "```text" (or "```plaintext") so the block is explicitly typed, leaving the block contents unchanged; locate the markdown section in lark-whiteboard-workflow.md containing the query decision tree and change its opening backtick fence accordingly.Source: Linters/SAST tools
67-73: ⚡ Quick winAdd language identifier to the artifact listing.
The code block showing the directory structure lacks a language specification. Adding
textas the language identifier improves consistency and satisfies linter requirements.📝 Proposed fix
-``` +```text diagram.svg ← SVG 源码(SVG 路径) diagram.mmd ← Mermaid 源码(Mermaid 路径)🤖 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-whiteboard/references/lark-whiteboard-workflow.md` around lines 67 - 73, The code block listing artifacts (starting with "diagram.svg", "diagram.mmd", "diagram.json", etc.) is missing a language identifier; update the fenced code block by adding the language specifier "text" after the opening backticks so the block becomes a ```text fenced block, ensuring the listing (diagram.svg, diagram.mmd, diagram.json, diagram.gen.cjs, diagram.png) is rendered and linted as plain text.Source: Linters/SAST tools
82-82: ⚡ Quick winClarify which artifact file to use in the command.
The placeholder
<产物文件>is ambiguous. The "产物规范" section defines multiple files (diagram.svg, diagram.mmd, diagram.json). Consider specifying which file to use for each rendering path, or reference back to the specific route documentation for clarity.For example:
- SVG path:
diagram.svg(later converted via--to openapi)- Mermaid path:
diagram.mmd- DSL path:
diagram.json🤖 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-whiteboard/references/lark-whiteboard-workflow.md` at line 82, The command example using "npx -y `@larksuite/whiteboard-cli`@^0.2.11 -i <产物文件> --to openapi --format json \\" is ambiguous; update it to explicitly state which artifact to pass for each rendering path (e.g., use diagram.svg for SVG export/--to openapi conversion, diagram.mmd for Mermaid input, and diagram.json for the DSL/JSON input) and add a short note pointing readers to the "产物规范" section for full file definitions and any required conversion steps.
🤖 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-whiteboard/references/lark-whiteboard-workflow.md`:
- Around line 54-59: Update the relative links in the SVG fallback paragraph so
they point to the correct files from this references directory: replace
occurrences of "routes/svg.md" and "routes/dsl.md" with "../routes/svg.md" and
"../routes/dsl.md" respectively; edit the text containing the SVG fallback rule
(the paragraph that starts with "⚠️ SVG 路径失败回退") to use the prefixed paths so
the references resolve correctly from
skills/lark-whiteboard/references/lark-whiteboard-workflow.md.
---
Duplicate comments:
In `@skills/lark-whiteboard/references/lark-whiteboard-workflow.md`:
- Around line 50-52: The table in lark-whiteboard-workflow.md uses incorrect
relative links to route docs (routes/mermaid.md, routes/svg.md, routes/dsl.md)
because this file lives in references/; update each link to include the
parent-dir prefix (../routes/mermaid.md, ../routes/svg.md, ../routes/dsl.md) so
the markdown links resolve correctly—edit the table rows referencing these route
files to prepend "../" to each routes/... path.
---
Nitpick comments:
In `@skills/lark-whiteboard/references/lark-whiteboard-workflow.md`:
- Around line 28-36: The fenced code block that begins with "query --output_as
code" needs a language identifier to satisfy the linter; update the opening
fence from "```" to "```text" (or "```plaintext") so the block is explicitly
typed, leaving the block contents unchanged; locate the markdown section in
lark-whiteboard-workflow.md containing the query decision tree and change its
opening backtick fence accordingly.
- Around line 67-73: The code block listing artifacts (starting with
"diagram.svg", "diagram.mmd", "diagram.json", etc.) is missing a language
identifier; update the fenced code block by adding the language specifier "text"
after the opening backticks so the block becomes a ```text fenced block,
ensuring the listing (diagram.svg, diagram.mmd, diagram.json, diagram.gen.cjs,
diagram.png) is rendered and linted as plain text.
- Line 82: The command example using "npx -y `@larksuite/whiteboard-cli`@^0.2.11
-i <产物文件> --to openapi --format json \\" is ambiguous; update it to explicitly
state which artifact to pass for each rendering path (e.g., use diagram.svg for
SVG export/--to openapi conversion, diagram.mmd for Mermaid input, and
diagram.json for the DSL/JSON input) and add a short note pointing readers to
the "产物规范" section for full file definitions and any required conversion steps.
🪄 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: cd8b49a7-9ffa-4f33-82b0-a5e95ac3d3a6
📒 Files selected for processing (14)
skills/lark-whiteboard/SKILL.mdskills/lark-whiteboard/elements/connectors.mdskills/lark-whiteboard/elements/content.mdskills/lark-whiteboard/elements/image.mdskills/lark-whiteboard/elements/layout.mdskills/lark-whiteboard/elements/schema.mdskills/lark-whiteboard/elements/style.mdskills/lark-whiteboard/elements/typography.mdskills/lark-whiteboard/references/lark-whiteboard-workflow.mdskills/lark-whiteboard/routes/dsl.mdskills/lark-whiteboard/scenes/flowchart.mdskills/lark-whiteboard/scenes/mermaid.mdskills/lark-whiteboard/scenes/photo-showcase.mdskills/lark-whiteboard/scenes/swimlane.md
✅ Files skipped from review due to trivial changes (5)
- skills/lark-whiteboard/elements/layout.md
- skills/lark-whiteboard/elements/schema.md
- skills/lark-whiteboard/scenes/swimlane.md
- skills/lark-whiteboard/routes/dsl.md
- skills/lark-whiteboard/scenes/flowchart.md
🚧 Files skipped from review as they are similar to previous changes (3)
- skills/lark-whiteboard/scenes/mermaid.md
- skills/lark-whiteboard/scenes/photo-showcase.md
- skills/lark-whiteboard/SKILL.md
Summary
Optimize the whiteboard skill documentation structure and clarity. Reorganize reference files into a dedicated
elements/directory, extract complex workflows into a separate file, and add scope boundaries to help AI agents correctly route requests.Changes
--as userdefault vs--as botusagereferences/toelements/(connectors, content, image, layout, schema, style, typography)SKILL.mdinto a dedicatedreferences/lark-whiteboard-workflow.mdreferences/toelements/across routes and scene fileslark-whiteboard-climigration noticelark-doc,lark-sheets, andlark-baseTest Plan
Related Issues
Summary by CodeRabbit