Skip to content

docs: add agent-readable document context workflow - #2121

Open
xiongz-c wants to merge 2 commits into
larksuite:mainfrom
xiongz-c:feat/doc-context-workflow
Open

docs: add agent-readable document context workflow#2121
xiongz-c wants to merge 2 commits into
larksuite:mainfrom
xiongz-c:feat/doc-context-workflow

Conversation

@xiongz-c

@xiongz-c xiongz-c commented Jul 30, 2026

Copy link
Copy Markdown

Summary

Document how agents can turn one deep-read intent into a bounded composition of existing read-only commands, while preserving the docs/drive/sheets/base domain boundaries.

Changes

  • Route metadata-only, body, review-comment, and structured-resource reads to the smallest sufficient command path.
  • Add opt-in handling for comments, media, whiteboards, embedded Sheets/Base, and synced references.
  • Define long-document, partial-failure, deduplication, and coverage-reporting rules.

Test Plan

  • make unit-test
  • node scripts/skill-format-check/index.js
  • go test ./internal/qualitygate/... ./internal/skillcontent/...
  • git diff --check

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Clarified when comprehensive reading and review requests should include synchronized references and embedded Sheet/Base content.
    • Added guidance for selecting the minimum sufficient reading range, including keyword, error-code, and identifier-based requests.
    • Refined structured context handling, metadata extraction, routing rules, and long-document request deduplication.

@CLAassistant

CLAassistant commented Jul 30, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Jul 30, 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 Plus

Run ID: 853aa667-dd3c-4097-9877-e1096ae7270d

📥 Commits

Reviewing files that changed from the base of the PR and between a2be632 and dac99e1.

📒 Files selected for processing (2)
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-context.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/lark-doc/SKILL.md

📝 Walkthrough

Walkthrough

The changes refine lark-doc’s document-context reading rules and update quick-decision guidance for deep-reading requests, including synced references, embedded Sheet/Base content, keyword targeting, metadata extraction, and request deduplication.

Changes

Lark document context workflow

Layer / File(s) Summary
Document context reading workflow
skills/lark-doc/references/lark-doc-context.md
Clarifies minimal-range selection, Sheet/Base routing, metadata and synced-reference handling, and deduplication of non-equivalent requests.
Skill and reference guidance
skills/lark-doc/SKILL.md
Expands deep-reading triggers to include synced references and clarifies embedded-content conditions while retaining read-only, intent-based orchestration.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • larksuite/cli#1508: Updates the same lark-doc quick-decision guidance around downstream paths and reference retrieval.

Suggested labels: documentation

Suggested reviewers: liangshuo-1

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main documentation workflow change.
Description check ✅ Passed The description follows the template with Summary, Changes, Test Plan, and Related Issues sections filled in.
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 Jul 30, 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.

Actionable comments posted: 4

🤖 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-doc/references/lark-doc-context.md`:
- Around line 60-61: Update the read deduplication guidance to key requests by
full request identity rather than token alone, including differing revisions,
scopes, ranges, detail levels, or fields. Only deduplicate equivalent
document/resource reads, while preserving the existing partial-failure behavior
that retains retrieved content and marks uncovered data.
- Around line 18-21: Update the document-reading workflow in the fetch-range
guidance to prioritize the keyword path when the user supplies a concrete search
term, using the keyword option from lark-doc-fetch.md before
outline/section/range. Preserve the existing simple-detail path for short
overall-document requests and the outline-based path for long or partial
requests without a specific keyword.
- Around line 45-53: The embedded-resource policy is inconsistent between the
context workflow and quick-decision guidance. In
skills/lark-doc/references/lark-doc-context.md lines 45-53, define whether
Sheet/Base tags require mandatory drill-down or only task-relevant conditional
processing; then update the quick-decision trigger in skills/lark-doc/SKILL.md
line 38 to use the same rule and remain consistent with the existing
embedded-resource guidance.

In `@skills/lark-doc/SKILL.md`:
- Line 38: Update the quick-decision rule in SKILL.md to include synced
references as a trigger for reading lark-doc-context.md and orchestrating the
existing read-only capabilities. Preserve the current conditions for comments,
images, whiteboards, and embedded Sheet/Base content, or replace them with
wording that explicitly covers all relevant structured references.
🪄 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 Plus

Run ID: e2bf36ae-4b13-4943-abea-9e9b59f225eb

📥 Commits

Reviewing files that changed from the base of the PR and between 4a16139 and a2be632.

📒 Files selected for processing (3)
  • skills/lark-doc/SKILL.md
  • skills/lark-doc/references/lark-doc-context.md
  • skills/lark-doc/references/lark-doc-fetch.md

Comment thread skills/lark-doc/references/lark-doc-context.md Outdated
Comment thread skills/lark-doc/references/lark-doc-context.md Outdated
Comment thread skills/lark-doc/references/lark-doc-context.md Outdated
Comment thread skills/lark-doc/SKILL.md Outdated
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/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