docs(im): trim leaf references to non-derivable content - #2134
docs(im): trim leaf references to non-derivable content#2134luozhixiong01 wants to merge 11 commits into
Conversation
The eval showed an agent guessing a conventional page size instead of consulting schema. The file did carry a schema pointer, but a generic one -- "run schema for the authoritative parameters" does not tell the agent which field to look up, so it never looked. Name the two fields (queries[].page_token, page_size_per_message), say they live under --data, and bind them to the rule that a batch fragment is not a complete reaction set. The values themselves stay in schema.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
review seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Summary
The nine leaf references under
skills/lark-im/restated large amounts of content that--helpandschemaalready emit — parameter tables, field tables, response-shape examples, scope tables, command inventories. That content costs an agent context on every read and goes stale independently of the CLI. This PR rewrites each file to carry only what the authoritative sources cannot express, and drops## 权限表fromSKILL.md.Net effect: 27279 → 12167 tokens (−55.4%) across the nine files, with no measurable capability loss (see Test Plan).
Changes
skills/lark-im/references/files to non-derivable content only; each now opens with a one-line pointer at--help/schemaand keeps three kinds of content:reaction_typenesting differs across the four reaction methods), caller-identity constraints, counter-intuitive defaults (+threads-messages-listdefaults to asc while+chat-messages-listdefaults to desc), command-selection boundaries (+chat-searchsearches chats,+chat-listlists the ones you are in).retry_scope=noneforbids replaying a write;meta.completeis the only proof a read was exhaustive.HELP-GAPsections — facts the authority should carry but does not yet (e.g. the completeemoji_typekey list). These are marked as explicit debt, not a permanent home.## 权限表fromskills/lark-im/SKILL.md.references/skill-quality-standard.md§8.1 lists "no scope/permission mapping table" as non-waivable, and all 36 scopes were verified retrievable fromschema(36/36).## Safety Constraintssections inmessages-send.mdandmessages-reply.mdbyte-for-byte — verified by section-level comparison against the base, not by keyword grep.Per-file token reduction (tiktoken
cl100k_base):lark-im-messages-send.mdlark-im-feed-groups.mdlark-im-messages-reply.mdlark-im-messages-search.mdlark-im-reactions.mdlark-im-chat-messages-list.mdlark-im-chat-create.mdlark-im-chat-search.mdlark-im-chat-list.mdSKILL.md: 6506 → 5892 (permission table only).Test Plan
Unit tests pass (
go testexcluding E2E packages)go build ./...Skill eval, un-slimmed vs slimmed, three rounds each — real execution against the test tenant, 18 cases / 72 numbered judgment points, model
gpt-5.5:The two distributions overlap completely. At judgment-point level, zero true regressions (criterion: passes all three un-slimmed rounds and fails all three slimmed rounds). Ten of eighteen cases score full marks in both arms, covering idempotency contracts, prompt-injection isolation, approval semantics, the resource-download switch, read-completeness criteria, and feed rule semantics.
Scope of that claim: this is "no loss was measured", not "equivalence was proven" — 15 of 72 judgment points are unstable across rounds, so differences on the order of 1–2 points are below the resolution of this experiment.
Mechanical assertion that no non-derivable fact was lost: every identifier in the frozen must-keep baseline still present in all nine files. The assertion deliberately does not recompute derivability against a fresh oracle — a widened oracle would let a genuinely lost fact pass.
Token floor gate on all nine files (34% floor, actual 47–64%)
Related Issues