Repository navigation
docs(adr): ADR-0160 — record-scoped AI inquiry: the ai_context type, get_record_context, conversation focus, ask_ai, skill context, citation shape - #37115
Conversation
…_record_context, focus, ask_ai, skill context, citation shape Proposed. Admits the `ai_context` metadata kind and its six v1 keys, fixes the render contract (read as the caller, withheld fields named, unreadable rows absent, long bodies as an outline, one data-not-instructions wrapper), declares `get_record_context` once in spec for every transport with a read set an interceptor can derive, restates the `ToolExecutionContext.focus` contract the sibling conversation-focus card fixes, adds the `ask_ai` action type, the skill `context` key and the citation shape. Builds on cloud ADR-0119. Field egress is not decided here. docs/adr/README.md regenerated by `pnpm adr:index`. Clause-②: no Metadata-protocol: none Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbZSA7o5vcLjQjM1myV
|
repo:cloud#1 · os-warren · session_01JQwxbZSA7o5vcLjQjM1myV The brief this card thread handed its isolated contract-review subagent for head Contract review brief — PR #37115 @
|
|
repo:cloud#1 · os-warren · session_01JQwxbZSA7o5vcLjQjM1myV Contract reviewServed-tier: Read for this record: card #36997 (body and its three comments: two triage posts and the claim), PR #37115 (body, the two-file list, the net diff ① Derived judgments
② Semver level
③ Boundary flagsThe PR declares no
④ Design judgment
What I tried to break and could not: no read leaves the caller's context (D3 forbids a system context and a driver read, and D4 seam 1 forbids a direct call of the render service); the related list is read as the caller, so no id, count or Findings:
Generated by Implemented-by: VERDICT: FAIL |
Answers M1 and S1–S3 of the review record on fa8cdc9: a field the caller's schema hides is stated without being named (point 10, read beside ADR-0106 D1); the root object's gates run before pack selection and no answer names what the caller is not served (point 12); a hidden field the pack uses structurally drops its part instead of refusing the pack (point 11); the envelope has three parts (data, notes, framing sentence), values as served. Nits N1–N6 applied (N5 half declined: record ids have no grammar to refuse against). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbZSA7o5vcLjQjM1myV
|
repo:cloud#1 · os-warren · session_01JQwxbZSA7o5vcLjQjM1myV Contract reviewServed-tier: Delta round on the record of ① Derived judgments
② Semver levelUnchanged from round one and still right: ③ Boundary flags
④ Design judgment
Round one's graded findings: M1: closed
What I tried to break in the new text and could not: the non-naming statement cannot be turned by record data; a New findings:
Not in the delta; still consistent with the record. No finding. Implemented-by: VERDICT: PASS |
Answers S4 of the review record on 81bd066: every related child is judged at object level before projection, so a child the caller may not read refuses the pack (point 2) instead of dropping its section; lookup targets keep the record tools' order (field on the served definition first, then the target's guard). Nits N7–N9: the narrowing statement is the security service's sentence relayed through a probe taken as a dependency on both doors; the advisory skill.tools[] report is expected until row 9; one refusal for any anchor that does not resolve. Points 1, 2 and 10 are named as the maintainer's. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbZSA7o5vcLjQjM1myV
|
repo:cloud#1 · os-warren · session_01JQwxbZSA7o5vcLjQjM1myV Contract reviewServed-tier: Third round, a delta on the record of ① Derived judgments
② Semver levelUnchanged and still right: ③ Boundary flags
④ Design judgment
Graded findings of the earlier rounds: M1: closed
What I tried to break in the changed text and could not: a No must-fix, no should-fix.
Not in the delta; still consistent with the record. No finding. Implemented-by: VERDICT: PASS |
|
repo:cloud#1 · os-warren · session_01JQwxbZSA7o5vcLjQjM1myV 维护者速读
席位意见:ACCEPT。设计与专题六条裁决、cloud ADR-0119 一致;第 10 点是把专题裁决 2 与 ADR-0106 合起来读的落法,属维护者裁量,已在文中和速读里单独交给你。 席位核对 — ACCEPT · repo:cloud#1 · head
|
|
repo:cloud#1 · os-warren · session_01JQwxbZSA7o5vcLjQjM1myV Ready for the maintainer: ADR-0160, Tier H (
|
Resolve the docs/adr/README.md conflict with ADR-0160 (#37115) by regenerating the index with `pnpm adr:index`; no hand merge. Claude-Session: https://claude.ai/code/session_01QSeKYpRrYuqSLCvbSk9zrL Co-authored-by: Claude <noreply@anthropic.com>
…ce becomes a governed metadata type (objectstack-ai#37119) Fixes objectstack-ai#37001 Clause-②: no Metadata-protocol: none This PR is one decision record and its index row. It changes no file outside `docs/adr/`, and no schema, contract member or behaviour. Sequencing: draft PR objectstack-ai#37115 holds record number 0160 and also regenerates `docs/adr/README.md`, so the two pull requests conflict on that one generated file and on nothing else. Whichever of the two lands second merges `main` and re-runs `pnpm adr:index`. This record takes 0161. ## 维护者速读 - 用户能看到什么变化:用户无感。这是一份决定记录:平台自己负责把记录组成文档、保持索引与数据一致、按结构切分、按记录返回结果;向量化调用、混合检索、重排、文件解析仍交给外接的检索后端;「知识源」变成随应用发布、可在界面里配置的受管配置。 - 为什么做:属于「知识检索平台化」专题的第一阶段,给后面每一项开发定下边界和接口形状,也让制度问询这类应用不必再自己写向量代码。 - 出错会怎样:只是一份文档,合并后不改任何行为;写错的地方会带偏后续的开发任务,可以再改这份记录,也可以直接撤回这次合并。 - 要你做什么:对下面 3 个问题逐个表态(认可草稿的写法,或划掉),再批准并手工合并;合并即认可文中另外两处由记录自己定下的写法(知识源可不写检索后端;接口清单第 8 项多定的 indexStatus / beginBuild / completeBuild / recipe hash)。契约审核 PASS:记录 7145632759,Head-sha `4fa0cdc5710d645580d23a914f4d55e67ed3a5a4`。 ## What changes - New record `docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md`, Status **Proposed**, with a `## Provenance` section naming objectstack-ai/cloud#4960 and the cloud record it produced. - It answers the card's seven items in order (K1 to K9 in the record): the boundary and the texts it revises; what it supersedes, by name; the admission of `knowledge_source` under ADR-0088 with its v1 keys; the ADR-0087 dispositions for two renames and three removals; the index fingerprint and generations; the contract additions; one `search_knowledge` definition for every transport. - K8 answers the sixteen items of the contract input (comment 7142505760 on the card) one by one: accepted, deferred or refused, each with its final shape and the phase-2 card that first reads it, and says which keys count as contract members. The execution table follows the epic's current layout. - `docs/adr/README.md` is regenerated by `pnpm adr:index` (one row, three counts). - No adapter-contract member is added, no key is added or removed, and none of the revised docs or code notes is edited: each is rewritten by the child whose code makes the new sentence true. Second round, after the contract review on this PR at head `7e71f545` (verdict FAIL): K8 and Execution are rewritten against the contract input; K7 names whose embedder is hashed, hashes the applied split, adds the recipe hash as the trigger for repair inside a generation, and refuses a mismatched search; K1 says what the push door becomes; K4 gains the one-name rule across the two doors, the authoring permission and source admission at save, and makes `adapter` optional from row 3 on the input's item 11. Third round, after the delta review at head `ccaf28f1` (verdict PASS, one should-fix and three nits): a build is opened by `beginBuild`, a call beside `completeBuild`; the states that start a rebuild gain the index with no recipe hash and the adapter with no `indexStatus`; item 8 lands whole in the first of objectstack-ai#37099 and objectstack-ai#37100 to merge; a search over several sources answers from the ones it can search and names the refused ones; the record says where a run-time change of an egress declaration is picked up and how the deployment's adapter is known. Read first, by risk: 1. K8: the sixteen-item table, and what counts as a member. 2. K7: the fingerprint's sources, the three states that start a rebuild, and rules 3 and 4. 3. K4: the v1 key table, point 1 with its cost, the optional `adapter`, and the two guards on authoring. ## Questions for the maintainer The card's seven items, the maintainer's words, the contract input and the cloud record do not settle these three. The record marks each ▲ where it stands. They are the maintainer's to rule on in review; merging the record as written accepts what it writes. **Question 1.** Record point 1: the fate of the runtime-registration `file` and `http` source shapes, and of the push door (`indexDocument`, `deleteDocument`). The card asks for the fate and names the rule (one strict contract) but not the fate. - A (written in the record, marked ▲): both arms retire with the type's admission, with an ADR-0087 disposition, and the two push methods leave the service contract with them; all of it returns later as one designed arm with a parsing adapter - B: keep one key-less arm for a corpus an external engine ingests, with the push door as its write door - C: keep the two shapes as code-only registrations beside the governed type Recommendation of the session that wrote the record: A. Ruling D2 (a type referencing objects), the v1-key rule (`prefix`, `mimeTypes`, `urls`, `userAgent` have 0 readers) and Prime Directive 12 leave no other consistent answer; C is a second contract. What A costs, in full: a corpus ingested outside the platform has no v1 form; `indexDocument` and `deleteDocument` leave `IKnowledgeService` (0 callers in this tree, tests aside); and the clauses that two phase-2 cards build for the two arms (objectstack-ai#37103 item 3, objectstack-ai#37097 item 1) are removed by row 3. Whatever the answer, the two push methods are refused on an object source. **Question 2.** Record point 2: what does "content recipe" cover in the index fingerprint? The card names the component without defining it. - A (written, marked ▲): the object, the ordered `content` list and the assembly rule's version. `where` and `metadataFields` go to a second hash, the recipe hash, whose change starts one complete rebuild inside the same generation - B: also `metadataFields` in the fingerprint - C: also `where` in the fingerprint Recommendation of the session that wrote the record: A. The fingerprint answers whether stored vectors can be ranked against new ones, and neither `where` nor `metadataFields` changes a vector. B or C needs no recipe hash for those keys, at the price of re-embedding the whole source on every such change. **Question 3.** Record point 3: after the type lands, does registration in code (the plugin's `sources` option and `registerSource`) stay? - A (written, marked ▲): it stays as a second door for the one schema and parses with it; one name is one source, so a registration from one door never replaces a source that arrived through the other (a coded refusal) - B: it is closed once every source can be metadata Recommendation of the session that wrote the record: A. The epic's phase 2 registers sources in code, and tests and code plugins need the door; one strict contract is one shape, not one door. The record leaves the later closing open, so B needs no rewrite. The earlier question on whether a source must name its adapter is no longer a question: the contract input (item 11) leaves it to the record, and the record decides it (optional from row 3; an omitted `adapter` means the deployment's adapter). **◆ These are decided here, on the contract input** (comment `7142505760`: "the ADR decides the final shapes"). They are listed so that the approver sees each choice in one place. | The input's item | What this record decides | |:--|:--| | 5 | the chunk's final keys, with the service setting its `id`; the flag is `capabilities.chunks` | | 6 | one embedding descriptor on the adapter (`model`, `dimensions`, `maxInputTokens`, `variant`), read at use | | 8 | three parts: the expected fingerprint and recipe hash on every call; `indexStatus`; `beginBuild` and `completeBuild`, the first of which is what opens a generation. All of it lands in one PR, the first of objectstack-ai#37099 and objectstack-ai#37100. Parts (b) and (c) and the recipe hash go past the input's words | | 10 | `split` lives on the object arm, as `source.split` | | 11 | `adapter` becomes optional in row 3; an omitted one means the deployment's adapter | | 13 | no grouping member now | | 15 | no query-prefix member; an adapter option | | (the review's finding on the push door) | `indexDocument` and `deleteDocument` are refused on an object source | | (the review's finding on a search over several sources) | the searchable sources answer and each refused source is named; refused whole only when none can be searched (K7, rule 5) | ## Tests No code changes, so no test changes and no ablation. A docs-only record. ## Acceptance notes - The cloud repository was not readable from the writing session. Every statement about the cloud record is taken from two comments on this tracker, both cited in the record's Provenance. - The dispatch asked for a file and line on every quoted text. `docs/adr/**` refuses line anchors (`check:adr-symbol-anchors`), so the decision text cites files and symbols, and the positions are in the record's Readings table in words, repeated below. - The first readings were taken at `254e396a29`, the rows added for the contract section at `b49a264a10`; no file in the table differs between the two commits. - K8's item 8 goes past the contract input's words in three members (`indexStatus`, `beginBuild`, `completeBuild`) and in the recipe hash; the record says so in the table and in its list of decisions. With the status member, objectstack-ai#37099 waits for this record, which its `Blocked-by` line does not say today. - No entry under `scripts/adr-anchors/` is added: the gate asks for none on a new record, and anchors belong to the implementing cards. - The cloud record owes a one-line pointer back to this number; that is the cloud lane's, after this merges. - Observed, not filed: once `embedding` and `vectorStore` leave the source, `EmbeddingModelSchema` and `VectorStoreSchema` have no composer in the spec. The record names it as the type-admission card's finding. ## Verification Two-minute check: `pnpm check:adr-symbol-anchors && pnpm check:adr-anchors && node scripts/check-adr-links.mjs && pnpm check:adr-index`. Expected: four green verdict lines. <details><summary>Local gate readings at 4fa0cdc</summary> - `node scripts/pm/dispatch-gates.mjs --commands` derived 21 commands for the two changed paths; all 21 were run and each exited 0; `--ran`: 21 derived, 21 run, 0 NOT-MEASURED, 0 UNRUN. - `check-adr-symbol-anchors`: 4079 anchors across 162 records resolve, 0 line anchors. - `check-adr-anchors`: OK, 156 decision numbers. - `check-adr-links`: 1204 relative link destinations resolve. - `adr-index --report`: the index is current. - `overlap-check`: `origin/main` merges cleanly; the one overlap is `docs/adr/README.md` against PR objectstack-ai#37115, as stated under Sequencing. </details> <details><summary>Readings, taken at 254e396 and b49a264</summary> Each text this record quotes was read on `objectstack-ai/objectstack` `main` at `254e396a29`. The rows added for the contract section (the last eight) were read at `b49a264a10`, the `main` this record's branch has merged; no file in this table differs between the two commits. The numbers are a dated reading for the card, not anchors; the decision text cites symbols and files. | File | What was read | Position at `254e396a29` | |:--|:--|:--| | `content/docs/protocol/knowledge.mdx` | the opening, "ObjectStack does not ship its own RAG engine." | lines 7 to 10 | | same | §1, "We have nothing distinctive to add to those layers." | line 45 | | same | §1, "The protocol scopes the framework's responsibility to (1)–(4)" | lines 60 to 61 | | same | §3.1, "It is stored as metadata (versioned, environment-scoped)" | lines 111 to 113 | | same | §3.2, "The framework does **not** chunk; adapters do." | lines 162 to 163 | | same | §3.4, "The adapter surface is **deliberately minimal**" | lines 217 to 220 | | same | §5, a `'*'` member "meaning every field the object declares except `id`" | lines 310 to 311 | | same | §5, sensitive fields go in a separate source | lines 322 to 324 | | same | §6, "that surface stays unbuilt until a real `object` source calls for it" | lines 397 to 399 | | same | §7, the `knowledge-pgvector` row; §8, `KnowledgeSource.embedding` | line 430; lines 449 to 452 | | `content/docs/ai/knowledge-rag.mdx` | "File / HTTP hits pass through (ACL is the adapter's problem)"; "Why we did not build a vector DB" | line 78; line 82 | | `packages/spec/src/ai/knowledge-source.zod.ts` | the class note, "the shape of a **runtime registration**, ⛔ not a governed metadata type" | lines 104 to 123, the sentence at 105 to 106 | | same | `contentFields` and its `*` note; the `file` arm; the `http` arm | lines 63 to 67; 80 to 87; 89 to 96 | | same | the `cron` note, "this slot is parsed and reaches no engine"; `id`; `embedding`; `vectorStore`; `aiExposed` | lines 36 to 37; 125 to 126; 140 to 144; 145 to 149; 159 to 160 | | `packages/spec/src/ai/embedding.zod.ts` | the file note, "NOT in scope" and "These were removed in v1" | lines 15 to 23 | | `packages/spec/src/contracts/knowledge-adapter.ts` | "The surface is **deliberately minimal**"; the interface | lines 18 to 20; 56 to 74 | | `packages/spec/src/ai/knowledge-document.zod.ts` | the file note; the chunk note; `permissions` | lines 10 to 13; 53 to 57; 45 to 50 | | `packages/spec/src/contracts/embedder.ts` | `IEmbedder` | lines 26 to 39 | | `packages/spec/authorable-surface/ai.json` | the five keys of K6 | lines 239, 245, 246, 250 and 322 | | `packages/spec/src/data/ai-read-exposure.ts` | "**Any other object** is refused" | lines 32 to 37 | | `packages/services/service-knowledge/src/knowledge-service.ts` | the class note, "Non-responsibilities (the parts plugins own)" | lines 88 to 89 | | same | `registerSource`, no parse; `reindexSource`, with its `file` and `http` answer, its one `find` and its one `upsert` | lines 123 to 131; 161 to 219, with 168 to 178, 192 to 196 and 210 to 212 | | same | `search`; `handleRecordUpsert`; `objectSourcesFor`; `documentIdFor` | lines 235 to 280; 290 to 304; 550 to 557; 560 to 562 | | same | `recordToDocument`, with the `'*'` branch and the title | lines 578 to 615, with 591 to 595 and 612 | | `packages/services/service-knowledge/src/knowledge-service-plugin.ts` | the three deferral comments of K3 | lines 250 to 260; 296 to 299; 312 to 321 | | `packages/services/service-knowledge/src/knowledge-tools.ts` | the `aiExposed` note; the definition; the executor | lines 22 to 33; 148 to 160; 246 to 284 | | `packages/services/service-knowledge/src/knowledge-source-admission.ts` | `admitSourceFields` | from line 228 | | `packages/plugins/knowledge-memory/src/index.ts` | the paragraph split with a soft 800-character cap | lines 17 to 18, and 104 | | `packages/plugins/knowledge-ragflow/src/index.ts` | `extractRagflowOptions`; one chunk per document | lines 67 to 85; 113 to 139 | | `packages/mcp/src/mcp-http-tools.ts` | `registerKnowledgeTools` and its call | lines 3514 and 3182 | | `packages/runtime/src/domains/mcp.ts` | the knowledge seam under `data:read` | lines 262 to 271 | | `packages/spec/src/contracts/knowledge-service.ts` | `indexDocument` and `deleteDocument` on `IKnowledgeService` | lines 93 and 95 | | `packages/services/service-knowledge/src/knowledge-service.ts` | `indexDocument` and `deleteDocument` hand the caller's document to the adapter | lines 147 to 157 | | same | in `search`, an adapter failure is logged and the search goes on | lines 270 to 274 | | same | `isNonObjectSourceHit`, and the two places that pass such a hit without a re-read | lines 526 to 529; 480 and 515 | | `packages/spec/src/contracts/knowledge-adapter.ts` | `AdapterContext`; `AdapterSearchOptions` with its opaque `filter` | lines 31 to 38; 41 to 50, `filter` at 47 | | `packages/spec/src/ai/knowledge-document.zod.ts` | the keys of `KnowledgeChunkSchema`: `id`, `documentId`, `index`, `content`, `metadata` | lines 58 to 69 | | `packages/plugins/knowledge-ragflow/src/index.ts` | the four `adapterConfig` keys the adapter reads | lines 50 to 58 and 67 to 85 | | `packages/spec/src/kernel/platform-capabilities.ts`; `packages/services/service-settings/src/manifests/knowledge.manifest.ts`; `examples/app-showcase/src/coverage.ts` | `PLATFORM_CAPABILITY_TOKENS`; the `chunk_target` and `chunk_overlap` settings; `KIND_COVERAGE` | from line 31; lines 105 to 112; line 52 | Readings that are counts: no file under `packages/services/service-knowledge/src`, `packages/plugins/knowledge-memory/src` or `packages/plugins/knowledge-ragflow/src`, tests aside, reads `prefix`, `mimeTypes`, `urls`, `userAgent`, a source's `embedding` or `vectorStore`, `refresh.cron`, or a document's `permissions` (0 matches each; the controls `adapterConfig` and `contentFields` match 3 and 6 times in the same three directories). `indexDocument` and `deleteDocument` have no caller outside their declaration and their implementation, tests aside (0 matches), and `KnowledgeChunkSchema` has no reader (its one other mention is a type-alias pin). Nothing under `examples/` registers a knowledge source: 0 matches for `KnowledgeServicePlugin`, against 38 files that match the control `defineStack`; `examples/app-todo` lists the two knowledge packages as dependencies and imports neither. Readings from the tracker: the contract input is comment `7142505760` on objectstack-ai#37001, and the cards it names (objectstack-ai#37096 to objectstack-ai#37103 and objectstack-ai#37107) were read in full, with the epic's body as it stands after its phase-2 rewrite. The retirement of `knowledge-ragflow` is card objectstack-ai#37004 and ruling `7134290286` on objectstack-ai#36839. objectstack-ai#4606 has no comment, and its judgements are in its body. The ruling on objectstack-ai#4672 is comment `5194621834`; it was relayed by the services lane's PM and names the maintainer. The 2026-11-15 words are in the body of objectstack-ai#33933 and are restated in comment `7134104071`. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYpRrYuqSLCvbSk9zrL)_ <!-- signed: repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…ed is left out; pack selection conditions; carried-text bound (objectstack-ai#37196) maintainer · os-bob · session_012dn2AecKpLaYkUtNRiqtby Refs objectstack-ai#36996, objectstack-ai#37140 Ruling-ref: maintainer, 2026-11-25, in the maintainer's session, verbatim: 「同意你的建议」. The maintainer was answering two independent analyses of ADR-0160 written that day: - one on points 1, 2 and 10 of "Points that go past the card's words", which the record said needed the maintainer's explicit acceptance. They were asked on PR objectstack-ai#37115 (comments 7144068209 and 7144090043) and were not answered before the merge. - one on the six cards cut from its Implementation split: objectstack-ai#37140–objectstack-ai#37144 and objectstack-ai/cloud#4978. ## 维护者速读 - 做什么:按你 11-25 的「同意你的建议」修订 ADR-0160。 - **第 2 点改了**:某个用户读不了包里的某个关联对象时,省略那一节,并附一句「部分资料对你不可见」,不再整包拒绝。系统对象、或 API 关闭了暴露的对象,对谁都不提供,仍然整包拒绝。 - **第 1 点接受,加三个条件**:多个包被拒时列出「名字(标签)」;应用内预读不替用户选包;校验时给两条提醒。 - **第 10 点照原样接受。** - **关联列表里可以放长文本**,但整个包交给模型的文字总量有一个明确上限,截断一定写明。上限的数值在 objectstack-ai#37140 的 PR 里按业务证据定:BrightRule 实测整份约 1.2 万 token 的制度作答效果好,所以 8000 字符不能作为唯一上限。 - 状态改为 Accepted,索引重新生成。 - 为什么:对象权限是各部署自己配的,包是随应用发布的。整包拒绝会让某个部署收回一项对象权限后,这个角色的「问 AI」整体失效。省略并说明不比拒绝泄露更多信息。 - 需要你做的:审后手动合并。`docs/adr/**` 是 Tier H 受管面。 ## What changed (only `docs/adr/0160-record-scoped-ai-inquiry.md` and the generated `docs/adr/README.md`) - **Status and a new `Amended:` line.** - **D1:** two advisory validation reports (point 1, condition 3). - **D3:** - step 1 and "Object level" split by whom a refusal refuses; - the field-level structural bullet; - a new paragraph, "The bound on carried text". - **D4:** - the several-packs refusal lists name and label (point 1, condition 1); - step 4. - **D8:** the in-app runtime never runs a pack it chose itself (point 1, condition 2). - **Points:** the header, points 1, 2, 11 and 12. - **Consequences:** "One pack can serve roles with different object access". - **Not changed:** - `related` filter / orderBy. That is a separate protocol decision. - The root and lookup-target rules. - Point 10. ## Checks (local, at the head) Every command `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derives for this diff exited 0, 21 of 21. They include: - `check:adr-index` - `check:adr-anchors` - `check:adr-symbol-anchors` - `check-adr-links` (1215 links resolve) - `check:doc-authoring` - `check:pm-governed-merges` - `check:pm-prior-rulings` - `check:doc-formula-expressions`, which ran after building `@objectstack/formula` and `@objectstack/lint`. Governed surface (Tier H): this PR stays draft, and the maintainer merges it by hand. --- _Generated by [Claude Code](https://claude.ai/code)_ Co-authored-by: Claude <noreply@anthropic.com>
Requested by Warren · project thread
Fixes #36997
Clause-②: no
Metadata-protocol: none
This PR is the design text only. After it merges, the owning seat files rows 5–10 of epic #36996 from the record's implementation split.
维护者速读
What changes
ai_contextpasses ADR-0088's admission test. Strict schema, six v1 keys (name,label,object,fields,related,body), each read by the render service in the PR that adds the type (ADR-0049). Body fallback to knowledge search is named as later work.enable.aiReadableand the refused write arms) stay as ruled; a pack grants nothing and hides nothing.relatedchild; a refusal refuses the whole call, mcp: one read that answers "each X with its latest Y" and reads several related objects, in place of a chain of calls the client stitches #35145), then fields are projected onto the caller's served schema, then surviving lookups' targets. A field the caller's schema shows but cannot read is named withheld (mcp: query_records and get_record say which fields field-level security withheld, so an answer says "not visible to you", not "blank" #35137); a field the schema hides is not named and one non-naming statement says some material is not visible (membersWithheldprecedent, point 10). Unreadable related rows absent; no id for an unopenable lookup; long body as an outline with anchors; one envelope in three parts (data, executor notes, framing sentence), owner proposed@objectstack/core.get_record_context— zod I/O in spec beside the dataset tools, one executor, MCP and the product registry;data:read, read family. Order of judgement: arguments, the root object's gates (before any pack lookup), pack selection with no fallback, then D3's order. Naming bound: no answer names an object, field or pack the caller is not served. The seams for cloud#4969: an ordinary tool call, a read, and a read set derivable from the arguments and published metadata by one exported function.@objectstack/service-record-contextunderpackages/services/, by the dataset/knowledge executor precedent.ToolExecutionContext.focusrestated exactly as conversation focus: a pinned record in the chat request, shown as a chip, kept across navigation #36999 fixes it;get_record_contexttakes nofocus.ActionTypegainsask_ai— console-only, calls the focus setter, no target, never an AI tool, absent where the assistant surface or the focus capability is absent.SkillSchemagainscontext?: string; a skill that declares it must bindget_record_contextintools. MCP skill prompts take one optional record-id argument and carry the call's arguments as one JSON object instead of inlining the pack.{ object, id, anchor?, quote }; no schema until its reader (row 10).Metadata-protocol:.docs/adr/README.mdregenerated bypnpm adr:index(one row, the counts).Read first, by risk:
Tests
None: the diff is two files under
docs/adr/. No behaviour changed.Acceptance notes
mainate1dee7aeand is written as a symbol anchor;pnpm check:adr-symbol-anchorsresolves them.aikey" is theenable.aiReadableread key plus the refused write-arm spellings (packages/spec/src/data/ai-read-exposure.ts,object.zod.ts#CAPABILITIES_AI_WRITE_ARM_GUIDANCE); the record spells it so.packages/mcp/src/mcp-http-tools.ts#textResultserializes JSON only); the record names one owner as a proposal.search_knowledgekeeps JSON Schema in its service. The record follows the dataset form and says so.packages/objectql/src/engine-reference-name-visible.ts). The record therefore says each read meets the gates the record tool making the same read meets.ai.exposedis ADR-0011's block; ADR-0066 is not cited for it.fa8cdc93FAIL (M1, S1–S3; record 7143262163); round 2 on81bd066bPASS with S4 open (record 7143637250); round 3 on1fc38533PASS,No must-fix, no should-fix.(record 7143824235).getis withheld byservedExpandand renders as an unexpanded lookup, which the record's sentence "Where the record tools do not refuse, the pack does not either" already decides. N11 — Provenance item 4 and the Status line still speak of one approver, while the Points section hands points 1, 2 and 10 to the maintainer; the Points section governs.Verification
Head
1fc3853349219086768123e814c6369208a29b47(basee1dee7ae; two patch commits onfa8cdc93, no merge of main). Local, on each round's final text, the familiesnode scripts/pm/dispatch-gates.mjsderives fordocs/adr/**, all exit 0:Governed surface:
docs/adr/**is Tier H. This PR stays draft; landing waits for an authorized approval or the maintainer's merge.skip-changeset: the diff publishes nothing from any package.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQwxbZSA7o5vcLjQjM1myV