Skip to content

docs: document OKR block XML guidance#1648

Merged
ZEden0 merged 4 commits into
larksuite:mainfrom
ZEden0:feat/okr-block-export-new-format
Jul 10, 2026
Merged

docs: document OKR block XML guidance#1648
ZEden0 merged 4 commits into
larksuite:mainfrom
ZEden0:feat/okr-block-export-new-format

Conversation

@ZEden0

@ZEden0 ZEden0 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Document the lark-doc XML guidance for OKR blocks so agents can use the supported OKR XML shape consistently across fetch, create, and update flows.

Changes

  • Move <okr> out of the move-only block list and point it to dedicated supplemental rules.
  • Add concise XML guidance for OKR root-only creation with cycle-id.
  • Document read-only OKR fields and writable objective/key-result attributes: status, percent, score, and okr-progress content.
  • Point agents to the lark-okr skill before creating OKR blocks so they can confirm an available OKR cycle.

Test Plan

  • git diff --check upstream/main...HEAD
  • Verified the branch contains one commit and the PR diff only changes skills/lark-doc/references/lark-doc-xml.md.
  • Manual E2E validation covered OKR XML and Markdown fetch, update, and create flows in a test environment.

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Split the OKR “resource block” rules into a dedicated <okr> entry, while keeping existing related blocks’ create/move behavior unchanged.
    • Added extended XML documentation focused on OKR blocks, including creation constraints (root-only mount via <okr cycle-id="..."/>), sample retrieval XML, and per-field read-only vs updatable rules.
    • Documented how okr-progress content is structured and how nested progress elements can be represented.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ebec521c-9dc9-4ad7-b9a6-7e25c5b0116c

📥 Commits

Reviewing files that changed from the base of the PR and between 5f62e89 and 8cb3f5d.

📒 Files selected for processing (2)
  • skills/lark-doc/references/lark-doc-xml-extended-blocks.md
  • skills/lark-doc/references/lark-doc-xml.md
✅ Files skipped from review due to trivial changes (2)
  • skills/lark-doc/references/lark-doc-xml-extended-blocks.md
  • skills/lark-doc/references/lark-doc-xml.md

📝 Walkthrough

Walkthrough

Updates lark-doc-xml.md to split okr into its own resource-block entry and adds a new OKR block chapter in lark-doc-xml-extended-blocks.md covering creation rules, example XML, and field-level read/write constraints.

Changes

OKR Block XML Documentation

Layer / File(s) Summary
OKR block resource entry and new chapter
skills/lark-doc/references/lark-doc-xml.md, skills/lark-doc/references/lark-doc-xml-extended-blocks.md
Splits okr out of the generic non-creatable resource block list, adds a dedicated OKR block section, and documents root-only <okr cycle-id="..."/> mounting, XML structure, and update constraints for cycle-id, objective-id/key-result-id, okr-objective/okr-key-result, and okr-progress.

Estimated code review effort: 2 (Simple) | ~5 minutes

Suggested labels: domain/ccm

Suggested reviewers: zhangzq0, SunPeiYang996, caojie0621

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and clearly matches the PR’s main focus on documenting OKR block XML guidance.
Description check ✅ Passed The description follows the template with Summary, Changes, Test Plan, and Related Issues sections and is sufficiently specific.
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.
✨ 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.

@github-actions github-actions Bot added domain/ccm PR touches the ccm domain size/M Single-domain feat or fix with limited business impact labels Jun 29, 2026

@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.

🧹 Nitpick comments (2)
skills/lark-doc/references/lark-doc-xml.md (2)

127-128: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Clarify inclusivity of percent/score range bounds.

The constraint "取值 0-100" could be interpreted as [0, 100] or (0, 100). Specify inclusive bounds (e.g., 0–100(含)) if the API accepts both endpoints, reducing ambiguity for agent-generated values.

🤖 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` around lines 127 - 128, Clarify
the `percent` and `score` bounds in the Lark doc reference by updating the range
description in the XML docs to explicitly state whether 0 and 100 are included;
adjust the wording around the existing `status`/`percent`/`score` bullet so it
says the accepted values are inclusive if that is the intended API behavior.

104-104: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Clarify the prohibition on create-time child tree construction.

The guidance states "创建时只写 root-only <okr cycle-id="..."/> 挂载已有 OKR,不构造 Objective/KR/Progress 子树." Consider explicitly stating that providing child elements (<okr-objective>, <okr-key-result>, <okr-progress>) during create will be ignored or rejected, to prevent agent confusion about whether partial child trees are accepted.

🤖 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 104, The OKR XML guidance
in the lark-doc reference needs to explicitly forbid create-time child tree
construction: update the instructions around the root-only `okr` usage so it is
clear that `create` must only mount an existing OKR with `<okr
cycle-id="..."/>`, and that any child elements such as `okr-objective`,
`okr-key-result`, or `okr-progress` are not accepted there and should be treated
as ignored or rejected. Use the `OKR block` guidance in the lark-doc XML
reference to make this distinction unambiguous for agents.
🤖 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.

Nitpick comments:
In `@skills/lark-doc/references/lark-doc-xml.md`:
- Around line 127-128: Clarify the `percent` and `score` bounds in the Lark doc
reference by updating the range description in the XML docs to explicitly state
whether 0 and 100 are included; adjust the wording around the existing
`status`/`percent`/`score` bullet so it says the accepted values are inclusive
if that is the intended API behavior.
- Line 104: The OKR XML guidance in the lark-doc reference needs to explicitly
forbid create-time child tree construction: update the instructions around the
root-only `okr` usage so it is clear that `create` must only mount an existing
OKR with `<okr cycle-id="..."/>`, and that any child elements such as
`okr-objective`, `okr-key-result`, or `okr-progress` are not accepted there and
should be treated as ignored or rejected. Use the `OKR block` guidance in the
lark-doc XML reference to make this distinction unambiguous for agents.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 16737c44-e952-4578-9457-2b489a8c267e

📥 Commits

Reviewing files that changed from the base of the PR and between 602c788 and 5f62e89.

📒 Files selected for processing (1)
  • skills/lark-doc/references/lark-doc-xml.md

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add ZEden0/cli#feat/okr-block-export-new-format -y -g

@github-actions github-actions Bot added size/L Large or sensitive change across domains or core paths and removed size/M Single-domain feat or fix with limited business impact labels Jul 10, 2026
@ZEden0
ZEden0 merged commit e967571 into larksuite:main Jul 10, 2026
19 checks passed
@liangshuo-1 liangshuo-1 mentioned this pull request Jul 13, 2026
3 tasks
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.

2 participants