Skip to content

fix: add OKR API restriction in SKILL.md#546

Merged
syh-cpdsss merged 1 commit intomainfrom
feat/okr_dev
Apr 17, 2026
Merged

fix: add OKR API restriction in SKILL.md#546
syh-cpdsss merged 1 commit intomainfrom
feat/okr_dev

Conversation

@syh-cpdsss
Copy link
Copy Markdown
Collaborator

@syh-cpdsss syh-cpdsss commented Apr 17, 2026

Summary

Add OKR domain skill reference docs and improve e2e test infrastructure for OKR shortcuts.

Changes

  • Improved API Resources descriptions

Test Plan

  • Existing unit tests pass (make unit-test)

Related Issues

  • None

Summary by CodeRabbit

Documentation

  • Updated documentation for OKR cycle and objective management endpoints, specifying that positions must not overlap, weights must sum to 1.0, and all related objectives must be updated together in a single request.
  • Enhanced documentation for objective alignment operations with explicit constraints preventing self-targeting and requiring overlapping time ranges between aligned objectives.

Change-Id: Ic2734f1da8525ec48f091ccd72c96921b9bb0fc1
@github-actions github-actions bot added the size/M Single-domain feat or fix with limited business impact label Apr 17, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 17, 2026

📝 Walkthrough

Walkthrough

Documentation updates to the lark-okr skill file adding explicit validation requirements for API endpoints controlling objective and key result positioning, weighting, and alignment relationships.

Changes

Cohort / File(s) Summary
Documentation Updates
skills/lark-okr/SKILL.md
Added validation constraints for cycles.objectives_position, cycles.objectives_weight, objectives.key_results_position, objectives.key_results_weight endpoints requiring non-overlapping positions and weights summing to 1; added objective.alignments.create constraints for self-targeting prevention and time range overlap requirements.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 Hop through the docs, constraints now clear,
Positions aligned, no overlaps here!
Weights sum to one, time ranges align,
Each validation rule now reads just fine!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding OKR API restrictions to SKILL.md documentation.
Description check ✅ Passed The description provides a summary, lists main changes, and includes a test plan with checkbox verification. All required template sections are present and filled.
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
  • Commit unit tests in branch feat/okr_dev

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.

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.

🧹 Nitpick comments (2)
skills/lark-okr/SKILL.md (2)

52-54: Clear validation requirements for position and weight updates.

The documentation clearly explains that position and weight updates must be atomic (all objectives together) with proper constraints (no overlaps for position, sum to 1 for weights). This will help developers avoid validation errors.

Minor punctuation nitpick

Line 54 has a space before the comma ("等于 1 ,") which is inconsistent with standard Chinese punctuation. Consider removing it:

- 请求中必须同时修改对应周期下全部目标的权重,且所有权重值的和必须等于 1 ,否则会参数校验失败。
+ 请求中必须同时修改对应周期下全部目标的权重,且所有权重值的和必须等于 1,否则会参数校验失败。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-okr/SKILL.md` around lines 52 - 54, The Chinese punctuation
around the weight requirement has an extra space before the comma in the phrase
under `objectives_weight` ("等于 1 ,"); remove the space so the comma directly
follows the character (use "等于 1,") to match standard Chinese punctuation and
maintain consistency in SKILL.md's description of the atomic update/validation
rules for positions and weights.

80-82: Consistent validation requirements for key results.

The documentation mirrors the validation logic from cycles.objectives (lines 52-54), applying the same atomic update and constraint rules to key results under objectives. This consistency makes the API behavior predictable and easier to understand.

Minor punctuation nitpick

Line 82 has the same spacing issue as line 54 ("等于 1 ,"). Consider removing the space:

- 请求中必须同时修改对应目标下全部关键结果的权重,且所有权重值的和必须等于 1 ,否则会参数校验失败。
+ 请求中必须同时修改对应目标下全部关键结果的权重,且所有权重值的和必须等于 1,否则会参数校验失败。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/lark-okr/SKILL.md` around lines 80 - 82, The phrase "等于 1 ," in the
SKILL.md documentation has an extra space before the comma; update the text
under `key_results_weight` so the spacing matches the rest of the doc (change
"等于 1 ," to "等于1,") to fix the punctuation inconsistency and mirror the
formatting used in the `cycles.objectives` section.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@skills/lark-okr/SKILL.md`:
- Around line 52-54: The Chinese punctuation around the weight requirement has
an extra space before the comma in the phrase under `objectives_weight` ("等于 1
,"); remove the space so the comma directly follows the character (use "等于 1,")
to match standard Chinese punctuation and maintain consistency in SKILL.md's
description of the atomic update/validation rules for positions and weights.
- Around line 80-82: The phrase "等于 1 ," in the SKILL.md documentation has an
extra space before the comma; update the text under `key_results_weight` so the
spacing matches the rest of the doc (change "等于 1 ," to "等于1,") to fix the
punctuation inconsistency and mirror the formatting used in the
`cycles.objectives` section.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2f615a17-e76e-46fa-a3ad-e2de266ccaa7

📥 Commits

Reviewing files that changed from the base of the PR and between 4f90fd3 and 02f57f3.

📒 Files selected for processing (1)
  • skills/lark-okr/SKILL.md

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.91%. Comparing base (4f90fd3) to head (02f57f3).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #546   +/-   ##
=======================================
  Coverage   59.91%   59.91%           
=======================================
  Files         388      388           
  Lines       33147    33147           
=======================================
  Hits        19859    19859           
  Misses      11420    11420           
  Partials     1868     1868           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#feat/okr_dev -y -g

@syh-cpdsss syh-cpdsss merged commit 09e60ee into main Apr 17, 2026
22 checks passed
@syh-cpdsss syh-cpdsss deleted the feat/okr_dev branch April 17, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants