feat: sync approval skill for meta api commands#1499
Conversation
|
taojie.yeta seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
📝 WalkthroughWalkthroughBumps the ChangesLark Approval Skill v1.2.0 Documentation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
skills/lark-approval/references/approval-instance-form-control-parameters.md (1)
356-356: 💤 Low valueAdd language specifiers to JSON code blocks for syntax highlighting.
Lines 356, 452, and 539 contain JSON code blocks (请假控件组请求示例, 加班控件组请求示例, 外出控件组请求体示例) without language specifiers. Specify
jsonto enable syntax highlighting for readers.🔧 Proposed fixes
**请假控件组请求示例** -``` +```json { "id": "widgetLeaveGroupV2",**加班控件组请求示例** -``` +```json { "id": "widgetWorkGroup",**外出控件组请求体示例** -``` +```json { "id": "widgetOutGroup",Also applies to: 452-452, 539-539
🤖 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-approval/references/approval-instance-form-control-parameters.md` at line 356, Add language specifiers to the three JSON code blocks in the documentation by changing the opening code fence from triple backticks to triple backticks followed by "json". Specifically, update the code blocks in the sections for 请假控件组请求示例, 加班控件组请求示例, and 外出控件组请求体示例 to enable syntax highlighting by specifying the json language identifier after the opening backticks.
🤖 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 `@skill-template/domains/approval.md`:
- Line 32: The relative paths to reference documentation files in the
approval.md blocking requirement are incorrect and resolve to a non-existent
directory. Update all three broken relative paths (lark-approval-initiate.md,
approval-instance-form-control-parameters.md, and
approval-instance-value-sourcing.md) that currently use the relative path prefix
to instead use the correct relative path that navigates two directories up and
then into the skills/lark-approval/references directory, following the same path
pattern already established in base.md for consistency across the domain
documentation.
---
Nitpick comments:
In
`@skills/lark-approval/references/approval-instance-form-control-parameters.md`:
- Line 356: Add language specifiers to the three JSON code blocks in the
documentation by changing the opening code fence from triple backticks to triple
backticks followed by "json". Specifically, update the code blocks in the
sections for 请假控件组请求示例, 加班控件组请求示例, and 外出控件组请求体示例 to enable syntax highlighting
by specifying the json language identifier after the opening backticks.
🪄 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: dd04005e-beab-4a86-8d44-8df1b8eb9685
📒 Files selected for processing (5)
skill-template/domains/approval.mdskills/lark-approval/SKILL.mdskills/lark-approval/references/approval-instance-form-control-parameters.mdskills/lark-approval/references/approval-instance-value-sourcing.mdskills/lark-approval/references/lark-approval-initiate.md
|
|
||
| ## 发起原生审批 | ||
|
|
||
| **BLOCKING REQUIREMENT: 只要用户意图是“发起审批 / 提单 / 提交请假审批 / 提交报销审批 / 创建审批实例”,第一步 MUST 先用 Read 工具读取 [`references/lark-approval-initiate.md`](references/lark-approval-initiate.md)、[`references/approval-instance-form-control-parameters.md`](references/approval-instance-form-control-parameters.md) 和 [`references/approval-instance-value-sourcing.md`](references/approval-instance-value-sourcing.md),并运行 `lark-cli schema approval.instances.create`。未完成前,禁止直接调用 `approval instances create`。** |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify directory structure and reference doc locations
echo "=== Checking skill-template/domains/ structure ==="
find skill-template/domains -type f -name '*.md' | head -20
echo ""
echo "=== Checking skills/lark-approval/references/ structure ==="
find skills/lark-approval/references -type f -name '*.md' | head -20
echo ""
echo "=== Checking if references are duplicated in skill-template ==="
find skill-template -type d -name 'references' 2>/dev/null | grep -v node_modules
echo ""
echo "=== Checking for symlinks ==="
find skill-template -type l 2>/dev/null | grep -i approvalRepository: larksuite/cli
Length of output: 884
🏁 Script executed:
# Check full content of approval.md to understand context
head -50 skill-template/domains/approval.md
# Check if other domain files also reference external docs
grep -r "references/" skill-template/domains/ | head -10
# Look for any documentation or build config explaining skill-template usage
find . -maxdepth 2 -type f \( -name 'README*' -o -name '*.md' \) | xargs grep -l "skill-template" 2>/dev/null | head -5Repository: larksuite/cli
Length of output: 4620
Fix broken relative paths to reference documentation.
Lines 32 and 38–40 use relative paths (references/lark-approval-initiate.md, etc.) that resolve to skill-template/domains/references/, which does not exist. The referenced docs are located at skills/lark-approval/references/. Update these paths to ../../skills/lark-approval/references/lark-approval-initiate.md, etc., to match the pattern used in skill-template/domains/base.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 `@skill-template/domains/approval.md` at line 32, The relative paths to
reference documentation files in the approval.md blocking requirement are
incorrect and resolve to a non-existent directory. Update all three broken
relative paths (lark-approval-initiate.md,
approval-instance-form-control-parameters.md, and
approval-instance-value-sourcing.md) that currently use the relative path prefix
to instead use the correct relative path that navigates two directories up and
then into the skills/lark-approval/references directory, following the same path
pattern already established in base.md for consistency across the domain
documentation.
Summary
Sync approval skill docs for the approval meta API flow, covering search launchable definitions, get approval details, and create native approval instances. This keeps the approval skill aligned with the generated API commands and adds the initiate workflow guidance needed by agents.
Changes
Test Plan
make unit-test)go vet ./..../lark-cli approval approvals get --help,./lark-cli approval approvals search --help,./lark-cli approval instances create --help, and./lark-cli schema approvalwork as expectedRelated Issues
Summary by CodeRabbit