docs: add lark drive knowledge organization workflow#1028
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:
📝 WalkthroughWalkthroughAdds a unified knowledge-organize workflow and routes Drive/Wiki organization or inventory/planning requests to it; introduces discovery, analysis, planning, execution, and verification phase documents plus SKILL routing rules. Plans are produced by default; any create/move/permission writes require separate explicit confirmation. ChangesKnowledge Organization Workflow
Sequence DiagramsequenceDiagram
participant User
participant PARSE_SCOPE
participant INVENTORY
participant CONTENT_READ
participant ISSUE_ANALYSIS
participant RULE_GENERATION
participant PLAN_GENERATION
participant EXEC_CONFIRM
participant EXECUTE
participant VERIFY
User->>PARSE_SCOPE: submit scope/request
PARSE_SCOPE->>User: confirm parsed scope (stop & wait)
User->>INVENTORY: approve inventory
INVENTORY->>CONTENT_READ: provide ResourceItems
CONTENT_READ->>ISSUE_ANALYSIS: low_confidence_items + read evidence
ISSUE_ANALYSIS->>RULE_GENERATION: identified organization problems
RULE_GENERATION->>PLAN_GENERATION: classification_rules + target_tree
PLAN_GENERATION->>EXEC_CONFIRM: plan summary (DisplayItems)
EXEC_CONFIRM->>User: request execution confirmation (write scope)
User->>EXEC_CONFIRM: confirm subset
EXEC_CONFIRM->>EXECUTE: execute approved items (token resolution, moves)
EXECUTE->>VERIFY: record results and trigger verify rescan
VERIFY->>User: verification results & manual-confirmation routing
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
🚥 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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-drive/references/lark-drive-workflow-knowledgeOrganize.md`:
- Around line 81-105: The fenced workflow block (the triple-backtick code fence
that wraps the ASCII diagram under the workflow header) lacks a language tag,
causing MD040 lint failures; update the opening fence from ``` to ```text so the
block is explicitly annotated (e.g., change "```" to "```text") and leave the
closing fence as is to resolve the lint issue while preserving the diagram
content.
🪄 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: 32b25765-591a-4bca-88cb-b32d3434d45e
📒 Files selected for processing (2)
skills/lark-drive/SKILL.mdskills/lark-drive/references/lark-drive-workflow-knowledgeOrganize.md
| ``` | ||
| {用户输入的整理目标:URL / 名称 / token / 范围描述} | ||
| │ | ||
| ▼ | ||
| 入口解析(识别资源类型并分流到 Drive / Wiki / 单资源链路) | ||
| │ | ||
| ▼ | ||
| 递归盘点资源 ──► 标准化 ResourceItem 清单 | ||
| │ | ||
| ▼ | ||
| 现状统计 ──► 轻量内容读取(仅低置信度资源) | ||
| │ | ||
| ▼ | ||
| 问题识别 ──► 整理规则生成 | ||
| │ | ||
| ▼ | ||
| 目标目录树 ──► 移动 / 创建计划 | ||
| │ | ||
| ▼ | ||
| 用户确认 | ||
| │ | ||
| ├─► 不执行:输出整理方案 | ||
| │ | ||
| └─► 执行:创建目录 / 移动资源 / 重新扫描验证 | ||
| ``` |
There was a problem hiding this comment.
Add a language tag to the fenced workflow block.
This block is missing a fence language and triggers MD040; please annotate it (e.g., text) for lint compliance.
Suggested diff
-```
+```text
{用户输入的整理目标:URL / 名称 / token / 范围描述}
│
▼
入口解析(识别资源类型并分流到 Drive / Wiki / 单资源链路)
@@
-```
+```🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 81-81: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 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-drive/references/lark-drive-workflow-knowledgeOrganize.md` around
lines 81 - 105, The fenced workflow block (the triple-backtick code fence that
wraps the ASCII diagram under the workflow header) lacks a language tag, causing
MD040 lint failures; update the opening fence from ``` to ```text so the block
is explicitly annotated (e.g., change "```" to "```text") and leave the closing
fence as is to resolve the lint issue while preserving the diagram content.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1028 +/- ##
==========================================
+ Coverage 68.61% 68.63% +0.01%
==========================================
Files 625 625
Lines 58348 58386 +38
==========================================
+ Hits 40035 40071 +36
+ Misses 15029 15027 -2
- Partials 3284 3288 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@3ec3a59fff67318b257dc5cf353653cf291b9a0a🧩 Skill updatenpx skills add larksuite/cli#feat/workflow-knowledgeOrganize -y -g |
08936db to
5a1f271
Compare
f2a44d9 to
031f497
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
skills/lark-drive/references/lark-drive-workflow-knowledge-organize-execution.md (3)
99-118: 💤 Low valueTable structure inconsistency between verification table and result table.
Lines 101-102 define a 9-column verification table including
标题,预期 token, and实际 token, but the result table template at line 116 only includes 6 columns, omitting these fields. If this is intentional for brevity, consider adding a note explaining the simplified format. Otherwise, align the column sets for consistency.💡 Possible alignment
If the full detail is needed in results, update line 116:
-| plan_id | 动作 | 预期目标 | 实际目标 | 状态 | 失败原因 | -|---------|------|----------|----------|------|----------| +| plan_id | 动作 | 标题 | 预期目标 | 实际目标 | 预期 token | 实际 token | 状态 | 失败原因 | +|---------|------|------|----------|----------|------------|------------|------|----------|Alternatively, if brevity is preferred, add a note at line 104:
### Verification Result +<!-- Note: Result table shows summary columns only; full verification table available in logs --> ```text🤖 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-drive/references/lark-drive-workflow-knowledge-organize-execution.md` around lines 99 - 118, The verification table header (the 9-column table including 标题, 预期 token, 实际 token) does not match the "Verification Result" summary table (which only has 6 columns); either expand the result table to include the same columns (标题, 预期 token, 实际 token) so both tables are consistent, or keep the simplified 6-column result table but add a brief note beneath the verification header explaining that the result table is a condensed summary and omits those three fields; update the markdown in the Verification table block and the Verification Result block accordingly so headers and intent are aligned.
14-15: ⚡ Quick winConsider adding specific file paths for cross-references.
Lines 14-15 reference "shortcut docs" and "Non-goals from the main workflow entry" but don't provide specific file paths. For better navigation and clarity, consider adding explicit references like you did on line 11.
📝 Suggested improvement
-4. Follow command syntax, scope requirements, and confirmation behavior from referenced shortcut docs. -5. Follow `Non-goals` from the main workflow entry. Do not execute excluded operations from this file. +4. Follow command syntax, scope requirements, and confirmation behavior from referenced shortcut documentation (see [`lark-drive/SKILL.md`](../SKILL.md) and individual command references). +5. Follow `Non-goals` from [`lark-drive-workflow-knowledge-organize.md`](lark-drive-workflow-knowledge-organize.md). Do not execute excluded operations from this file.🤖 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-drive/references/lark-drive-workflow-knowledge-organize-execution.md` around lines 14 - 15, Update the two cross-references that currently say "shortcut docs" and "Non-goals from the main workflow entry" to include explicit file paths or anchor links (the same style used for the reference on line 11); locate the phrases "shortcut docs" and "Non-goals from the main workflow entry" in the document and replace them with concrete references pointing to the exact markdown files or section anchors (e.g., ./path/to/shortcut-doc.md#section or `#main-workflow-non-goals`) so readers can navigate directly to the referenced content.
144-145: ⚡ Quick winAdd explicit markdown links for cross-referenced failure handling
In
skills/lark-drive/references/lark-drive-workflow-knowledge-organize-execution.md(lines 144-145),lark-sharedandPermission Request Gateare referenced as plain inline code, but the source docs are at../../lark-shared/SKILL.mdandlark-drive-workflow-knowledge-organize.md#permission-request-gate.📝 Suggested improvement for clarity
-| Missing API scope | Follow `lark-shared` permission handling and stop | Do not retry the same command repeatedly | -| Resource access denied | Stop and follow the main workflow `Permission Request Gate` | Do not request permission automatically or in batch | +| Missing API scope | Follow permission handling from [`lark-shared/SKILL.md`](../../lark-shared/SKILL.md) and stop | Do not retry the same command repeatedly | +| Resource access denied | Stop and follow the main workflow [`Permission Request Gate`](lark-drive-workflow-knowledge-organize.md#permission-request-gate) | Do not request permission automatically or in batch |🤖 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-drive/references/lark-drive-workflow-knowledge-organize-execution.md` around lines 144 - 145, Replace the inline code mentions `lark-shared` and `Permission Request Gate` with explicit Markdown links: make `lark-shared` link to its SKILL.md (e.g., [lark-shared](SKILL.md)) and make `Permission Request Gate` link to the corresponding section anchor in the workflow doc (e.g., [Permission Request Gate](lark-drive-workflow-knowledge-organize.md#permission-request-gate)); update the table cells on the two lines shown so the references become clickable and maintain the existing wording and casing.
🤖 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-drive/references/lark-drive-workflow-knowledge-organize-execution.md`:
- Line 86: Replace the generic "lark-wiki" pointer on line 86 with explicit
guidance: reference the lark-wiki space-list doc (notes) and show the exact CLI
to resolve the shorthand (run the wiki spaces get command with --params
'{"space_id":"my_library"}' to obtain the real space_id and then pass that value
as --space-id), and also reference the lark-wiki move doc to state the
recommended flow of running the wiki spaces get command first before running
wiki +move so readers know to resolve my_library to an actual space_id before
moving pages.
---
Nitpick comments:
In
`@skills/lark-drive/references/lark-drive-workflow-knowledge-organize-execution.md`:
- Around line 99-118: The verification table header (the 9-column table
including 标题, 预期 token, 实际 token) does not match the "Verification Result"
summary table (which only has 6 columns); either expand the result table to
include the same columns (标题, 预期 token, 实际 token) so both tables are consistent,
or keep the simplified 6-column result table but add a brief note beneath the
verification header explaining that the result table is a condensed summary and
omits those three fields; update the markdown in the Verification table block
and the Verification Result block accordingly so headers and intent are aligned.
- Around line 14-15: Update the two cross-references that currently say
"shortcut docs" and "Non-goals from the main workflow entry" to include explicit
file paths or anchor links (the same style used for the reference on line 11);
locate the phrases "shortcut docs" and "Non-goals from the main workflow entry"
in the document and replace them with concrete references pointing to the exact
markdown files or section anchors (e.g., ./path/to/shortcut-doc.md#section or
`#main-workflow-non-goals`) so readers can navigate directly to the referenced
content.
- Around line 144-145: Replace the inline code mentions `lark-shared` and
`Permission Request Gate` with explicit Markdown links: make `lark-shared` link
to its SKILL.md (e.g., [lark-shared](SKILL.md)) and make `Permission Request
Gate` link to the corresponding section anchor in the workflow doc (e.g.,
[Permission Request
Gate](lark-drive-workflow-knowledge-organize.md#permission-request-gate));
update the table cells on the two lines shown so the references become clickable
and maintain the existing wording and casing.
🪄 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: 0bad6aa7-7b7f-4f7f-8e4e-a9bd64e52be5
📒 Files selected for processing (7)
skills/lark-drive/SKILL.mdskills/lark-drive/references/lark-drive-workflow-knowledge-organize-analysis.mdskills/lark-drive/references/lark-drive-workflow-knowledge-organize-discovery.mdskills/lark-drive/references/lark-drive-workflow-knowledge-organize-execution.mdskills/lark-drive/references/lark-drive-workflow-knowledge-organize-planning.mdskills/lark-drive/references/lark-drive-workflow-knowledge-organize.mdskills/lark-wiki/SKILL.md
✅ Files skipped from review due to trivial changes (2)
- skills/lark-wiki/SKILL.md
- skills/lark-drive/references/lark-drive-workflow-knowledge-organize-planning.md
| 4. Execute `move` only when `target_parent_path` resolves to a token. | ||
| 5. If same-name target ambiguity exists, inspect existing children when possible; otherwise mark `needs_review=true`. | ||
| 6. Before writing to `my_library` root, resolve the real `space_id` according to `lark-wiki`. | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Find lark-wiki documentation and space_id resolution guidance.
# Expected: Find wiki skill documentation with space_id or my_library resolution details.
# Search for wiki-related skill documentation
fd -t f -e md 'wiki' skills/ | head -10
# Search for space_id and my_library resolution guidance
rg -n --type=md -C3 'space_id.*my_library|my_library.*space_id' skills/Repository: larksuite/cli
Length of output: 10089
Clarify the lark-wiki shorthand for resolving my_library’s space_id.
Line 86 should reference the exact guidance instead of the generic lark-wiki pointer:
skills/lark-wiki/references/lark-wiki-space-list.md→ Notes (resolvemy_libraryvialark-cli wiki spaces get --params '{"space_id":"my_library"}', then use the returnedspace_idas--space-id).skills/lark-wiki/references/lark-wiki-move.md→ the recommended flow to runwiki spaces get ...beforewiki +move.
🤖 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-drive/references/lark-drive-workflow-knowledge-organize-execution.md`
at line 86, Replace the generic "lark-wiki" pointer on line 86 with explicit
guidance: reference the lark-wiki space-list doc (notes) and show the exact CLI
to resolve the shorthand (run the wiki spaces get command with --params
'{"space_id":"my_library"}' to obtain the real space_id and then pass that value
as --space-id), and also reference the lark-wiki move doc to state the
recommended flow of running the wiki spaces get command first before running
wiki +move so readers know to resolve my_library to an actual space_id before
moving pages.
f47c4c6 to
c23be77
Compare
Change-Id: I2343fcdf26ceefb898cc8d4faeae4b17384cfea8
c23be77 to
3ec3a59
Compare
Change-Id: I2343fcdf26ceefb898cc8d4faeae4b17384cfea8
Summary
Add a lark-drive knowledge organization workflow reference for Drive/Wiki/document-library organization scenarios.
Changes
skills/lark-drive/SKILL.mdto route cloud storage / knowledge-base organization requests to the workflow.skills/lark-drive/references/lark-drive-workflow-knowledgeOrganize.mdcovering entry parsing, inventory, deduplication, planning, write confirmation, permission handling, and verification.Test Plan
Related Issues
Summary by CodeRabbit
New Features
Documentation