docs(lark-doc): simplify genre routers#1771
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR overhauls lark-doc skill documentation: rewrites prerequisite-read rules and workflows in SKILL.md, lark-doc-create.md, and lark-doc-update.md; adds a new lark-doc-design-philosophy.md; refines whiteboard/SVG main-agent vs SubAgent delegation across whiteboard/XML/style references; and adds a genres directory with a router index plus 27 new genre template files. ChangesLark-doc workflow and reference updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/lark-doc/references/lark-doc-create.md`:
- Around line 15-18: In the document guidance, the phrase about the local XML
draft is too absolute and conflicts with the later Markdown exception; update
the wording in the section that describes the draft workflow so it says the
local XML draft is the default source of truth rather than the only source, and
keep the rest of the Plan/Draft guidance in the same place consistent with that
fallback behavior.
In `@skills/lark-doc/references/lark-doc-xml.md`:
- Line 44: Update the `<whiteboard>` guidance in `lark-doc-xml.md` to separate
new-board creation from existing-board updates. The current wording around the
`whiteboard` item incorrectly routes both scenarios through `<whiteboard
type="blank">`; revise it so blank-board creation is only for new complex SVG
work, while existing whiteboard edits explicitly reference fetching the current
token and then using `lark-whiteboard` directly. Keep the distinction aligned
with the `lark-doc-whiteboard.md` flow and preserve the current
`whiteboard`/`type="svg"`/`type="blank"` terminology.
🪄 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: 270be4e3-a740-4c7d-a277-24451ed9abb5
📒 Files selected for processing (7)
skills/lark-doc/SKILL.mdskills/lark-doc/references/lark-doc-create.mdskills/lark-doc/references/lark-doc-update.mdskills/lark-doc/references/lark-doc-whiteboard.mdskills/lark-doc/references/lark-doc-xml.mdskills/lark-doc/references/style/lark-doc-style.mdskills/lark-doc/references/style/lark-doc-update-workflow.md
💤 Files with no reviewable changes (1)
- skills/lark-doc/references/style/lark-doc-update-workflow.md
|
|
||
| - `<img>` — `<img href="https://..."/>` 上传网络图片 | ||
| - `<whiteboard>` — 简单图由 SubAgent 直接插入 `<whiteboard type="svg">完整自包含 SVG</whiteboard>`;复杂图使用 `<whiteboard type="blank"></whiteboard>` 先创建空白画板,再按 [`lark-doc-whiteboard.md`](lark-doc-whiteboard.md) 启动 SubAgent 调用 `lark-whiteboard` 写入; | ||
| - `<whiteboard>` — 简单 Mermaid / SVG 图可由主 Agent 直接写入;复杂 SVG 可启动 SubAgent 产出完整 `<whiteboard type="svg">完整自包含 SVG</whiteboard>`;特别复杂或已有画板更新,使用 `<whiteboard type="blank"></whiteboard>` 先创建空白画板,再按 [`lark-doc-whiteboard.md`](lark-doc-whiteboard.md) 启动 SubAgent 调用 `lark-whiteboard` 写入; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Separate new-board creation from existing-board updates.
This bullet routes both cases through <whiteboard type="blank">, which conflicts with the existing-board flow elsewhere in this stack. Keep blank-board creation only for new complex SVGs; existing whiteboard edits should fetch the current token and go straight through lark-whiteboard.
Proposed fix
-- `<whiteboard>` — 简单 Mermaid / SVG 图可由主 Agent 直接写入;复杂 SVG 可启动 SubAgent 产出完整 `<whiteboard type="svg">完整自包含 SVG</whiteboard>`;特别复杂或已有画板更新,使用 `<whiteboard type="blank"></whiteboard>` 先创建空白画板,再按 [`lark-doc-whiteboard.md`](lark-doc-whiteboard.md) 启动 SubAgent 调用 `lark-whiteboard` 写入;
+- `<whiteboard>` — 简单 Mermaid / SVG 图可由主 Agent 直接写入;复杂 SVG 可启动 SubAgent 产出完整 `<whiteboard type="svg">完整自包含 SVG</whiteboard>`;**新建**特别复杂画板时先创建 `<whiteboard type="blank"></whiteboard>`,**已有画板更新**则直接 fetch 当前 token 并按 [`lark-doc-whiteboard.md`](lark-doc-whiteboard.md) 走 `lark-whiteboard` 写入流程;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - `<whiteboard>` — 简单 Mermaid / SVG 图可由主 Agent 直接写入;复杂 SVG 可启动 SubAgent 产出完整 `<whiteboard type="svg">完整自包含 SVG</whiteboard>`;特别复杂或已有画板更新,使用 `<whiteboard type="blank"></whiteboard>` 先创建空白画板,再按 [`lark-doc-whiteboard.md`](lark-doc-whiteboard.md) 启动 SubAgent 调用 `lark-whiteboard` 写入; | |
| `<whiteboard>` — 简单 Mermaid / SVG 图可由主 Agent 直接写入;复杂 SVG 可启动 SubAgent 产出完整 `<whiteboard type="svg">完整自包含 SVG</whiteboard>`;**新建**特别复杂画板时先创建 `<whiteboard type="blank"></whiteboard>`,**已有画板更新**则直接 fetch 当前 token 并按 [`lark-doc-whiteboard.md`](lark-doc-whiteboard.md) 走 `lark-whiteboard` 写入流程; |
🤖 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-xml.md` at line 44, Update the
`<whiteboard>` guidance in `lark-doc-xml.md` to separate new-board creation from
existing-board updates. The current wording around the `whiteboard` item
incorrectly routes both scenarios through `<whiteboard type="blank">`; revise it
so blank-board creation is only for new complex SVG work, while existing
whiteboard edits explicitly reference fetching the current token and then using
`lark-whiteboard` directly. Keep the distinction aligned with the
`lark-doc-whiteboard.md` flow and preserve the current
`whiteboard`/`type="svg"`/`type="blank"` terminology.
8dad84d to
37b53df
Compare
PR Quality SummaryCI did not complete successfully. Use the failed check links below to decide whether this PR needs a code change or a rerun. Failed checksdeterministic-gate
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1771 +/- ##
==========================================
- Coverage 74.46% 74.40% -0.07%
==========================================
Files 855 857 +2
Lines 88568 88952 +384
==========================================
+ Hits 65954 66181 +227
- Misses 17543 17668 +125
- Partials 5071 5103 +32 ☔ 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@9be6dd95d154e16235eab117aa1c23925c617704🧩 Skill updatenpx skills add larksuite/cli#sun/lark-doc-authoring-loop -y -g |
21c992e to
be92f52
Compare
Change-Id: I7e9a42bb761775136a61cc331b230e9740843348
be92f52 to
9be6dd9
Compare
Change-Id: I56a41a21a4d37a0d14e1b4e2aff8b7e1a9334064
Summary
Simplify the lark-doc authoring guidance by routing document-writing tasks through a compact design philosophy and genre router layer. This keeps the active reading surface smaller while preserving detailed guidance for workplace and report document families.
Changes
skills/lark-doc/references/genres/.Test Plan
git diff --checknode scripts/skill-format-check/index.jslark-cli <domain> <command>flow works as expected — not applicable; no CLI runtime behavior changedRelated Issues