Skip to content

docs(base): restructure skill routing and analysis guidance - #2320

Merged
zgz2048 merged 27 commits into
larksuite:mainfrom
zgz2048:codex/base-filter-common-fewshots
Aug 14, 2026
Merged

docs(base): restructure skill routing and analysis guidance#2320
zgz2048 merged 27 commits into
larksuite:mainfrom
zgz2048:codex/base-filter-common-fewshots

Conversation

@zgz2048

@zgz2048 zgz2048 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • restructure the Base skill around the real resource tree: Base blocks, Table, Field, Record, View, Form, Dashboard, Workflow, advanced permissions, Docx, and Folder
  • make data-table analysis route through the analysis SOP, with base-block-list, typed NDJSON, predicate pushdown, rev reuse, jq/Python selection, and explicit NULL semantics
  • prefer batch record writes in skill guidance while keeping the public record-upsert shortcut available through its own help
  • align CellValue and filter examples with current OpenAPI shapes, including array-based Select values, Link/User/Group IDs, Location behavior, and common error recovery
  • compress low-frequency field documentation and remove tests that asserted prose contents instead of user-visible behavior

Why

The previous entry skill was a flat command catalog with important Base concepts and routing rules spread across references. Agents frequently over-read documentation, selected legacy single-record writes, confused Base blocks with dashboard blocks, repeated artifact checks, or treated low-frequency field details as the primary workflow.

This change makes the entry skill a compact resource map, keeps module-specific contracts in their references, and preserves the Base-specific facts that a database/data-analysis model cannot infer from generic SQL or DataFrame knowledge.

User and agent impact

  • first-time agents can resolve a Base URL or title, identify the target block type, and route to the correct module from one entry document
  • data analysis defaults to the existing typed NDJSON workflow and avoids unnecessary context expansion
  • record writes favor batch create/update, including the next step returned for record share URLs
  • field updates are documented as full PUT/read-modify-write operations
  • Base operations prefer user identity and switch to bot when permission issues occur or the user explicitly requests application identity
  • public shortcuts remain registered; this is a guidance and help cleanup, not an API removal

Validation

  • git diff --check
  • go test ./shortcuts/base/... ./internal/skillcontent/...
  • verified local Markdown references have no broken targets
  • PRE regression on the existing 5,000-row Base fixture covered default 2,000-row NDJSON export, predicate pushdown to 1,500 rows, manifest/stats/rev, record search/get, jq records, and multi-table Link joins
  • blind routing evaluations covered Dashboard content/config, Base+initial-table creation, batch record updates, Form read-modify-write, Workflow, advanced permissions, table-copy recovery, and identity selection

Experimental findings incorporated

  • exposing the internal 500-row page size caused agents to paginate manually, so the SOP documents the 2,000-row artifact contract instead
  • hard rules against loading large artifacts blocked required semantic/atomic inputs, so the SOP now narrows deterministic data first and loads original text when semantic reasoning requires it
  • repeated manifest and primary-key checks added cost without improving correctness, so the workflow trusts CLI completeness and Base-managed record_id guarantees
  • Polars/DuckDB-specific guides did not improve routing enough to justify their prompt cost; the retained examples focus on jq, Python stdlib, and pandas
  • non-actionable timeout budgeting and local Field configuration validation were removed; operational limits remain owned by the CLI/backend contracts

Summary by CodeRabbit

  • Documentation
    • Updated Lark Base guidance and examples for batch record creation and updates.
    • Replaced record-upsert recommendations and documentation with batch-update workflows.
    • Clarified array-valued select fields, full-replacement updates, default values, filtering, location fields, and read-only fields.
    • Added guidance for batching field creation, retrying partial failures, handling limits and conflicts, and validating asynchronous updates.
    • Improved filtering examples for text, people, groups, and empty values.
    • Reorganized guidance around Base Blocks, permissions, workflows, and resource discovery.
    • Clarified NDJSON record listing and search limits, including a maximum page size of 500.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR updates Base shortcut payloads and hints, upgrades the lark-base skill to version 1.2.6, revises field, record, filtering, and analysis references, removes obsolete guidance and contract tests, and adds NDJSON dry-run pagination coverage.

Changes

Base guidance alignment

Layer / File(s) Summary
Shortcut payload and hint updates
shortcuts/base/*
Hints and examples now use batch-update payloads, array-valued select cells, and array-based field creation. Record-share tests expect the batch-update hint.
Skill model and execution contract
skills/lark-base/SKILL.md
The skill now documents Base Blocks, entity resolution, module routing, asynchronous updates, delegated references, and shared execution rules.
Field schemas and updates
skills/lark-base/references/lark-base-field-*.md, skills/lark-base/references/lark-base-cell-value.md
Field references now document full-replacement updates, default preservation, rating limits, location behavior, creation retries, and conversion conditions.
Record operations and analysis references
skills/lark-base/references/lark-base-record-batch-*.md, skills/lark-base/references/lark-base-filter-condition.md, skills/lark-base/references/lark-base-data-analysis-sop.md
Record batching, filtering, export revision checks, error handling, serial writes, and conflict retries are updated. Obsolete upsert guidance is removed.
NDJSON dry-run pagination
shortcuts/base/record_ops.go, shortcuts/base/base_dryrun_ops_test.go
NDJSON record-list and record-search requests cap limits at 500 and use the v3 records endpoints in dry-run tests.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Mergeability Score: ⚪ Minimal · up to 94eee

The change primarily restructures guidance while preserving the existing public shortcuts, and no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested labels: documentation

Suggested reviewers: zhouyue-bytedance

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main documentation restructuring and skill-routing changes.
Description check ✅ Passed The description provides a detailed summary, rationale, user impact, changes, and validation results; the missing template headings do not omit critical information.
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/L Large or sensitive change across domains or core paths labels Aug 12, 2026
kongenpei
kongenpei previously approved these changes Aug 12, 2026
@zgz2048
zgz2048 marked this pull request as ready for review August 12, 2026 12:24

@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-base/references/lark-base-data-analysis-sop.md`:
- Around line 63-65: Update the manifest reuse guidance in the batch extraction
workflow to always compare each manifest’s rev with the current table rev
whenever freshness affects correctness, rather than relying on elapsed time or
write frequency. Re-export the table when the revisions differ; if best-effort
reuse remains permitted, explicitly state that the reused result may be stale.

In `@skills/lark-base/references/lark-base-field-json.md`:
- Around line 431-436: 更新“+field-update”说明,明确完整 PUT
仅回写更新接口支持的可写属性;使用“+field-get”读取定义后,排除仅创建时支持的 dynamic_options_source
及其他只读属性,不要将这些字段传入更新请求。

In `@skills/lark-base/references/lark-base-field-update.md`:
- Around line 120-125: Update the blacklist exception guidance in the
field-update documentation to allow exceptions only for platform-explicitly
supported scenarios, while keeping blacklist restrictions effective for empty
columns and user-accepted data loss. Explicitly exclude link-type changes and
dynamic/static option-source switches from all exceptions.

In `@skills/lark-base/references/lark-base-record-batch-create.md`:
- Around line 54-58: Update the batch-create examples associated with the
visible status field `"状态":"Open"` so status CellValues use the established
array-valued shape, matching the shortcut help and regression-test contract.
Apply the correction to both occurrences around the examples near Lines 16 and
40, without changing unrelated fields or CLI behavior.
🪄 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: 865d670c-51fb-467d-9ef1-535318520917

📥 Commits

Reviewing files that changed from the base of the PR and between 52ab2ea and 1b43a39.

📒 Files selected for processing (19)
  • shortcuts/base/base_execute_test.go
  • shortcuts/base/base_resolve.go
  • shortcuts/base/base_resolve_test.go
  • shortcuts/base/base_shortcuts_test.go
  • shortcuts/base/base_skill_contract_test.go
  • shortcuts/base/data_query_guide_contract_test.go
  • shortcuts/base/field_create.go
  • shortcuts/base/record_batch_create.go
  • shortcuts/base/record_upsert.go
  • skills/lark-base/SKILL.md
  • skills/lark-base/references/lark-base-cell-value.md
  • skills/lark-base/references/lark-base-data-analysis-sop.md
  • skills/lark-base/references/lark-base-field-create.md
  • skills/lark-base/references/lark-base-field-json.md
  • skills/lark-base/references/lark-base-field-update.md
  • skills/lark-base/references/lark-base-filter-condition.md
  • skills/lark-base/references/lark-base-record-batch-create.md
  • skills/lark-base/references/lark-base-record-batch-update.md
  • skills/lark-base/references/lark-base-record-upsert.md
💤 Files with no reviewable changes (4)
  • skills/lark-base/references/lark-base-record-upsert.md
  • shortcuts/base/data_query_guide_contract_test.go
  • shortcuts/base/base_skill_contract_test.go
  • shortcuts/base/base_execute_test.go

Comment thread skills/lark-base/references/lark-base-data-analysis-sop.md Outdated
Comment thread skills/lark-base/references/lark-base-field-json.md
Comment thread skills/lark-base/references/lark-base-field-update.md
Comment thread skills/lark-base/references/lark-base-record-batch-create.md

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

♻️ Duplicate comments (1)
skills/lark-base/references/lark-base-field-json.md (1)

431-436: 🗄️ Data Integrity & Integration | 🟠 Major

Exclude creation-only and UI-only properties from the full PUT.

The +field-update guidance must limit full write-back to properties supported by the update API. This page states that dynamic_options_source is creation-only at Line 240 and that several properties are UI-only at Lines 241 and 339. Explicitly exclude those properties from the read-modify-write payload. Otherwise, the documented workflow can produce rejected update requests or inconsistent field definitions.

🤖 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-base/references/lark-base-field-json.md` around lines 431 - 436,
Update the +field-update guidance to exclude creation-only
dynamic_options_source and the UI-only properties identified in the field
documentation from the full PUT payload. In the read-modify-write workflow,
retain only properties supported by the update API while preserving the existing
supported field-definition attributes and --yes requirement.
🤖 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.

Duplicate comments:
In `@skills/lark-base/references/lark-base-field-json.md`:
- Around line 431-436: Update the +field-update guidance to exclude
creation-only dynamic_options_source and the UI-only properties identified in
the field documentation from the full PUT payload. In the read-modify-write
workflow, retain only properties supported by the update API while preserving
the existing supported field-definition attributes and --yes requirement.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 660612ae-868a-4971-8160-51e84fbf22a5

📥 Commits

Reviewing files that changed from the base of the PR and between 1b43a39 and 6dc567a.

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

…ommon-fewshots

# Conflicts:
#	skills/lark-base/references/lark-base-filter-condition.md
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

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

@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 `@shortcuts/base/base_dryrun_ops_test.go`:
- Around line 134-145: Add self-contained CLI-level dry-run E2E cases in
TestDryRunRecordOps for both NDJSON record-list and record-search paths, rather
than invoking dryRunRecordList or dryRunRecordSearch directly. Exercise shortcut
mounting, validation, and the CLI dry-run envelope while preserving assertions
for the expected endpoint and NDJSON query parameters.
🪄 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: 7c250195-3c89-4a1d-9b1d-2b61a2b81f55

📥 Commits

Reviewing files that changed from the base of the PR and between 625af7d and 94eee52.

📒 Files selected for processing (2)
  • shortcuts/base/base_dryrun_ops_test.go
  • shortcuts/base/record_ops.go

Comment thread shortcuts/base/base_dryrun_ops_test.go
@zgz2048
zgz2048 merged commit cb1bb1d into larksuite:main Aug 14, 2026
21 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/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