Skip to content

feat: sync approval skill for meta api commands#1499

Merged
MaxHuang22 merged 6 commits into
larksuite:mainfrom
taojieyeta-design:feat/approval-v4-cli-meta-api
Jun 25, 2026
Merged

feat: sync approval skill for meta api commands#1499
MaxHuang22 merged 6 commits into
larksuite:mainfrom
taojieyeta-design:feat/approval-v4-cli-meta-api

Conversation

@taojieyeta-design

@taojieyeta-design taojieyeta-design commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

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

  • add approval domain template and expand the approval skill entry with the search -> get -> create workflow
  • add approval initiate references for workflow, form control parameters, and value sourcing
  • bump the approval skill version to 1.2.0

Test Plan

  • Unit tests pass (make unit-test)
  • go vet ./...
  • Manual local verification confirms ./lark-cli approval approvals get --help, ./lark-cli approval approvals search --help, ./lark-cli approval instances create --help, and ./lark-cli schema approval work as expected

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Enhanced approval workflow documentation with step-by-step guides for initiating approval instances
    • Added comprehensive reference materials covering form control parameters and value sourcing for approval submissions
    • Improved skill description with clearer instructions on approval initiation process and third-party definition handling
    • Added detailed guidance on required confirmation steps and reporting for approval instance creation

@CLAassistant

CLAassistant commented Jun 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the size/L Large or sensitive change across domains or core paths label Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Bumps the lark-approval skill to v1.2.0, rewrites the command-selection guidance in SKILL.md and skill-template/domains/approval.md with enforced approvals.search → approvals.get → instances.create sequencing and create_link routing for third-party definitions. Adds three new reference documents covering the end-to-end initiation workflow, form control parameters, and field value sourcing.

Changes

Lark Approval Skill v1.2.0 Documentation

Layer / File(s) Summary
Skill entry point and domain template
skills/lark-approval/SKILL.md, skill-template/domains/approval.md
Bumps version to 1.2.0, rewrites command-selection table with the full approval action set, adds explicit approvals.search → approvals.get → instances.create processing chain with BLOCKING constraints: mandatory schema pre-read, create_link routing when is_external=true, --yes confirmation on write, and instance_code/instance_link reporting.
End-to-end initiation workflow reference
skills/lark-approval/references/lark-approval-initiate.md
New 196-line reference doc: CRITICAL summary, prohibited-actions list, three numbered workflows (search, get, assemble form), API-unsupported control list, high-frequency control value quick-reference, special control group rules, node parameter assembly, instance creation execution with confirmation, assembly priority order, minimum decision table, and required return fields.
Form control parameters reference
skills/lark-approval/references/approval-instance-form-control-parameters.md
New 606-line doc covering all control types (text, date, select, number, amount, formula, contact, connect, document, attachment, image, table, department, phone, address) with type/value shapes and JSON examples; special control groups (leave/overtime/out/shift) with sub-control parameters and validation error messages; API-unsupported control list.
Value sourcing reference
skills/lark-approval/references/approval-instance-value-sourcing.md
New 108-line doc defining where each field value originates when calling instances.create: per-control sourcing rules (contact → open_id, department → open_department_id, attachment/image → file code, document → token, connect → instance_code, address → geo library id), special control group assembly rules, auto-prepare limitations, and minimum decision table.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • larksuite/cli#217: Originally created the lark-approval skill package that this PR extends to v1.2.0 with reference documentation.
  • larksuite/cli#1307: Modified the same skills/lark-approval/SKILL.md to adjust approval-skill scope and processing-chain routing logic.

Suggested labels

size/L, domain/ccm

Suggested reviewers

  • MaxHuang22
  • liangshuo-1

Poem

🐇 Hoppy the rabbit checks the form,
approvals.search is the norm!
Never skip approvals.get — oh no,
is_external=true? Use create_link, let it go.
Confirm with --yes, then off we hop,
instance_code returned — we never stop! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'feat: sync approval skill for meta api commands' accurately describes the main change: synchronizing approval skill documentation to support the meta API commands workflow.
Description check ✅ Passed The PR description covers all required sections: Summary explains the purpose, Changes lists the main additions, Test Plan details verification steps completed, and Related Issues is included.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
skills/lark-approval/references/approval-instance-form-control-parameters.md (1)

356-356: 💤 Low value

Add language specifiers to JSON code blocks for syntax highlighting.

Lines 356, 452, and 539 contain JSON code blocks (请假控件组请求示例, 加班控件组请求示例, 外出控件组请求体示例) without language specifiers. Specify json to 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

📥 Commits

Reviewing files that changed from the base of the PR and between 7eeb111 and d83c229.

📒 Files selected for processing (5)
  • skill-template/domains/approval.md
  • skills/lark-approval/SKILL.md
  • skills/lark-approval/references/approval-instance-form-control-parameters.md
  • skills/lark-approval/references/approval-instance-value-sourcing.md
  • skills/lark-approval/references/lark-approval-initiate.md

Comment thread skill-template/domains/approval.md Outdated
@taojieyeta-design
taojieyeta-design force-pushed the feat/approval-v4-cli-meta-api branch from d83c229 to 13449a5 Compare June 23, 2026 07:22
@github-actions

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@58b5cf32543033f6044beaf698053460a64a059e

🧩 Skill update

npx skills add taojieyeta-design/cli#feat/approval-v4-cli-meta-api -y -g

@MaxHuang22
MaxHuang22 merged commit 806e867 into larksuite:main Jun 25, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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