Skip to content

feat(skills): proactive whiteboard discovery when creating documents#369

Open
yoho-dd wants to merge 3 commits intolarksuite:mainfrom
yoho-dd:feat/whiteboard-proactive-discovery
Open

feat(skills): proactive whiteboard discovery when creating documents#369
yoho-dd wants to merge 3 commits intolarksuite:mainfrom
yoho-dd:feat/whiteboard-proactive-discovery

Conversation

@yoho-dd
Copy link
Copy Markdown

@yoho-dd yoho-dd commented Apr 9, 2026

Summary

用户创建文档时很少主动提及"画板",但文档主题(架构设计、流程说明、组织关系等)天然需要可视化表达。本 PR 让 AI 在创建文档时主动识别这类内容并联动画板,无需等待用户指定。

Changes

  • skills/lark-doc/SKILL.md: 新增「画板需求挖掘(主动识别)」章节,包含语义→画板类型映射表、执行流程(覆盖 docs +createdocs +update 两种场景)和不适用场景
  • skills/lark-doc/references/lark-doc-create.md: 写作原则新增"主动画板"条目(含 guard clause);场景速查表新增画板场景行
  • skills/lark-whiteboard/SKILL.md: description 从工具视角改为意图视角("当用户要求绘制图表" → "当用户需要可视化表达结构化信息"),明确与 lark-doc 的职责边界

Test Plan

  • npx skills add ./skills -g -y 安装成功
  • 新会话中输入"帮我写一篇微服务架构设计文档",AI 主动创建架构图画板
  • 新会话中输入"整理一下部署流程",AI 主动创建流程图画板
  • 新会话中输入"帮我写个会议纪要",AI 根据内容判断是否需要画板(如有流程/决策链则创建)
  • 新会话中输入"帮我写周报",AI 根据内容判断是否需要画板(如有项目里程碑则创建)
  • 新会话中输入"记个备忘",AI 不创建画板(纯文字记录场景)
  • 新会话中输入"画一下系统调用关系",AI 直接走 lark-whiteboard skill
  • 用户明确说"只要文字版"时,AI 不插入画板

Related Issues

  • None

Summary by CodeRabbit

  • New Features

    • Documents now proactively insert blank whiteboard placeholders for content needing visual diagrams (architecture, workflows, org charts, timelines, causal/compare relationships) and guide subsequent editing in the whiteboard tool.
  • Documentation

    • Added scenario-to-whiteboard-type mapping, explicit exceptions where whiteboards shouldn’t be used (pure text, table/data-heavy, or user-requested text-only), and clarified the doc→whiteboard coordination and execution flow.

Users rarely mention "画板" explicitly, but their document topics
(architecture, workflows, org charts, timelines, etc.) naturally
call for visual diagrams. This change makes the AI proactively
identify such content and create whiteboards without waiting for
the user to ask.

- lark-doc/SKILL.md: add whiteboard demand discovery section with
  semantic-to-diagram-type mapping table
- lark-doc-create.md: add "主动画板" writing principle and scene entry
- lark-whiteboard/SKILL.md: rewrite description from tool-centric to
  intent-centric, clarify boundary with lark-doc

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@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 9, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1de56c5b-91be-4419-bdf7-5ad978e3eae7

📥 Commits

Reviewing files that changed from the base of the PR and between fadad25 and df1a2d0.

📒 Files selected for processing (1)
  • skills/lark-doc/SKILL.md
✅ Files skipped from review due to trivial changes (1)
  • skills/lark-doc/SKILL.md

📝 Walkthrough

Walkthrough

Added documentation guiding proactive insertion of blank whiteboards for semantically structured document content, defined semantic→whiteboard-type mappings, specified control flow to pass data.board_tokens from docs +update to lark-whiteboard, and listed exclusion conditions.

Changes

Cohort / File(s) Summary
lark-doc guidance
skills/lark-doc/SKILL.md, skills/lark-doc/references/lark-doc-create.md
Added “画板需求挖掘(主动识别)” guidance, semantic→whiteboard-type mapping, exec flow to insert <whiteboard type="blank"></whiteboard>, read data.board_tokens from docs +update, then hand off to lark-whiteboard; added non-applicable conditions (pure text, table/data-dense, user-requested text-only).
lark-whiteboard guidance
skills/lark-whiteboard/SKILL.md
Expanded trigger description to include visualization of structured information even without explicit “whiteboard” mention; added instruction that lark-doc should lead when primary intent is document creation and coordinate handoff to this skill.

Sequence Diagram(s)

sequenceDiagram
  participant User as User
  participant DocSkill as lark-doc
  participant Docs as DocsService
  participant WBSkill as lark-whiteboard

  User->>DocSkill: create/update document with structured content
  DocSkill->>Docs: `docs +create` / `docs +update` (insert `<whiteboard type="blank">`)
  Docs-->>DocSkill: response (includes `data.board_tokens`)
  DocSkill->>WBSkill: handoff with `board_tokens`
  WBSkill->>Docs: perform edits on whiteboard using tokens
  WBSkill-->>User: updated whiteboard embedded in document
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I found a blank board in a doc so wide,
I hopped and sketched each flow and thread with pride.
From words to lines, a tidy map I drew,
A tiny rabbit’s art — now clear for you. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change—adding proactive whiteboard discovery during document creation—and is concise and specific.
Description check ✅ Passed The description covers all required template sections: Summary (motivation clearly stated), Changes (detailed with specific files), Test Plan (comprehensive with multiple test cases), and Related Issues.
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

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 9, 2026

Greptile Summary

This PR adds proactive whiteboard discovery to the lark-doc skill: when creating or editing a document, the AI now automatically identifies content types (architecture, workflows, org charts, etc.) that benefit from visualization and inserts blank whiteboard placeholders — without waiting for an explicit user request. Supporting changes update the lark-whiteboard description to an intent-based framing and add a quick-reference row to lark-doc-create.md.

Confidence Score: 5/5

Safe to merge; changes are documentation/instruction-only with no runtime code paths.

All remaining findings are P2. The only new issue is a test-plan/exclusion-list inconsistency introduced by the last fix commit — the behavior itself may still be acceptable depending on how the LLM classifies meeting notes. The previously flagged board_tokens gap was addressed in an earlier fix commit.

skills/lark-doc/SKILL.md — verify the 不适用 exclusion list matches the PR's stated test-plan expectations.

Vulnerabilities

No security concerns identified. Changes are documentation/instruction updates only with no code execution paths, credential handling, or user-input processing.

Important Files Changed

Filename Overview
skills/lark-doc/SKILL.md Adds "画板需求挖掘(主动识别)" section with semantic→whiteboard-type mapping table and execution flow; the create-scenario path still leaves an implicit gap in how board_tokens are retrieved after docs +create (addressed separately in previous review).
skills/lark-doc/references/lark-doc-create.md Adds "主动画板" writing principle and a whiteboard row to the scene quick-reference table; changes are consistent with SKILL.md additions.
skills/lark-whiteboard/SKILL.md Description updated from tool-centric ("用户要求绘制图表") to intent-centric ("用户需要可视化表达结构化信息"), with an added line clarifying that lark-doc leads when the primary intent is document creation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User requests document creation] --> B{Analyze document topic}
    B -->|Architecture / Workflow / Org / Timeline / Causal / Compare / etc.| C[Whiteboard needed]
    B -->|Pure text log / Data-heavy / User says text-only| D[No whiteboard]
    C --> E{Create or Edit scenario?}
    E -->|Create| F["docs +create\n(include whiteboard placeholder in markdown)"]
    E -->|Edit| G["docs +update --mode append\n(insert whiteboard placeholder)"]
    F --> H["docs +fetch or docs +update\nto retrieve board_tokens"]
    G --> I["Read data.board_tokens\nfrom docs +update response"]
    H --> J[Switch to lark-whiteboard skill\nto draw the diagram]
    I --> J
    D --> K[Create document with text only]
Loading

Reviews (3): Last reviewed commit: "fix: remove meeting notes and weekly rep..." | Re-trigger Greptile

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: 2

🤖 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-doc/references/lark-doc-create.md`:
- Line 71: Update the “主动画板” proactive rule in lark-doc-create.md to include
explicit do-not-insert exceptions so it only triggers when appropriate: when
inserting lark-whiteboard, add a guard clause that skips insertion if the user
explicitly requests text-only output or dense tabular content (mirror the guard
language used in skills/lark-doc/SKILL.md), and apply the same change to the
other occurrence referenced (around line 637); specifically update the “主动画板”
rule text to mention the exceptions (“用户明确要求仅文本” / “密集表格内容不插入画板”) so create
flows won’t over-trigger.

In `@skills/lark-doc/SKILL.md`:
- Line 148: Update the execution step that currently lists only "docs +create"
to also include "docs +update" so edit scenarios route correctly; specifically
change the sentence referencing `docs +create` → taking `board_tokens` and
opening `lark-whiteboard` to read/handle both `docs +create` and `docs +update`
(so edits invoke the same `board_tokens` → `lark-whiteboard` flow described in
SKILL.md).
🪄 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: bfcd7d31-c4f0-4f88-8f64-9816ef0167b1

📥 Commits

Reviewing files that changed from the base of the PR and between eb3c643 and 9382c56.

📒 Files selected for processing (3)
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-create.md
  • skills/lark-whiteboard/SKILL.md

- Execution flow: mention both docs +create and docs +update, clarify
  board_tokens comes from docs +update response
- Add guard clauses to proactive whiteboard rules (skip when user
  explicitly wants text-only or content suits tables better)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 9, 2026

Tip:

Greploop — Automatically fix all review issues by running /greploops in Claude Code. It iterates: fix, push, re-review, repeat until 5/5 confidence.

Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal.

Meeting notes and weekly reports can benefit from whiteboards (e.g.,
timeline of action items, discussion flow). Only exclude pure text
logs/memos and data-dense tabular content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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