Skip to content

docs(base): add common filter condition examples - #2310

Merged
zgz2048 merged 1 commit into
larksuite:mainfrom
zgz2048:codex/base-filter-common-fewshots
Aug 12, 2026
Merged

docs(base): add common filter condition examples#2310
zgz2048 merged 1 commit into
larksuite:mainfrom
zgz2048:codex/base-filter-common-fewshots

Conversation

@zgz2048

@zgz2048 zgz2048 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • expand the Base data-analysis SOP with the most common filter condition pairs observed in ListRecords and SearchRecords usage
  • distinguish text equality from substring containment and their negative forms
  • document intersects / disjoint semantics for select and user fields
  • keep empty / non_empty as one field-agnostic cell-empty contract instead of duplicating examples by field type

Why

Usage metrics show that select intersection, text containment, empty checks, and negative text/user predicates make up the most frequent filter combinations. Existing examples covered the positive cases well but left several negative forms to inference, which made generated filters less reliable.

Impact

Agents can compose common --filter-json tuples for both +record-list and +record-search directly from the SOP and shared filter reference, with less trial and error and without adding formula-specific examples.

Validation

  • git diff --check
  • go test ./shortcuts/base -run "Filter|GuideContract" -count=1

Summary by CodeRabbit

  • Documentation
    • Expanded filtering examples for text, selection, and people fields.
    • Clarified the behavior of intersects and disjoint conditions.
    • Documented correct usage of empty and non_empty, including empty multi-value fields.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

本次更新补充 Lark Base 筛选条件示例,覆盖文本、选择和人员字段的集合匹配,并明确 emptynon_empty 的使用规则。

Changes

筛选条件文档

Layer / File(s) Summary
匹配条件与集合操作
skills/lark-base/references/lark-base-filter-condition.md, skills/lark-base/references/lark-base-data-analysis-sop.md
补充文本字段的 ==!=intersectsdisjoint 示例;补充选择字段和人员字段的 disjoint 示例。
空值筛选规则
skills/lark-base/references/lark-base-filter-condition.md, skills/lark-base/references/lark-base-data-analysis-sop.md
明确 emptynon_empty 不携带 value,并说明多值字段无元素时视为空。

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

Suggested reviewers: liangshuo-1

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the documentation change to add common filter condition examples.
Description check ✅ Passed The description explains the motivation, scope, changes, impact, and validation, but does not use all template headings.
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/base PR touches the base domain size/M Single-domain feat or fix with limited business impact labels Aug 12, 2026
@zgz2048
zgz2048 marked this pull request as ready for review August 12, 2026 03:32
@zgz2048
zgz2048 requested a review from kongenpei as a code owner August 12, 2026 03:32

@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-base/references/lark-base-filter-condition.md`:
- Around line 63-76: 更新该过滤条件说明段落,明确将 intersects 定义为判断是否包含目标片段,将 disjoint
定义为判断是否不包含目标片段;保持 == / != 的完整文本比较说明及现有 JSON 示例不变,并与
lark-base-data-analysis-sop.md 中的表述一致。
🪄 Autofix

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: bca58fdc-b192-469b-8a7b-370ddeae2535

📥 Commits

Reviewing files that changed from the base of the PR and between cd1c2a3 and 27ceb0d.

📒 Files selected for processing (2)
  • skills/lark-base/references/lark-base-data-analysis-sop.md
  • skills/lark-base/references/lark-base-filter-condition.md

Comment thread skills/lark-base/references/lark-base-filter-condition.md
@github-actions

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add zgz2048/cli#codex/base-filter-common-fewshots -y -g

@zgz2048
zgz2048 merged commit fd97039 into larksuite:main Aug 12, 2026
30 of 42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain/base PR touches the base 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