Skip to content

feat(drive): add title+body joint search guidance and Top N pagination rules - #2059

Merged
yballul-bytedance merged 3 commits into
larksuite:mainfrom
yballul-bytedance:auto-research-sync/01KYAE6YS1CYDE3Q3T70W047KJ/mr-1233-1784bdb4
Jul 27, 2026
Merged

feat(drive): add title+body joint search guidance and Top N pagination rules#2059
yballul-bytedance merged 3 commits into
larksuite:mainfrom
yballul-bytedance:auto-research-sync/01KYAE6YS1CYDE3Q3T70W047KJ/mr-1233-1784bdb4

Conversation

@yballul-bytedance

@yballul-bytedance yballul-bytedance commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Improves the lark-drive +search reference documentation with two new guidance sections:

  1. Title + body joint search: When the user provides both a title keyword and a body keyword and requires both to match the same resource, the agent should issue a single combined --query "title-word body-word" search with scope filters (--folder-tokens, --doc-types), rather than splitting into a title-only and body-only search and intersecting results client-side. --only-title / intitle: are reserved for cases where the user explicitly wants title-only matching.

  2. Top N result cap with bounded pagination: When the user asks for at most N results, N is an output upper bound — not a --page-size value. The agent should page through results (up to 3 pages), retain only candidates that satisfy both conditions based on title and summary_highlighted, read the body sequentially only for title-matched candidates when the summary is insufficient, and stop as soon as N confirmed results are collected. If 3 pages are exhausted without N results, the agent returns what it found and suggests the user narrow their keywords or scope.

The pagination strategy decision rule is also updated to reflect the new 3-page cap for joint searches alongside the existing 5-page limit for other scenarios.

Changes

  • skills/lark-drive/references/lark-drive-search.md
    • Added blockquote: — single --query approach for combined title+body searches; avoid splitting into two searches
    • Added blockquote: Top N result cap — pagination rules (up to 3 pages), sequential body reading, bounded scan termination
    • Added quick-reference table row: folder-scoped title+body search example
    • Updated 分页策略 decision rule to include the 3-page cap for joint searches

Test Plan

  • Documentation-only change; no executable code modified.
  • Verify the new blockquotes render correctly in the Markdown preview.
  • Manually validate the quick-reference table row for the joint title+body search command is consistent with the guidance text.
  • Confirm the updated pagination strategy rule is internally consistent with the new Top N pagination section.

Related Issues

Auto research task: 01KYAE6YS1CYDE3Q3T70W047KJ

Summary by CodeRabbit

Summary

  • Documentation

    • Updated natural-language guidance for combined title + body searches to use a single combined query (e.g., 标题词 正文词), with a clearer example.
    • Added an explicit example for restricting results to a folder token and returning the top N matches.
  • Improvements

    • Refined pagination behavior for title+body combined searches when top results are still insufficient: the single-query page check is now capped at 3 pages (other scenarios remain capped at 5).

…s for Top N results

- Add new blockquote explaining combined title+body search: use a single
  --query with both keywords instead of splitting into two searches
- Add rule for Top N results: N is an output cap, not --page-size; scan
  up to 3 pages filtering by title and summary_highlighted, read body
  only for title-matched candidates, stop early at N confirmed results
- Add quick-reference table row for folder-scoped title+body search
- Update pagination strategy rule to cover the 3-page cap for joint
  search in addition to the existing 5-page limit for other scenarios
@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 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 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: 66c9190d-7265-4200-8997-88da075f85d2

📥 Commits

Reviewing files that changed from the base of the PR and between 25110bd and cce3169.

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

📝 Walkthrough

Walkthrough

更新 drive +search 的自然语言映射与分页规则,明确标题和正文关键词使用单次联合查询,并补充文件夹范围及 Top N 示例;该场景的分页上限调整为 3 页。

Changes

Drive search guidance

Layer / File(s) Summary
联合关键词搜索映射与分页规则
skills/lark-drive/references/lark-drive-search.md
新增标题词与正文词使用单个 --query 的规则及文件夹范围 Top N 示例,并将该场景的分页上限明确为 3 页,其他场景仍为 5 页。

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

Possibly related PRs

  • larksuite/cli#864:同样更新 drive +search 的自然语言命令映射和分页决策规则。

Suggested reviewers: fangshuyu-768

🚥 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 change.
Description check ✅ Passed The description matches the template with Summary, Changes, Test Plan, and Related Issues 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.

@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

🤖 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-drive/references/lark-drive-search.md`:
- Line 38: Clarify the example’s Top N behavior in the documentation table:
explain that the command does not accept N through --page-size, so the agent
must paginate results, validate candidates, retain them, and stop once N
validated candidates have been collected.
🪄 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: cb48f1c9-38d6-4826-aa46-85f85a4174e5

📥 Commits

Reviewing files that changed from the base of the PR and between 56c9a2a and d67e5f0.

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

Comment thread skills/lark-drive/references/lark-drive-search.md Outdated
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add yballul-bytedance/cli#auto-research-sync/01KYAE6YS1CYDE3Q3T70W047KJ/mr-1233-1784bdb4 -y -g

@yballul-bytedance
yballul-bytedance merged commit 7abcaa7 into larksuite:main Jul 27, 2026
24 of 36 checks passed
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