Repository navigation
docs(skills): objectstack-ai teaches knowledge sources over business objects - #38292
Conversation
…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>
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · d16dc4b · 2026-11-28T11:38Z |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract reviewServed-tier: PR #38292 (card #37976), net diff against merge base Security-touching reads ① Derived judgments
② Semver level
Clause-②: no — agreed. ③ Boundary flags
④ Design judgment
The grader is mechanical ( M1 (must-fix) — case 15's 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: N1 (nit) — rule (a) says "short names stay out" two paragraphs below an example whose N2 (nit) — pay-down residue. The N3 (nit) — the N4 (nit) — rule (a)'s example names 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: VERDICT: FAIL |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): REWORK at head Review summaryThe three taught rules hold against the tree. Every named argument, field type and tool name exists exactly as taught: Owed before landing:
With the same push (nits N1 to N5):
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, |
…s; re-measure the row Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · 742647d · 2026-11-28T12:32Z |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract reviewServed-tier: Delta record on PR #38292 (card #37976). It follows record 7238743015 and judges the two author commits above Security-touching stays M1: closed S1: closed N1: closed N2: closed N3: closed N4: closed N5: closed ① Derived judgments
② Semver level
Clause-②: no — agreed. ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. M1, case 15's assertions. The S1, the runs. N1 to N5, read in the head tree.
The ratchet row, 6906 to 7148.
N6 (nit) — case 15's residual gaps, both stated by the dev. (i) A short field in the middle of a N7 (nit) — the row note lists three items under "PAID DOWN FIRST", but against 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: VERDICT: PASS |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): ACCEPT (delta) at head Review summary
Next: Tier H ( |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs Seat record · 2026-11-28T12:51Z · PR #38292 (Fixes #37976) · head 维护者速读
Seat opinion: land. 席位核对 — ACCEPT · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs Approval request · governed @os-zhuang:
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. |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs Landing · 2026-11-28T12:56Z · PR #38292 · head 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 |
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
…urce whose adapter is not mounted (objectstack-ai#38224) Fixes objectstack-ai#38158 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:给 AI 编程助手看的知识源技能文档里,「存储」那一行多了一句:保存时指定了本部署没挂载的存储会被当场拒绝,以及两种修法;升级说明里「不写存储」那句补上了限定条件。运行行为不变。 - 为什么做:属于「知识检索」这条线的收尾,替写知识源的作者和 AI 助手解决「照文档写却被拒绝」的问题。 - 出错会怎样:只是文档措辞和测试,最坏是这句话写得不准;可以直接撤回,不影响任何已保存的数据。 - 要你做的:这个改动碰了对外发布的技能文档,需要按规定的审核流程放行落地。 ## What changes 1. `skills/objectstack-ai/SKILL.md` § Knowledge Sources, the `adapter` row. It named the refusal of an omitted adapter only. It now also says that a run-time save naming an adapter the deployment does not mount is refused (`400 VALIDATION_ERROR`, nothing written), naming the source, the adapter and the mounted ones, with the two remedies that always hold: name a mounted one, or mount the store and save again. Worded from `unmountedAdapterSaveText` in `packages/services/service-knowledge/src/knowledge-service.ts`. 2. Pins, no behaviour change: - `knowledge-source-admission.test.ts`: the "leave `adapter` out" remedy is offered with one adapter mounted and with the deployment's adapter mounted; it is withheld with two mounted and none marked, with a deployment adapter that is not itself mounted, and with none mounted. A control asserts what the clause promises: the omitted adapter is admitted where the remedy is offered and refused where it is withheld. - `packages-knowledge-source-gate.test.ts`: the package-duplicate door answers this refusal `400` with `error.code` `VALIDATION_ERROR` and the save's own sentence, and copies nothing. 3. Migration entry `knowledge-source-unmounted-adapter-refused-at-save`: its `replacement` now qualifies "no `adapter` at all": on a host that mounts several adapters and marks none the deployment's, a source with no `adapter` is itself refused, so name one there. 4. `scripts/check-skills-token-ratchet.mjs`: the `skills/objectstack-ai/SKILL.md` row moves 7148 to 7200, pinned at the measurement taken on this head, which carries `main` 333e6f3 (with PR objectstack-ai#38292, which moved the same row 6906 to 7148). 5. Changeset: `@objectstack/skills` patch and `@objectstack/spec` patch (the entry's text ships in the upgrade guide). The two test files publish nothing, so `@objectstack/service-knowledge` and `@objectstack/runtime` take none. ### Skill size readings Raise path: the standing ruling 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). Paid down first, in the same file: the row's "Optional" (its "Omitted:" clause already says the key may be left out). | Reading | Before (`main` 333e6f3) | After (head e3e2fab) | |:---|---:|---:| | `skills/objectstack-ai/SKILL.md`, lines | 505 | 505 | | `skills/objectstack-ai/SKILL.md`, bytes | 28617 | 28827 | | `skills/objectstack-ai/SKILL.md`, tokens (priced bytes, stamp line excluded: 28590 to 28800) | 7148 | 7200 | | All `skills/*/SKILL.md`, lines | 4956 | 4956 | | Ratcheted bundle, tokens | 200068 | 200120 | The row moves +52, the measured remainder only: `ceil(28800 / 4) = 7200`. The merge of `main` 333e6f3 conflicted on this row only; it was resolved by keeping `main`'s 7148 note and adding this PR's note above the re-measured row. ## Why PR objectstack-ai#38060 added the save refusal and the migration entry. Its contract review left three follow-ups: the published skill did not teach the refusal, the remedy branches of the refusal text and the duplicate door's answer had no pin, and the entry's `replacement` offered a remedy that is itself refused on one kind of host. ## Tests Read first, by risk: 1. `skills/objectstack-ai/SKILL.md`, the `adapter` row: published text; check it against `unmountedAdapterSaveText`. 2. `packages/spec/src/migrations/entries/semantic/19.knowledge-source-unmounted-adapter-refused-at-save.ts`, `replacement`: shipped upgrade-guide text. 3. `scripts/check-skills-token-ratchet.mjs`, the new note above the row: the arithmetic. Two-minute check: `pnpm --filter @objectstack/service-knowledge exec vitest run src/__tests__/knowledge-source-admission.test.ts -t 'offers leaving'` prints 1 passed. The two edited test files, `check-skills-token-ratchet` (gate and self-test) and `check:skill-docs` were re-run on head `92cc3cd391` (the first head, the row re-pin, and merges of `main` up to bd5407e). Heads `f75d35a017` and `f2f00af325` add clean merges of `main` (98bd8de, which lowers the `objectstack-ui` row, then f19350b), and head `e3e2fab53f` merges `main` 333e6f3 with the one ratchet-row conflict resolved as above. The second carries objectstack-ai#38208 (898b056), which edits `packages/runtime/src/domains/packages-knowledge-source-gate.test.ts` (also edited here, in other hunks; git merged them without a hand) and `packages/runtime/src/domains/packages.ts` and `packages/metadata-core/src/knowledge-source-save-admission.ts`, which this PR's duplicate-door pin exercises. On `f2f00af325` and `e3e2fab53f` only the ratchet gate and its self-test were re-run locally (exit 0); the edited tests on the merged tree are read from this head's `Test Core`. The ablation, the 121-family gate list and the package-wide runs below were read on the first head `d9c88726c4`, before those merges. <details><summary>Edited test files</summary> ``` pnpm --filter @objectstack/service-knowledge exec vitest run --maxWorkers=2 src/__tests__/knowledge-source-admission.test.ts Test Files 1 passed (1) Tests 89 passed (89) pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/packages-knowledge-source-gate.test.ts Test Files 1 passed (1) Tests 75 passed (75) os-verify-lock: VERDICT command-exit 0 ``` </details> <details><summary>Ablation: the pins go red when the branch or the mapping is reverted</summary> Each mutation was applied with `scripts/ablation-replace.mjs` (anchor hit once, restore verified as blob equal to HEAD and an empty `git diff HEAD`). Both subjects are imported from `src`, so no `dist` leg applies. | Mutation | Result | |:---|:---| | `placeable = true` (always offer the remedy) | 1 failed: expected the message not to contain "leave `adapter` out" | | `placeable = false` (never offer it) | 1 failed: expected the message to contain "leave `adapter` out" | | `placeable = deployment !== undefined OR mounted.length === 1` (drop the "deployment's adapter is mounted" test) | 1 failed: expected the message not to contain "leave `adapter` out" | | `packages.ts`: the duplicate door answers a fixed `403` in place of `refused.status` | 1 failed: expected 403 to be 400 | </details> ## Acceptance notes - The skill row omits the third remedy the runtime may print ("leave `adapter` out"): it is conditional, and the row's own "Omitted:" clause already states where an omitted adapter is placed and where it is refused. - The duplicate door passes the refusal's status and sentence; the `VALIDATION_ERROR` code on its answer is derived from the `400`, not copied from the refusal's own `code`. The two agree for every refusal the predicate answers today. Noted, not filed. ## Verification - Derived gate list (`node scripts/pm/dispatch-gates.mjs --commands`, 121 families) run on `d9c88726c4`: 119 exit 0. Among them `check-skills-token-ratchet` ("61 authored bundle file(s) within their ceilings"), `check:skill-docs`, `check:skill-refs`, `check:skill-links`, `check:skill-identifier-liveness`, `check:spec-changes`, `check:upgrade-guide`, `check:doc-authoring`, `check:nul-bytes`, `check:cross-package-test-inputs`. - NOT MEASURED locally, both a missing prerequisite and not a red: `check:dual-build-cjs-loads` (exit 3, "PREREQUISITE NOT MET", it needs every package built) and the CLI file `test/migrate-meta-engine-guidance.test.ts` (its global setup could not load the unbuilt CLI closure). CI reads both. - Under the verify lock on `d9c88726c4`, `VERDICT command-exit 0`: `pnpm --filter @objectstack/service-knowledge test` (Test Files 19 passed, Tests 683 passed), `typecheck` of `@objectstack/service-knowledge`, `@objectstack/runtime` and `@objectstack/spec`, and the spec migration suites (`vitest run src/migrations`: Test Files 5 passed, Tests 207 passed). - Declared narrowing: the runtime and spec packages ran the files this diff touches or feeds, not their whole suites; `test:repo` was not run. CI's `Test Core` carries those. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` is CI's reading. - [x] 4. One issue, one branch off an up-to-date `main`, one pull request. - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: `check:generated` families ran green; nothing to regenerate. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. --- _Generated by [Claude Code](https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP)_ <!-- signed: repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Fixes #37976
repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
skills/objectstack-ai/SKILL.md, section "Knowledge Sources (RAG)": one new block, "Sources over business objects", placed after thesupportKbexample and before "Splitting". Three rules, one example each:contentlists prose (an article body, a ticket'sdescription, 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?" issearch_knowledge; "how many tickets are open per priority?" isaggregate_records(in-appask:aggregate_data).instructionssay which to pass insourceIds, the argument of the onesearch_knowledgetool. Example:search_knowledge({ query, sourceIds: ['ticket_bodies'] }). Omitted, every exposed source is scanned. No second shape is taught.filefield incontentadds no file text (thefileandhttpkinds are retired). Example: write the extracted text to atextareafield,contract.attachment_text, and list that field.source.contentrow's "Meaningful text only" (rule (a) says it); the row keeps "Never ids or system fields";agent.knowledgepitfall row's "describe intended grounding ininstructions" is now a pointer to rule (b): "name thesourceIdsto pass ininstructions(§ Knowledge Sources)";scripts/check-skills-token-ratchet.mjs: theskills/objectstack-ai/SKILL.mdrow 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/skillspatch.Lines of the
adapterrow 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 mergesmainand re-measures.Review round (second commit, c71105c)
must_not_containnow names wrong shapes only:kind: 'file',andkind: 'http',inside a literal (both quote styles),contentFields:, acontent:list that starts withpriority,status,amountorcontract_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: acontentlist that carries a short field in another position is not caught, and a non-contentlist that putsprioritydirectly afterdescriptionwould be refused.contentrow; rule (c) no longer restates that no source reads a file.agent.knowledgerow points toinstructionsand the section again.aggregate_recordsandaggregate_data.Token ratchet arithmetic
Priced bytes are file bytes minus the 27-byte release-stamp line; tokens are
ceil(priced bytes / 4).mainf19350b)skills/objectstack-ai/SKILL.md, linesskills/objectstack-ai/SKILL.md, bytesskills/*/SKILL.md, linesskills/*/SKILL.md, bytesRow 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/distis 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.dispatch-gates --commandslist 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 modelclaude-opus-5-5, Claude Code 2.1.332, OAuth login, runner defaults.sourceIds,content:, and none ofaggregate_records/query_records/aggregate_dataScore: with-skill 1/1, no-skill 0/1.
filefield in a knowledge source adds no text from the file, so a hook, flow or import has to extract the PDF's text into atextareafield first, and the source indexes that field." It writescontent: ['subject', 'description']withmetadataFields: ['priority', 'status'], tells the skill "Always pass sourceIds; never search all sources at once", and sends the count toaggregate_data. That answer carriesmetadataFields: ['priority', 'status'], which the first version of the case would have refused.source,chunking,metadata, …) as illustrative". It inventsfields:,fileField: 'contract_pdf'with anextractionblock, and acount_open_tickets_by_prioritytool file; it names nosourceIds.dist/. The verify lock was busy, so the builtdist/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 --quietper package, clean status); the seventeenth,refd-timer-testkit, is source-only. The skill text and the case came from this head.issue-37976/eval-15(round.json,summary.md,runs/with one JSON per arm).Acceptance notes
mainf19350b before writing:sourceIdsis an argument ofsearch_knowledge(packages/services/service-knowledge/src/knowledge-tools.ts, its input keys);source.kindhas the one armobject(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 incontentis indexed as its digits and afilefield contributes no file text.aggregate_recordsis registered only where the data bridge implementsaggregate; the in-app assistant servesaggregate_data. Rule (a) names both.Verification
Read first, by risk:
skills/objectstack-ai/evals/skills-tools-knowledge.json, case 15'smust_not_contain: the risk is a token that refuses a correct answer.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.scripts/check-skills-token-ratchet.mjs, the row note and the value 7148.Two-minute check:
node scripts/check-skills-token-ratchet.mjsand read its first line. Expected: "skills/objectstack-ai/SKILL.md is 7148 tokens (ceiling 7148; headroom 0)".Human Minimum
packages/specholds no runtime logic. (No schema touched.)pnpm lintis left to CI.main, one pull request.packages/specnot touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code