Skip to content

docs(skills): objectstack-ai teaches knowledge sources over business objects - #38292

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/area-o1C-37976
Nov 28, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/area-o1C-37976

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #37976
repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用 AI 搭应用的作者和他们的 AI 助手,在技能文档「知识源」一节里,原来只看到按制度库配置的写法;现在多了三条针对普通业务对象的规则,各带一个例子:只索引长文本、一类语料一个知识源并在检索时点名、附件文字先写进文本字段。
  • 属于「知识检索」这条线:平台是元数据开发平台,知识源不能只按制度库来教。
  • 只改技能文档的文字和一条评测用例,不改任何运行行为;写得不对最多是作者按错的建议配置,可以直接撤回。技能文档因此变长 242 个 token(先删了重复,余额按已有裁定实测上调)。
  • 无

What changes

  • skills/objectstack-ai/SKILL.md, section "Knowledge Sources (RAG)": one new block, "Sources over business objects", placed after the supportKb example and before "Splitting". Three rules, one example each:
    • (a) Long free text only. content lists prose (an article body, a ticket's description, a note) with its title or subject line. Numbers, dates, statuses and the names of people or accounts stay out; counts and filters go to the record tools. Example: "Which customers reported login loops?" is search_knowledge; "how many tickets are open per priority?" is aggregate_records (in-app ask: aggregate_data).
    • (b) One source per corpus. A skill's instructions say which to pass in sourceIds, the argument of the one search_knowledge tool. Example: search_knowledge({ query, sourceIds: ['ticket_bodies'] }). Omitted, every exposed source is scanned. No second shape is taught.
    • (c) Attachment text goes through a field. A file field in content adds no file text (the file and http kinds are retired). Example: write the extracted text to a textarea field, contract.attachment_text, and list that field.
  • Duplicates deleted first (ruling record 6513306068, letter B, 「A:先削重复,余额按实测提高」):
    • the source.content row's "Meaningful text only" (rule (a) says it); the row keeps "Never ids or system fields";
    • the agent.knowledge pitfall row's "describe intended grounding in instructions" is now a pointer to rule (b): "name the sourceIds to pass in instructions (§ Knowledge Sources)";
    • the retired-kinds line's "no form in 19" became the pointer "attachment text: below".
  • scripts/check-skills-token-ratchet.mjs: the skills/objectstack-ai/SKILL.md row moves 6906 to 7148, the measured remainder, pinned at the measurement, with the arithmetic in the row note. The row's stale trailing comment is removed.
  • skills/objectstack-ai/evals/skills-tools-knowledge.json: case 15 (two corpora, numeric fields, a PDF file field, a count question) covers (a), (b) and (c).
  • .changeset/37976-skill-knowledge-sources-beyond-documents.md: @objectstack/skills patch.

Lines of the adapter row and its ratchet note, which the open pull request 38224 edits, are not touched. Both pull requests move the same ratchet row; the one that lands second merges main and re-measures.

Review round (second commit, c71105c)

  • M1: case 15's must_not_contain now names wrong shapes only: kind: 'file', and kind: 'http', inside a literal (both quote styles), contentFields:, a content: list that starts with priority, status, amount or contract_pdf, and a list that puts one of those four directly after 'description'. metadataFields: ['status', 'priority'], groupBy: ['priority'] and a sentence that names the retired kinds all pass. Residual, stated: a content list that carries a short field in another position is not caught, and a non-content list that puts priority directly after description would be refused.
  • N1: rule (a) says a title or subject line belongs, and names "the names of people or accounts" in place of "short names".
  • N2: "Never ids or system fields" is back on the content row; rule (c) no longer restates that no source reads a file.
  • N3: the agent.knowledge row points to instructions and the section again.
  • N4: rule (a) names both spellings, aggregate_records and aggregate_data.
  • N5: the stale trailing comment on the ratchet row is gone.

Token ratchet arithmetic

Priced bytes are file bytes minus the 27-byte release-stamp line; tokens are ceil(priced bytes / 4).

Reading Before (main f19350b) After (head 742647d) Delta
skills/objectstack-ai/SKILL.md, lines 489 505 +16
skills/objectstack-ai/SKILL.md, bytes 27648 28617 +969
same file, priced bytes 27621 28590 +969
same file, tokens (the ratchet row) 6906 7148 +242
all skills/*/SKILL.md, lines 4940 4956 +16
all skills/*/SKILL.md, bytes 262358 263327 +969
ratcheted (authored) subtotal, tokens 199826 200068 +242
eval fixtures (measured, not ratcheted), tokens 88864 89389 +525
bundle total (whole shipped tree), tokens 303542 304309 +767

Row note arithmetic: the file is 27648 to 28617 bytes, so the landed priced text is 28590 and ceil(28590 / 4) = 7148; the row moves +242, headroom 0. The first commit measured 7109; the review's restored clauses and the second tool spelling add 39.

Tests

Readings on head 742647d unless a line says otherwise. 742647d differs from c71105c by the changeset note only (its wording follows the reviewed skill text); the eval ran on c71105c, whose skills/ tree is identical.

  • node scripts/check-skills-token-ratchet.mjs: exit 0. "skills/objectstack-ai/SKILL.md is 7148 tokens (ceiling 7148; headroom 0)"; "61 authored bundle file(s) within their ceilings".
  • node scripts/check-skills-token-ratchet.mjs --self-test: exit 0, "self-test: 111 cases pass".
  • pnpm --filter @objectstack/spec run check:skill-docs: exit 0, "Skill docs in sync".
  • pnpm --filter @objectstack/spec run check:skill-refs: exit 0, "10 generated files in sync".
  • node scripts/check-nul-bytes.mjs: exit 0.
  • pnpm --filter @objectstack/spec run check:skill-examples: NOT MEASURED on c71105c (exit 3, prerequisite not met: packages/client-react/dist is not built in the recreated worktree, and the shared verify lock was held by a full dogfood run through four 9-minute waits). On the first commit, d16dc4b, it exited 0 with "351 prose examples type-check across 3 surface(s)". The second commit changes prose and no marked code block; CI runs the gate.
  • The other gates of the dispatch-gates --commands list were run on d16dc4b and are not re-run on c71105c; CI runs them on the new head.

Eval case 15, both arms

pnpm --filter @objectstack/scenarios skill-evals --case objectstack-ai/skills-tools-knowledge#15, on c71105c, 1 repetition per arm, served model claude-opus-5-5, Claude Code 2.1.332, OAuth login, runner defaults.

Arm Verdict Missed tokens Forbidden tokens carried
with-skill PASS none none
no-skill FAIL sourceIds, content:, and none of aggregate_records / query_records / aggregate_data none

Score: with-skill 1/1, no-skill 0/1.

  • with-skill, key lines: "Listing a file field in a knowledge source adds no text from the file, so a hook, flow or import has to extract the PDF's text into a textarea field first, and the source indexes that field." It writes content: ['subject', 'description'] with metadataFields: ['priority', 'status'], tells the skill "Always pass sourceIds; never search all sources at once", and sends the count to aggregate_data. That answer carries metadataFields: ['priority', 'status'], which the first version of the case would have refused.
  • no-skill, key lines: "Treat the key names (source, chunking, metadata, …) as illustrative". It invents fields:, fileField: 'contract_pdf' with an extraction block, and a count_open_tickets_by_priority tool file; it names no sourceIds.
  • Setup: the runner reads its dependencies' dist/. The verify lock was busy, so the built dist/ of the 16 packages in the runner's closure was copied from sibling worktrees whose package sources are byte-identical to this head (git diff --quiet per package, clean status); the seventeenth, refd-timer-testkit, is source-only. The skill text and the case came from this head.
  • Records: the seat's scratchpad, issue-37976/eval-15 (round.json, summary.md, runs/ with one JSON per arm).

Acceptance notes

  • Facts read on main f19350b before writing: sourceIds is an argument of search_knowledge (packages/services/service-knowledge/src/knowledge-tools.ts, its input keys); source.kind has the one arm object (packages/spec/src/ai/knowledge-source.zod.ts); a document's text is each listed field's value joined as a string (packages/services/service-knowledge/src/knowledge-service.ts, the record-to-document function), so a number in content is indexed as its digits and a file field contributes no file text.
  • aggregate_records is registered only where the data bridge implements aggregate; the in-app assistant serves aggregate_data. Rule (a) names both.
  • Not measured against a running app: the text is teaching, and no behaviour is claimed beyond the three facts above.

Verification

Read first, by risk:

  1. skills/objectstack-ai/evals/skills-tools-knowledge.json, case 15's must_not_contain: the risk is a token that refuses a correct answer.
  2. skills/objectstack-ai/SKILL.md, the "Sources over business objects" block: three bullets, each claim listed under Acceptance notes with the file it was read from.
  3. scripts/check-skills-token-ratchet.mjs, the row note and the value 7148.

Two-minute check: node scripts/check-skills-token-ratchet.mjs and read its first line. Expected: "skills/objectstack-ai/SKILL.md is 7148 tokens (ceiling 7148; headroom 0)".

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (No schema touched.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran. pnpm lint is left to CI.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec not touched.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

Generated by Claude Code

…objects

Long free text only, one source per corpus with sourceIds, attachment text
through a text field. One eval case; the token ratchet row follows the
measurement.

Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 28, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · d16dc4b · 2026-11-28T11:38Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: d16dc4b0a4d2a156db0d6923787ff03c6da37d59
Local-runs: none
Scope: skills/objectstack-ai/SKILL.md, skills/objectstack-ai/evals/skills-tools-knowledge.json + scripts/check-skills-token-ratchet.mjs
Security-touching: yes

PR #38292 (card #37976), net diff against merge base f19350b410df08db604881848b2c370047a114f2. Read: the card body and its four comments, the PR body and file list, the net diff, the head's check-runs, and the head tree through git show (no checkout, no build, no run). Remainder of the diff, the lane seat's ACCEPT at TIER_DEFAULT: .changeset/37976-skill-knowledge-sources-beyond-documents.md.

Security-touching reads yes because one changed hunk edits the agent.knowledge retired-key row, whose surviving sentence teaches where retrieval is restricted (aiExposed, source.where) and that sourceIds is model-chosen and scopes nothing; the new second rule also speaks of "every exposed source". The teaching is correct against packages/services/service-knowledge/src/knowledge-tools.ts (the executor searches only sources whose aiExposed is not false, and re-checks every hit as the caller), but it is access-control teaching, so the arm does not land on no.

① Derived judgments

  • Accept-set: none changes. No schema, validator, tool definition or runtime file is in the diff; KnowledgeSourceSchema, search_knowledge and the record tools are byte-identical to the merge base. Right.
  • Public surface: the published @objectstack/skills bundle gains one teaching block (three bullets) in skills/objectstack-ai/SKILL.md and loses two clauses; the eval file gains case 15 (inert in consumer installs per skills/README.md). Right, and declared.
  • Gate surface: the ratchet row for skills/objectstack-ai/SKILL.md rises 6906 to 7109. A ceiling raise is a loosening of a gate and is judged under ④ against ruling record 6513306068, letter B.
  • Check-runs on the head at the time of reading: 43 runs; every concluded run is success or skipped by design, including Check Changeset, PR-body guards, Governed Surface Queue Guard, Lint · repo and tooling gates, Lint · PM dispatch-gates, Lint · docs and code guards, and the three Type Check lanes. Three had not concluded: Test Core (1/10), Test Core (2/10), Lint · scoped · slot lookup and corpus. No gate family is red; the three open runs are not yet a verdict, and the adopting seat reads them before any hand-off.

② Semver level

@objectstack/skills patch, with Clause-②: no and Metadata-protocol: none on both the PR body and the changeset. The diff publishes skill prose and an eval fixture only; no accept-set narrows and no protocol key moves. Patch is the right level, and Check Changeset concluded success.

Clause-②: no — agreed.

③ Boundary flags

  • open_questions: empty. Nothing to answer.
  • Dev flag, pnpm check:dual-build-cjs-loads NOT MEASURED locally (prerequisite not met): answered by CI; no concluded run on the head is red, and the diff holds no package source that the check reads.
  • Dev flag, pnpm check:pm-dispatch-gates exit code not captured: answered by the check-run Lint · PM dispatch-gates, success on this head.
  • Dev flag, eval case 15 runs NOT MEASURED: not accepted, see S1.
  • Deviation, commit trailers follow AGENTS.md: accepted.
  • Deviation, the row note on main said priced 27623 where the file measures 27621: confirmed from the blobs (27648 bytes minus the 27-byte stamp line is 27621; both give 6906). The new note is written against the measured figure. Accepted.
  • Deviation, the PR body's fourth quick-read line reads "none needed" while the PR raises a ceiling: accepted, the raise rides the standing ruling and needs no per-card ruling under letter B.
  • SQL push-down: not applicable; the diff holds no query, id materialisation or join.
  • Ordering with PR docs(skills): objectstack-ai names the save refusal of a knowledge_source whose adapter is not mounted #38224 (open, head f2f00af325): it moves the same ratchet row 6906 to 6958 (file +210 bytes) and edits the adapter row of the same section. Both PRs rewrite the same line of scripts/check-skills-token-ratchet.mjs and insert a note directly above it, so the second to land conflicts and must merge main and re-measure. With both landed the file is 27648 + 210 + 813 = 28671 bytes, priced 28644, and the row is ceil(28644 / 4) = 7161; neither 6958 nor 7109 is then right, and the note's arithmetic must be rewritten against the new base. That edit is in the ratchet script, not a prose face, so it moves the head and this record (or its delta) no longer covers it: the second PR needs a fresh record on its merged head.

④ Design judgment

skills/objectstack-ai/SKILL.md, the three rules, read against the head tree.

  • (a) Long free text only. Holds. recordToDocument (packages/services/service-knowledge/src/knowledge-service.ts) pushes String(v) for every non-null listed field and joins with a blank line, so a number, date or status in content is embedded as its digits or label. content is the exact key (packages/spec/src/ai/knowledge-source.zod.ts). search_knowledge and aggregate_records both exist under exactly those names (SEARCH_KNOWLEDGE_TOOL_NAME; MCP_DOOR_TOOL_NAMES in packages/spec/src/system/constants/platform-tool-names.ts), and aggregate_records is the name the skill's own MCP table carries. The example pair (login loops to search_knowledge, open tickets per priority to aggregate_records) is right.
  • (b) One source per corpus with sourceIds. Holds. sourceIds and query are members of INPUT_KEYS and of the tool's JSON Schema (knowledge-tools.ts); an omitted sourceIds searches every source whose aiExposed is not false, which is what "every exposed source is scanned" says. A bare name such as ticket_bodies resolves by resolveSourceRef when no second package ships that name, so the example call is valid beside the section's NAMESPACE-NAME sentence. instructions is a real skill key and search_knowledge resolves on rung 2 of the ladder. One tool, one argument shape; no second shape is taught.
  • (c) Attachment text through a field. Holds. source.kind has the one arm object; file and http are refused. textarea and file are both members of the field-type enum (packages/spec/src/data/field.zod.ts). A file field in content contributes String(value) of the stored reference, never the file's text, and no os validate rule the section lists catches it, so the warning earns its place.
  • Consistency with the text skills/objectstack-ai and the MCP authoring contract teach knowledge_source as metadata: name, an explicit content list, no wildcard, the retired keys, and a create seed #37310 landed: the block uses content, kind: 'object' and the one search_knowledge tool, and sits between the supportKb example and Splitting without contradicting either. The card's acceptance (three rules, one example each, patch changeset) is met by the skill file.

scripts/check-skills-token-ratchet.mjs, the row 6906 to 7109, under ruling record 6513306068 letter B.

  • Arithmetic, from the blobs: base file 27648 bytes, head file 28461 bytes; the stamp line ( version: "19.0.0-next.2" plus its newline) is 27 bytes; priced 27621 and 28434; ceil(27621 / 4) = 6906 and ceil(28434 / 4) = 7109; the row moves +203 with headroom 0. The note's numbers agree with the tree, sentence by sentence.
  • Letter B's three conditions: the diff shows deletion in the same file (two clauses removed, one replaced by a pointer); the PR body and the row note quote 「A:先削重复,余额按实测提高」 and name the record; the row is pinned at the measurement. Met, and the check-run that carries the ratchet concluded success.
  • Is the pay-down enough? Under letter B, yes: it asks for a shown deletion of restatement and the measured remainder, not a ratio. The deletions net roughly 87 bytes (about 22 tokens) against about 900 bytes of new text. I read the Knowledge Sources section, the skill and MCP sections and the agent tables for restatement the new block makes redundant and found only small residue, graded below as N2; nothing large was left unpaid. The growth is the card's mandated content (three rules, three examples), not a rider, so the 10402 principle is not engaged.

skills/objectstack-ai/evals/skills-tools-knowledge.json, case 15.

The grader is mechanical (packages/qa/scenarios/src/skill-evals/grade.ts: literal, case-sensitive substring; no model reads expected_output). Tried against the answer the case's own expected_output describes:

M1 (must-fix) — case 15's must_not_contain refuses the answer its expected_output calls correct. (i) 'priority'] and 'amount']: the expected output allows those fields in metadataFields ("at most metadataFields"), and the count question the prompt asks is answered canonically with groupBy: ['priority'] on aggregate_records (its groupBy is a list of field names). metadataFields: ['status', 'priority'], metadataFields: ['priority', 'status', 'amount'] and groupBy: ['priority'] each contain a forbidden token, so a correct with-skill answer fails on field order or on showing the very call rule (a) teaches. (ii) kind: 'file' and kind: 'http': the expected output wants the answer to say those kinds are retired, and the skill spells them source.kind: 'file' / 'http'; an answer that quotes the skill to explain the retirement contains the forbidden substring. The tokens need anchoring to the wrong construct itself, the way cases 3 and 13 anchor ['*'],: for example a content: list carrying the field, and a kind: 'file', inside a source literal. As written the case can score the skill as failing when it taught correctly, and it has never been run (S1), so nothing shows otherwise.

S1 (should-fix) — the with-skill and no-skill runs of case 15 are owed before the Tier H hand-off, and the stated reason does not hold against the tree. The PR body and dev report say no eval runner is in the repository or reachable. The runner is in the head tree: packages/qa/scenarios/src/skill-evals/cli.ts, script skill-evals in packages/qa/scenarios/package.json, operator page in packages/qa/scenarios/README.md ("Running the published skills' eval cases"), with --case objectstack-ai/skills-tools-knowledge#15 for exactly this. Comment 7232993751 on #37310 records the same seat running cases 13 and 14 of this file on both arms earlier the same day in this environment, with the dependency dist/ copied from a clean worktree when the verify lock was busy. The runner is not a merge gate, so the debt is not a red gate; it is owed here because case 15 is new, is the only instrument that accepts the three rules, and M1 shows its tokens were never exercised. Run it on the fixed case, both arms, and record score, key lines and where the records sit, as 7232993751 does. If the dev container truly has no login, the seat that ran 13 and 14 runs it.

N1 (nit) — rule (a) says "short names stay out" two paragraphs below an example whose content is ['title', 'body'], and case 15's expected_output calls title and subject "long free-text fields only". A reader cannot tell whether a title is a short name. One word settles it (for example, a title or subject line belongs; a person, account or status name does not). No runtime effect: the display field is stored as each document's title either way.

N2 (nit) — pay-down residue. The content row lost "never ids or system fields", which rule (a) does not restate (it names numbers, dates, statuses and short names, not ids or system columns, and the validator bullet says id and system columns resolve); that clause was a small teaching loss more than a duplicate. In the other direction, rule (c)'s "No source reads a file" restates the source.kind row and the retired-kinds line, which now points down to it. Either can be settled inside the same measured row.

N3 (nit) — the agent.knowledge row's header promises "why, and what replaces it"; with "describe intended grounding in instructions" removed, the row no longer says where grounding goes and carries no pointer to the new rule (b) some 170 lines above.

N4 (nit) — rule (a)'s example names aggregate_records, the MCP-door name; the in-app ask assistant serves aggregate_data and drops a door-only name with a diagnostic. The PR body knows this and case 15 accepts either; the skill sentence itself teaches one spelling only.

N5 (nit) — the ratchet row keeps the trailing comment "-18 (was 6824), then -5 A2′ (was 6806)", which describes two earlier moves and now sits beside 7109.

Summary: the skill text and the ratchet raise hold against the code and the ruling; the eval case that accepts them does not hold against its own expected output, and its runs were skipped on a reason the tree contradicts. M1 and S1 are fixed in the eval file and by a run; a fix to case 15 moves the head, so a delta record on the new head closes them by id.

Implemented-by: claude/area-o1C-37976
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: FAIL

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

L1 verdict (L1-a): REWORK at head d16dc4b0a4d2a156db0d6923787ff03c6da37d59 (Fixes #37976).

Review summary

The three taught rules hold against the tree. Every named argument, field type and tool name exists exactly as taught: content, sourceIds, search_knowledge, aggregate_records, source.kind: 'object' and textarea. The ratchet raise is right: 28461 bytes, 28434 once the stamp line is excluded, ceil(28434 / 4) = 7109, +203 under ruling 6513306068 letter B. The pay-down is enough under that letter. Contract record 7238743015 is FAIL at this head, with its tier verified and Security-touching: yes.

Owed before landing:

  1. M1 of 7238743015: case 15 refuses its own correct answer. I read the case at this head. Its must_not_contain lists 'priority'] and 'amount'], and the grader matches literal substrings. So metadataFields: ['status', 'priority'], which the expected_output allows, and groupBy: ['priority'], the canonical count call, both fail. kind: 'file' and kind: 'http' also fail an answer that quotes the skill to say those kinds are retired. Narrow the assertions to the wrong shapes only, such as a content list that carries those fields.
  2. S1 of 7238743015: the case 15 runs are owed before the Tier H hand-off. The runner is in the tree: packages/qa/scenarios/src/skill-evals/cli.ts, script skill-evals, --case objectstack-ai/skills-tools-knowledge#15. Comment 7232993751 on skills/objectstack-ai and the MCP authoring contract teach knowledge_source as metadata: name, an explicit content list, no wildcard, the retired keys, and a create seed #37310 ran cases 13 and 14 in this environment today, so "no eval runner reachable" does not hold. Run with-skill and no-skill after M1's fix, and put the results in the dev report and the body.

With the same push (nits N1 to N5):

  • N1: "short names stay out" sits below an example that lists title.
  • N2: "never ids or system fields" is lost from the content row.
  • N3: the instructions pointer is lost from the agent.knowledge row.
  • N4: rule (a) names only the MCP spelling aggregate_records.
  • N5: a stale trailing comment on the ratchet row.

Ordering with #38224. Both PRs move the objectstack-ai row from 6906. Whichever lands second conflicts on that line and re-measures. With both landed, the row is 7161 at 28671 bytes. That is a head move and earns a fresh record.

Next: the fix earns a delta contract review and a delta L1. After that it goes to seat 1 (Tier H, skills/**).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · 742647d · 2026-11-28T12:32Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 742647d8f0bdaf84df35bd2edfd8897b95adcb53
Local-runs: none
Scope: skills/objectstack-ai/SKILL.md, skills/objectstack-ai/evals/skills-tools-knowledge.json + scripts/check-skills-token-ratchet.mjs
Security-touching: yes

Delta record on PR #38292 (card #37976). It follows record 7238743015 and judges the two author commits above d16dc4b0a4 (c71105cb5b, then 742647d8f0), with the net diff against merge base f19350b410df08db604881848b2c370047a114f2 re-read where the delta touches it. Read: dev report 7239258428, the PR body as now written, the delta diff, the head tree through git show, and the head's check-runs. Nothing built, run or re-run. Remainder of the diff, the lane seat's ACCEPT at TIER_DEFAULT: .changeset/37976-skill-knowledge-sources-beyond-documents.md (its note now follows the reviewed skill text).

Security-touching stays yes: the agent.knowledge row is again a changed hunk, and it teaches where retrieval is restricted (aiExposed, source.where) and that sourceIds is named in instructions and scopes nothing by itself. The teaching is correct against packages/services/service-knowledge/src/knowledge-tools.ts.

M1: closed

S1: closed

N1: closed

N2: closed

N3: closed

N4: closed

N5: closed

① Derived judgments

  • Accept-set: unchanged from record 7238743015. The delta holds skill prose, one eval assertion list, one ratchet row with its note, and the changeset note. No schema, validator, tool or runtime file. Right.
  • Public surface: the objectstack-ai skill block is reworded in rules (a) and (c), the content row regains "Never ids or system fields", and the agent.knowledge row gains a pointer. Right, and declared in the changeset.
  • Gate surface: the ratchet row is now 6906 to 7148 (was 6906 to 7109 on the earlier head). Judged in ④.
  • Check-runs on this head when read: 47 runs. Concluded success or skipped by design: every Type Check lane, including Type Check · source gates (it runs check-skills-token-ratchet.mjs and its self-test) and Type Check · consumer gates (it runs pnpm --filter @objectstack/spec run check:skill-examples, the gate the dev could not measure locally, so CI has answered it green on this head); Lint · repo and tooling gates; Lint · docs and code guards; Lint · ESLint; Lint · CI, release and engine gates; Lint · scoped · tooling self-tests; Lint · scoped · query-options erasure; PR-body guards; Governed Surface Queue Guard; Check PR Size; Build Core; one Check Changeset run. Not concluded: Test Core (1/12), (2/12), (3/12); a second Check Changeset run; Lint · PM dispatch-gates; Lint · scoped · slot lookup and corpus. None is red. The adopting seat reads those six before the hand-off.

② Semver level

@objectstack/skills patch, unchanged, and still right: prose and a fixture, no accept-set change.

Clause-②: no — agreed.

③ Boundary flags

  • open_questions: empty.
  • Dev flag, check:skill-examples NOT MEASURED on the new head: answered by Type Check · consumer gates, success on this head. The delta also changes no marked code block.
  • Dev flag, the rest of the dispatch-gates --commands list not re-run on the new head: left to CI; no concluded run is red, six are open (listed above).
  • Deviation, the eval runner's dependency dist/ borrowed from sibling worktrees with byte-identical sources: accepted, the same setup comment 7232993751 used.
  • Deviation, the first report's "no eval runner reachable" withdrawn by the dev as wrong: noted, it agrees with S1.
  • Deviation, case 15's two residual gaps: judged in ④, N6.
  • SQL push-down: not applicable; no query, id materialisation or join in the diff.
  • Ordering with PR docs(skills): objectstack-ai names the save refusal of a knowledge_source whose adapter is not mounted #38224 (still open, head f2f00af325, not merged; main has not touched the file or the row since the merge base): it moves the same row 6906 to 6958 on a file 210 bytes longer. Both PRs rewrite the same row line and the note above it, so the second to land conflicts, merges main and re-measures. With both landed the file is 27648 + 210 + 969 = 28827 bytes, priced 28800, and the row is ceil(28800 / 4) = 7200; neither 6958 nor 7148 is then right and the note's arithmetic is rewritten against the new base. That edit is in the ratchet script, so it moves the head and this record no longer covers it: the second PR needs a fresh record on its merged head.

④ Design judgment

No must-fix, no should-fix.

M1, case 15's assertions. The must_not_contain list now reads: kind: 'file', and kind: 'http', in both quote styles (the trailing comma places them inside a source literal), contentFields:, a content: list that opens with priority, status, amount or contract_pdf, and any of those four directly after 'description'. Tried against the answer expected_output describes: content: ['title', 'body'], content: ['subject', 'description'], metadataFields: ['status', 'priority'] in either order with or without amount, groupBy: ['priority'] on the record tool, and prose that quotes the skill's source.kind: 'file' / 'http' to say the kinds are retired. None carries a forbidden token. must_contain (sourceIds, content:, textarea) and the any-of group (aggregate_records, query_records, aggregate_data) are all taught by the skill at this head. The class the earlier record named, a correct answer refused, is gone for the answer the case describes. The dev's two stated gaps are judged as N6.

S1, the runs. git diff --stat c71105cb5b 742647d8f0 -- skills/ is empty: the skill text and case 15 that were run are byte-identical to this head (the last commit touches the changeset note alone). The dev report and the PR body give, for skill-evals --case objectstack-ai/skills-tools-knowledge#15: with-skill 1/1 (no missed and no forbidden token; it wrote content: ['subject', 'description'] with metadataFields: ['priority', 'status'], sent the count to aggregate_data, and put the PDF text through a textarea field), no-skill 0/1 (it missed sourceIds, content: and every record tool, and invented a fileField extraction key). The case discriminates, and the with-skill answer used exactly the metadataFields shape the earlier assertions would have refused, so the fix is exercised. This is the evidence 7232993751 gave for cases 13 and 14, and it is enough to close S1. Its limits, stated: one repetition per arm, and the raw records sit in the seat's scratchpad, not on GitHub; I did not read them, so the scores rest on the dev report's account.

N1 to N5, read in the head tree.

  • N1: rule (a) now reads "with its title or subject line" and "the names of people or accounts stay out". It agrees with the supportKb example and with case 15's expected_output.
  • N2: the content row carries "Never ids or system fields" again, and rule (c) no longer restates that no source reads a file.
  • N3: the agent.knowledge row ends "name the sourceIds to pass in instructions (§ Knowledge Sources)".
  • N4: rule (a) names aggregate_records and, for the in-app ask assistant, aggregate_data; both are real names (MCP_DOOR_TOOL_NAMES and the service-ai list in packages/spec/src/system/constants/platform-tool-names.ts).
  • N5: the row's stale trailing comment is gone.

The ratchet row, 6906 to 7148.

  • Arithmetic, from the blobs: base file 27648 bytes, head file 28617 bytes, stamp line 27 bytes; priced 27621 and 28590; ceil(28590 / 4) = 7148; the row moves +242, headroom 0. The row note and the PR body carry the same figures. The gate that reads the row concluded success on this head.
  • Does letter B of ruling record 6513306068 still admit the raise? Yes. Its conditions are a deletion of restatement shown in the same file, the ruling quoted in the PR body, and the row pinned at the measurement. The net diff still shows one: the content row's "Meaningful text only" (the row line is 22 bytes shorter than on main), which rule (a) now says. The quote and the record id are in the body and in the note, and the row is pinned with headroom 0. The letter sets no ratio. The 39 tokens added since the earlier head are the clause and pointer record 7238743015 asked back (N2, N3) and the second tool spelling (N4), not new scope. The pay-down is now thin, about 6 tokens against 248 gross; that is recorded as N7, not as a bar.

N6 (nit) — case 15's residual gaps, both stated by the dev. (i) A short field in the middle of a content list (content: ['subject', 'priority', 'description']) or in double quotes is not caught: a missed wrong answer, never a refused right one. (ii) 'description', 'priority' and its three siblings match in any list, so an answer that also shows a query_records field projection in the prompt's own order (fields: ['subject', 'description', 'priority']) would be refused. That call is not part of the answer expected_output describes, and the with-skill run did not produce it. Accepted deviation on this head; anchor those four to content: in a follow-up if a later round shows a false fail.

N7 (nit) — the row note lists three items under "PAID DOWN FIRST", but against main only the first is a deletion (the content row, 22 bytes shorter). The agent.knowledge row is 24 bytes longer and the retired-kinds line 9 bytes longer: both are replacements by a pointer that grew. The note and the PR body say "now a pointer", so nothing is hidden; the heading overstates. The note sits in the ratchet script, so a rewording moves the head: accepted deviation, to be corrected when the row is next re-measured (the #38224 ordering forces that on whichever PR lands second).

Summary: both graded findings of record 7238743015 are closed on this head, the five earlier nits are fixed, the arithmetic agrees with the tree, and letter B admits the raise. Two nits remain, both accepted as they stand. Six check-runs were still open when read.

Implemented-by: claude/area-o1C-37976
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

L1 verdict (L1-a): ACCEPT (delta) at head 742647d8f0bdaf84df35bd2edfd8897b95adcb53 (Fixes #37976). This follows REWORK 7238750028 at d16dc4b0a4.

Review summary

  • M1 closed. Case 15's must_not_contain names wrong shapes only. The answer the expected_output describes now passes: metadataFields: ['status', 'priority'] in either order, groupBy: ['priority'], and prose that quotes source.kind: 'file' as retired. One residual over-refusal is accepted as nit N6: a query_records projection in the prompt's field order, which is not part of the expected answer.
  • S1 closed. Case 15 ran through skill-evals on c71105cb5b. The skills tree is identical at this head (git diff --stat c71105cb5b 742647d8f0 -- skills/ is empty). With-skill scored 1/1 and no-skill 0/1. There was one repetition per arm, and the scores rest on the dev report 7239258428.
  • N1 to N5 closed, each present in the tree.
  • Ratchet. The file is 28617 bytes, 28590 once the stamp line is excluded, so ceil(28590 / 4) = 7148, +242 against 6906 under ruling 6513306068 letter B. One deletion against main remains as the pay-down, which is thin but admitted. Nit N7: the row note files two grown replacements under "PAID DOWN FIRST". It is left for the next re-measure.
  • The records. Delta contract record 7239386538 is PASS at this head with its tier verified, Security-touching: yes, and nothing graded open.
  • Ordering with docs(skills): objectstack-ai names the save refusal of a knowledge_source whose adapter is not mounted #38224. Both are still open on the same row. The second to land conflicts and re-measures; with both landed the row is 7200. That is a head move and needs a fresh record.
  • Gates. At this head the check-runs read 28 success, 18 skipped, 0 failed and 2 in progress. check:skill-examples (Type Check · consumer gates) and the ratchet (Type Check · source gates) are green. This ACCEPT is on the code. Landing waits for all-green at this head.

Next: Tier H (skills/**). It goes to seat 1 for the human merge or an authorized approval, and then the landing.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs

Seat record · 2026-11-28T12:51Z · PR #38292 (Fixes #37976) · head 742647d8f0bdaf84df35bd2edfd8897b95adcb53 · governed skills/** — Tier H

维护者速读

  • 做什么:给 AI 编程助手看的技能文档(objectstack-ai)「知识源」一节,原来只教按制度库配置;现在加了三条针对普通业务对象的规则,各带一个例子。一是只索引长文本,数字、状态、人名交给记录查询;二是一类语料一个知识源,检索时点名;三是附件文字先写进文本字段。另加一条评测用例:有技能 1/1,无技能 0/1。
  • 风险:4 个文件 +66/−4,只改技能文档、一条评测和一个 changeset,运行行为不变。技能文档的字节上限按既有裁定(6513306068 B,「先削重复,余额按实测提高」)从 6906 调到实测的 7148(+242)。
  • 为什么要你看:其中一行讲到检索的限制范围(aiExposed、source.where,点名 sourceIds 本身不限制任何东西),契约审核判为涉及安全,已加 security 标签。
  • 要你做什么:审批人批准即可。契约审核 PASS 7239386538,Head-sha 742647d8f0bdaf84df35bd2edfd8897b95adcb53;批准后座位自主落地。

Seat opinion: land.

席位核对 — ACCEPT · repo:objectstack#1 · head 742647d8f0

  1. Shape. Draft, base main, 4 files (+66/−4): skills/objectstack-ai/SKILL.md (+19/−3), skills/objectstack-ai/evals/skills-tools-knowledge.json (+11, case 15), scripts/check-skills-token-ratchet.mjs (+20/−1, the objectstack-ai row and its note), and .changeset/37976-skill-knowledge-sources-beyond-documents.md. Body: Fixes #37976, Clause-②: no, Metadata-protocol: none. Governed skills/** ⇒ Tier H.
  2. Premise measured. The "Sources over business objects" block teaches (a) long free text only, (b) one source per corpus named through sourceIds in a skill's instructions, and (c) attachment text through a text field. Duplicates were cut first: the source.content row's "Meaningful text only", the agent.knowledge pitfall's grounding clause (now a pointer), and the retired-kinds line's form clause. Ratchet: 28590 bytes without the stamp line, so ceil(28590 / 4) = 7148, +242 against 6906 under ruling record 6513306068, letter B. Eval case 15 scored 1/1 with the skill and 0/1 without. The contract record reads Security-touching: yes, and its teaching matches service-knowledge's knowledge-tools.ts.
  3. Gates (check-runs at this head). 31 success, 18 skipped, 0 failed. mergeable clean. landing-k K = 0, and no shared book moved under this PR.
  4. Accepted deviations. L1 nit N7 is a follow-up. L1 calls the single remaining pay-down deletion "thin but admitted".
  5. Out of scope → where it went. docs(skills): objectstack-ai names the save refusal of a knowledge_source whose adapter is not mounted #38224 shares the same ratchet row and is held out of the queue. It lands after this PR, with a main merge, a re-measure and fresh records. security is added by the seat (AGENTS.md: the seat labels unnamed security teaching). The knowledge-retrieval area is not bound by the p1-only line (maintainer, 2026-11-28 「知识检索不限制」).
  6. Landing terms. L1-a ACCEPT (delta) 7239399754, after REWORK 7238750028, + contract review PASS 7239386538 (CONTRACT_REVIEW_TIER, same head) ⇒ ②③ in one --handoff stroke. After an authorised APPROVED, seat 1 lands it (maintainer's seat-thread line 2026-11-26T13:33Z 「审批人批准后的 Tier H PR 你可以自主落地」). A head move other than a clean main merge withdraws the hand-off.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs

Approval request · governed skills/** (Tier H) · PR #38292 (Fixes #37976) · head 742647d8f0bdaf84df35bd2edfd8897b95adcb53

@os-zhuang: skills/objectstack-ai/SKILL.md gains "Sources over business objects": long free text only, one source per corpus named through sourceIds, and attachment text through a text field. It has one new eval case (with-skill 1/1, no-skill 0/1). The ratchet row moves 6906 → 7148 (+242, measured) under ruling 6513306068 B after a duplicate pay-down. The record reads Security-touching: yes, and the PR carries security. Records on this head:

  • L1-a ACCEPT (delta) 7239399754
  • contract review PASS 7239386538 (CONTRACT_REVIEW_TIER)
  • seat record ACCEPT above

Every check is green or expected-skip. An APPROVED review on this head lets seat repo:objectstack#1 ready and land it; nothing else is asked.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 28, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs

Landing · 2026-11-28T12:56Z · PR #38292 · head 742647d8f0 · Tier H

An authorised APPROVED review from os-zhuang is on this head (review 6097871806). The seat record ACCEPT (7239525394), L1-a ACCEPT (delta) 7239399754 and contract review PASS 7239386538 stand at the same head. Every check is green or expected-skip, and landing-k read K = 0. Seat 1 readies it and arms the merge under the maintainer's seat-thread line 2026-11-26T13:33Z 「审批人批准后的 Tier H PR 你可以自主落地」.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 28, 2026 12:57
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit ed4ec27 Nov 28, 2026
59 of 60 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/area-o1C-37976 branch November 28, 2026 13:24
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 28, 2026
os-elon-musk pushed a commit that referenced this pull request Nov 28, 2026
Resolve the objectstack-ai ratchet row against main's 7148 (PR #38292):
re-measured on the merged tree, 28827 bytes, priced 28800, ceil = 7200;
this PR's +52 rides the same ruling (record 6513306068, letter B).

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation security size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants