Skip to content

docs(adr): ADR-0150 addendum — ai_context joins the package-scoped bucket beside skill - #37209

Merged
os-zhuang merged 4 commits into
mainfrom
claude/issue-37180-ai-context-package-scope-adr
Nov 25, 2026
Merged

os-zhuang merged 4 commits into
mainfrom
claude/issue-37180-ai-context-package-scope-adr

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Yibo Wang · project thread

repo:objectstack#3 · os-support-ai · session_01WGufzi13yZRqVcp2mGonWK

Fixes #37180

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用户无感(只改决定记录,不改代码);提议两个应用各带的同名 AI 资料包按「应用+名字」分开认,和技能现在的做法一样,AI 点名某个应用的资料包时用「应用前缀-名字」的写法。
  • 为什么做:属于「记录级 AI 问询」这项工作;现在同名的资料包在系统里只留后装的那一份,规则要先定,再由后续实现卡 37180 跟进:资料包(ai_context)进入按包分桶的四张表,get_record_context 按应用+名字选包 #37216(把资料包加进按应用区分的名单)落地,而它必须排在 记录 AI 问询 8:技能键 context,MCP 技能提示词可带记录参数 #37141(让技能写明用哪个资料包)之前。
  • 出错会怎样:规则定错的话,后面的实现会照着错的做;本次只有文档,撤回这次合并即可。
  • 要你做什么:这条只能由你本人定,合并就等于批准,其中两处超出卡面原话(AI 用「应用前缀-名字」点名资料包;同一应用前缀下不许两个应用包带同名资料包);不同意就不合并,那样只保留「同一对象上两个同名资料包不替用户挑、一律拒绝」这一条。

What changes

Two files under docs/adr/: 44 lines added, 1 line changed. No schema, no code, no changeset.

ADR-0150 (Accepted) gains a dated addendum. No ruled sentence is rewritten.

  • The status line gains one Amended clause, dated 2026-11-25. This is the one changed line: the clause is appended, and nothing before it is edited.
  • The D1 table gains one row, marked with the date, between bucket 3 and bucket 4.
  • A new section at the end of D1, "Addendum (2026-11-25): ai_context joins bucket 3". It proposes that the context pack type of ADR-0160 is identified by (package, name), in bucket 3 beside skill.

The addendum says, in this order:

  1. The type, and what D2, D3, D6 and D8 mean for it. A package's pack is spelled NS-NAME where its name crosses the AI face.
  2. The tree today, measured on main at 0a1b69c0. The type and its pack selection are on main. The registry keeps each package's item. The metadata service keeps one copy per name, the one registered last.
  3. What changes with the bucket: the service's copy, overlays, owner stamps (unchanged) and uninstall.
  4. The readers that move. It names three and moves none.
  5. The follow-up, 37180 跟进:资料包(ai_context)进入按包分桶的四张表,get_record_context 按应用+名字选包 #37216, which lands before row 8 (记录 AI 问询 8:技能键 context,MCP 技能提示词可带记录参数 #37141).
  6. The interim rule: two parsed packs that share a name and a root are never chosen between.
  7. Past the card's words: two points that are the maintainer's decision alone, and one that is no new decision.

ADR-0160 gains one cross-reference note under D1, which also names the follow-up and its order. No sentence of it is changed.

Not in this PR, by the card's contract: PACKAGE_SCOPED_TYPES is not edited and no reader is moved. That is #37216's work, after the ruling.

Round 2

The contract review of the first head passed with two should-fix findings and four nits. This head closes them.

Tests

No package is touched, so no package build or test is owed. The checks that read these two files are the docs gates under Verification.

Acceptance notes

  • The chain. This PR is the ruling. 37180 跟进:资料包(ai_context)进入按包分桶的四张表,get_record_context 按应用+名字选包 #37216 implements it and is blocked by this PR. 记录 AI 问询 8:技能键 context,MCP 技能提示词可带记录参数 #37141 (the skill key) waits for 37180 跟进:资料包(ai_context)进入按包分桶的四张表,get_record_context 按应用+名字选包 #37216, because the one rule throws for a type outside PACKAGE_SCOPED_TYPES.
  • Two decisions are the maintainer's alone.
    1. Bucket 3 and not bucket 2: a package's pack is spelled NS-NAME in the tool's context argument. This widens D6 from the names a server lists to the value of an argument. The alternative, an optional namespace input on the tool, adds a key to two shapes ADR-0160 has ruled.
    2. Child N's predicate carries the install refusal: the type joins NAMESPACE_UNIQUE_TYPES, whose header reserves a further type to the maintainer.
  • Not a new decision. The root object narrows the candidates before the one rule picks. ADR-0160 D4 already requires it: step 3 selects among the packs rooted on the requested object, and the naming bound lets no refusal name a pack beyond those.
  • The card's step 3 names one list, and the bucket takes four. They are PACKAGE_SCOPED_TYPES, PACKAGE_SCOPED_READ_TYPES, PACKAGE_SLOTTED_METADATA_TYPES and NAMESPACE_UNIQUE_TYPES. The service's one copy per name is governed by the third, not the first. skill is in the first three; its one-holder rule inside a namespace is phase 1's, which a new type never had.
  • Citation form. check:adr-symbol-anchors refuses a line anchor under docs/adr/, so the record cites path#Symbol, and the line numbers are in the table under Verification.
  • No changeset. docs/adr/ ships in no package, so this PR carries skip-changeset.
  • Tier H. This PR stays draft. The merge is the maintainer's, and it is the ruling.
  • Shallow checkout. No claim here is read from history dates.
  • Noted, not filed. On main the several-packs answer lists pack names only (packages/services/service-record-context/src/sentences.ts, severalPacks). ADR-0160 D4, as amended on 2026-11-25, says each candidate is listed by name with its label. This is read from source, not measured through the tool, and no first-party object has several packs. The addendum leaves what that answer carries to D4.

Verification

Read first, by risk:

  1. docs/adr/0150-…-literal-prefix.md, "Past the card's words" at the end of the addendum: the two decisions that are the maintainer's.
  2. The same file, the D1 table hunk: one row inserted into a ruled table. Check that it reads as an addition and changes no ruled row.
  3. The same file, the status line: the appended clause.

Two-minute check: run node scripts/check-adr-symbol-anchors.mjs. Expect 4186 anchors across 163 records resolve and exit 0. Fourteen of them are this diff's path#Symbol anchors.

Measured anchors on main at 0a1b69c (file:line)
What the addendum says Where it is read
The type is on main, and a pack name holds no hyphen packages/spec/src/ai/ai-context.zod.ts:136 (AiContextSchema), :157; packages/spec/src/kernel/address-grammar.ts:68 (ROUTER_ADDRESSABLE_NAME_PATTERN)
Pack selection keeps the packs rooted on the object and matches a bare name packages/services/service-record-context/src/read-set.ts:65 (selectContextPack)
Two packs of one name on one root: 409; with another name and no context: the several-packs answer packages/services/service-record-context/src/record-context-tools.ts:266, :265
The one rule resolves only its listed types packages/core/src/package-scoped-resolution.ts:245 (PACKAGE_SCOPED_TYPES; skill at :270)
It throws for a type outside the list packages/core/src/package-scoped-resolution.ts:740, packages/objectql/src/package-scoped-resolver.ts:148
A by-name read consults (package, name) for listed types packages/objectql/src/package-scoped-read.ts:88 (PACKAGE_SCOPED_READ_TYPES; skill at :96), read by packages/objectql/src/registry-package-addressing.ts:433
The service keeps one slot per (package, name) for listed types packages/spec/src/api/protocol.zod.ts:2753 (PACKAGE_SLOTTED_METADATA_TYPES; skill at :2754), packages/metadata/src/package-slotted-store.ts:154
Any other type is keyed by name alone packages/metadata/src/package-slotted-store.ts:797 (storeWriteKey), :820
The last registration replaces the copy packages/metadata/src/metadata-manager.ts:1499, packages/metadata-protocol/src/protocol-registry-hydration.ts:148
One package holder of a name inside a namespace packages/objectql/src/namespace-co-owner-names.ts:96 (NAMESPACE_UNIQUE_TYPES); the list is reserved to the maintainer at :27
The type opens no overlay channel, and its row is not among the served overrides packages/spec/src/kernel/metadata-plugin.zod.ts:1388, packages/metadata-protocol/src/protocol-package-bindings.ts:388 (SEALED_ROW_SERVED_OVERRIDE_TYPES)
A skill prompt's name: a face, else a bare name by the one rule packages/mcp/src/skill-prompts.ts:373 (lookupSkillPrompt)
The one face derivation packages/spec/src/ai/face-name.ts:86 (deriveAiFaceName)
The owner stamp's judge, and the pack's collection among those it judges packages/spec/src/kernel/collection-item-owner-stamp.ts:129, :107
Uninstall, the registry's half packages/objectql/src/registry.ts:5328 (uninstallPackage)
Uninstall, the service's half packages/metadata/src/metadata-manager.ts:2880 (unregisterPackage)
The one first-party declarer: two packs, two names, two roots examples/app-showcase/objectstack.config.ts:223, examples/app-showcase/src/ai/record-context.ai-context.ts:20, :30

Absence readings, each with a positive control:

  • ai_context in the four list files and in packages/metadata/src/package-slotted-store.ts: 0 lines each. Control: skill is in the first three lists, at the lines the table gives.
  • The skill key: packages/spec/src/ai/skill.zod.ts has 0 context: property lines. Control: 1 tools: line.
  • objectstack-ai/hotcrm at b1ea6fcc: ai_context, aiContexts or ai-context, 0 files. Control: skills:, 6 files.
Local gates at head deee29a: 21 derived, 21 run, all exit 0

Derived with node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands, and reconciled with --ran:

Run reconciliation — 21 derived, 21 run, 0 NOT-MEASURED, 0 UNRUN.
✓ dispatch-gates --ran: 21 derived famil(ies) accounted for — 21 run, 0 NOT-MEASURED (a DERIVED zero — all 21 recorded an exit code and none of them is 3).

Each exit code was captured before any pipe:

0  node scripts/check-adr-links.mjs                      1222 relative link destination(s) under docs/adr/ resolve
0  node scripts/check-adr-links.mjs --self-test
0  node scripts/check-closing-keyword-parity.mjs
0  node scripts/check-closing-keyword-parity.mjs --self-test
0  node scripts/check-comment-mask-corpus.mjs            23898 files, 0 disagree, 0 unparseable
0  node scripts/ci/plan-test-core-shards.mjs --self-test
0  pnpm --filter @objectstack/lint run check:doc-formula-expressions
0  pnpm check:adr-anchors
0  pnpm check:adr-index                                  docs/adr/README.md is current, every record parsed
0  pnpm check:adr-symbol-anchors                         4186 anchors across 163 records resolve
0  pnpm check:ci-filter-parity
0  pnpm check:closed-ceremony-text
0  pnpm check:cross-package-test-inputs
0  pnpm check:doc-authoring
0  pnpm check:driver-memory-census
0  pnpm check:gitlink-declared
0  pnpm check:nul-bytes                                  no raw ASCII control bytes
0  pnpm check:pm-governed-merges
0  pnpm check:pm-prior-rulings
0  pnpm check:refd-timer-probe
0  pnpm check:watch-hint-literal

check:doc-formula-expressions reads the compiled output of @objectstack/formula and @objectstack/lint. Those two and their dependencies were built first, under the shared verify lock (VERDICT command-exit 0).

docs/adr/README.md is generated from each record's status keyword. ADR-0150's keyword stays Accepted, so the index does not change and is not in this diff.

A dated addendum under D1 of ADR-0150 proposes that the context pack
type of ADR-0160 is identified by (package, name), as skill is. It adds
one dated row to the D1 table and an Amended clause to the status line,
and rewrites no ruled sentence. It says what the bucket changes for the
metadata service's copy, overlays, owner stamps and uninstall, names the
readers that move without moving any, names the one follow-up card, and
carries the interim rule: two parsed packs that share a name and a root
are refused with one answer.

ADR-0160 gains one cross-reference note under D1 and no changed
sentence. Docs only: no schema, no code, no changeset.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzi13yZRqVcp2mGonWK
… rest of its several-packs answer to it

Two sentences of the addendum, corrected against the tree. ADR-0160 is
on main: it merged the day before, and only its status keyword still
reads Proposed. And where the addendum says how the several-packs answer
spells a pack, it now changes the name's spelling alone and leaves what
else that answer carries to ADR-0160, so it holds whichever of the two
records is amended first.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzi13yZRqVcp2mGonWK
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 25, 2026
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation labels Nov 25, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgv2LZN1W2qSYTZvYs

Contract-review-claim: session_01WGufzgv2LZN1W2qSYTZvYs · head 1179369 · 2026-11-25T03:55Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgv2LZN1W2qSYTZvYs

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 11793695f5096ad42bd1e2a192c1d0974d630cea
Local-runs: none
Scope: docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md,docs/adr/0160-record-scoped-ai-inquiry.md + none
Security-touching: yes

Read for this record: card #37180 with its three comments, the PR body, the file list (two files, both hits), the net diff against main (+43 / -1), and the check-runs on the head. The cited code was read on origin/main at a33691e5. The branch was cut from 3b4f0b98; since then main gained PR #37173 (2a6f26a4) and PR #37196 (a33691e5). The head still merges cleanly into a33691e5.

Security-touching reads yes on purpose. The addendum decides which pack names a refusal of get_record_context may show a caller (its point 2, on ADR-0160 D4's naming bound). That is permission behaviour, though both paths are ADR files.

① Derived judgments

  • Accept-sets and published surface: none move. The diff is two files under docs/adr/. No schema, no code, no generated file, no changeset. PACKAGE_SCOPED_TYPES, PACKAGE_SCOPED_READ_TYPES, PACKAGE_SLOTTED_METADATA_TYPES and NAMESPACE_UNIQUE_TYPES are unchanged on the head, and none of them lists ai_context on main. Right: the card says docs and ADR only.
  • "No ruled sentence is rewritten": right. In ADR-0150 the one changed line is the status line, and the change is an appended clause. The D1 table gains one row, marked with its date; no ruled row is edited. In ADR-0160 two lines are added (one blockquote under D1) and none is changed.
  • The readers are named and not moved: right. The card names two readers: the context argument of get_record_context, and the skill key context (记录 AI 问询 8:技能键 context,MCP 技能提示词可带记录参数 #37141). The addendum names both and adds a third (the /meta doors and the service's store). The diff moves none.
  • What the addendum proposes for later is a narrowing, and it says so. D2's install refusal and the /meta by-name refusal for a name two packages hold are both assigned to the follow-up card, each with a measured count. Right as a declaration; nothing narrows in this PR.
  • Gate verdicts. Check-runs on the head: 27 success, 23 skipped, 0 failed, 0 pending. Check Documentation Links, Lint · docs & code guards, Check Changeset and Governed Surface Queue Guard are among the successes. The two runs that were still in progress when the dev reported have finished green.

② Semver level

No changeset, and none is owed: docs/adr/ ships in no package. The PR carries skip-changeset, and Check Changeset is green on the head.

Clause-②: no is right. Nothing published moves. Metadata-protocol: none is right for the same reason.

③ Boundary flags

The dev report carries three open_questions. Each is answered here, and each is judged in ④.

  1. How a model names a package's pack (dev recommends A: the NS-NAME face in context, no new key). Answer: A is sound. It is the maintainer's to accept, see S2.
  2. Which rule refuses a second holder in one namespace (dev recommends A: NAMESPACE_UNIQUE_TYPES). Answer: A is sound. It is the maintainer's to accept, see S2.
  3. Whether the root narrows the candidates before D3 picks (dev recommends A: yes). Answer: A is right, and ADR-0160 D4 already requires it. An approver may accept it.

Dev deviations that touch the hits files:

SQL push-down. No code is in the diff, so there is no new id materialisation and no in-app join.

Escalated to the seat. main moved under this PR after the dev measured it (S1). The follow-up card is named but not filed, and #37141 has no Blocked-by for it (nit N3).

④ Design judgment

docs/adr/0150 — the addendum, sentence by sentence against the tree.

These hold on a33691e5:

  • The metadata service keeps one copy per name for a type outside PACKAGE_SLOTTED_METADATA_TYPES. storeWriteKey answers { key: name } for such a type. skill is in the list and ai_context is not.
  • The one rule throws for a type outside PACKAGE_SCOPED_TYPES, in both resolvePackageScopedHolders and resolvePackageScopedName. skill is in that list and in PACKAGE_SCOPED_READ_TYPES.
  • unregisterPackage removes by slot only for a slotted type. For any other type it removes the one copy only when that copy is the package's.
  • The owner-stamp judge now lists aiContexts among its collections.
  • lookupSkillPrompt reads a face first, then a bare name as a caller with no package, and refuses with 409 RESOURCE_CONFLICT naming each candidate by its face. Reader 1 copies that order correctly.
  • D8 gains no row. ADR-0160 D6's focus holds an object and an id, and no pack name.
  • The interim rule is on main: packages/services/service-record-context/src/read-set.ts#selectContextPack never takes a first match.

(a) The NS-NAME face in context, with no new key. Sound.

  • It breaks no grammar. A pack name is ROUTER_ADDRESSABLE_NAME_PATTERN, which admits no -, and a namespace admits none. So a face never equals a bare pack name, and an uncut face splits at its only -.
  • It adds no member to ADR-0160 D4's strict input or to D8's argument object. The bucket-2 alternative (an optional namespace input, ADR-0150 D5's run_action form) would add one to each.
  • A model can learn the face without guessing. The several-packs refusal lists it, the 409 lists it, and a skill prompt hands it on.
  • A duplicate face is still possible in the shareable namespaces and past 64 characters. The addendum refuses it at the call, which is the only place left, since no list registers a pack's face.
  • It does extend D6. D6 was ruled for names a server lists (tool, skill, agent, object-less action). Here the face is the value of an argument. It also changes what context holds in ADR-0160 D4 and D8, from a pack's name to a face or a bare name. The addendum lists the point for the approver, which is the right place. See S2 for who may accept it.

(b) The second holder in one namespace, through NAMESPACE_UNIQUE_TYPES. Sound, and in scope for the addendum.

  • D2 as ruled already covers buckets 2 and 3: one package holder of a (type, name) inside a namespace. Once the type is in bucket 3, the rule applies by the ruled text. The face needs it too: NS-NAME names one pack only if the namespace holds the name once.
  • Child N's predicate is the right carrier. The type never had a phase-1 one-holder rule, so D9 has nothing to narrow, and N's rule refuses at every install and in os validate.
  • The alternative (phase 1's lists, as skill is carried) would refuse a second holder anywhere in the deployment. That is the opposite of what bucket 3 is for.
  • The header of packages/objectql/src/namespace-co-owner-names.ts reserves a new type to the maintainer. An ADR addendum is a fit place to ask, but only the maintainer's own hand answers it. See S2.

(c) The root narrows before D3 picks. Right, and it needs no decision of its own.

  • ADR-0160 D4 step 3 already selects among packs whose object is objectName, and gives one answer for a name no pack has and for a pack on another root. Judging over every holder of the name would break that sentence and the naming bound: a 409 would name a pack on an object the caller was never shown to be served.
  • ADR-0150 has the precedent in its own text. The cross-reference to ADR-0149 D2 under D5 limits the D3 candidates of the dataset arm to the holders the caller is admitted to.
  • It also keeps bare names working in the common case. Object names carry the package prefix (ADR-0129), so two packages' packs of one name are usually rooted on different objects, and each call reaches its own.
  • Reader 2 does not narrow by root, and should not: a skill names no object. It resolves by D3 from the skill's package and hands on the face. The two readers agree.

docs/adr/0160 — the cross-reference. Consistent with ADR-0160's own decisions on a33691e5, PR #37196's amendments included. D4's strict input gains no member. D4's step order is kept, since the root's gates still run before any pack is looked up. The #d4 and #d8 anchors exist, and the link into ADR-0150 resolves. The note says no sentence of ADR-0160 is changed, and none is.

Findings.

S1 (should-fix) — Six sentences of the addendum are false on the tree this PR merges into. They were true at 3b4f0b98; main is now a33691e5.

The first two sit under a heading pinned to 3b4f0b98, so they are an honest reading of an old tree. The others are not pinned. Fix: re-measure on current main and reword. It is prose only.

S2 (should-fix) — The addendum lets "an authorized approval" be the ruling for all three of its extra points. Two of them are the maintainer's alone.

  • Point 3 admits a type into NAMESPACE_UNIQUE_TYPES. That list's header says a narrowing beyond its twelve types is the maintainer's to rule.
  • Point 1 changes what a model types in context, and extends D6, which the maintainer ruled (Q1 = A). ADR-0160 held its own user-visible points for the maintainer's explicit acceptance.

Fix: say in the addendum that points 1 and 3 take the maintainer's own merge or word, and that point 2 follows from ADR-0160 D4. The PR is draft and is to be merged by the maintainer, so the landing path is already right. The record's text should not be wider than that path.

Nit N1 — The interim rule says "refused with one answer, whether context names them or is omitted". With context omitted and a third pack of another name on the root, selectContextPack answers several (400), listing the shared name once. The 409 is given only when the shared name is the only name. No first match is taken in either case, so the guarantee holds; the words "one answer" are too strong.

Nit N2 — "Overlays" says a package-less row under a name one package holds "is that holder's customization", one sentence after saying a pack takes no environment overlay. It does not say whether that row is served. On main, a sealed type's package-less row over a managed package's name stays unserved unless the type is in SEALED_ROW_SERVED_OVERRIDE_TYPES (packages/metadata-protocol/src/protocol-package-bindings.ts), and ai_context is not. The rule is also read at (type, name), while selection narrows by root. So an environment pack on another root stops being a pack when a package that holds its name installs. That is ruled D4, as for skill. The follow-up card should state it and measure it.

Nit N3 — The follow-up card is named and not filed. Row 8 (#37141) must wait for it, because the resolver throws for a type outside PACKAGE_SCOPED_TYPES. ADR-0160's split still shows row 8 blocked by row 5 alone, and #37141 has no Blocked-by for the follow-up. The seat files the card and adds the relation.

Nit N4 — The D6 bullet rests on a pack name holding no -. D6's own grammar check does not list the pack schema. One anchor to packages/spec/src/kernel/address-grammar.ts#ROUTER_ADDRESSABLE_NAME_PATTERN would close it.

No must-fix. Two should-fix, S1 and S2, both prose in docs/adr/0150. They earn a delta review of their fix.

Implemented-by: claude/issue-37180-ai-context-package-scope-adr
Reviewed-by: session_01WGufzgv2LZN1W2qSYTZvYs

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgv2LZN1W2qSYTZvYs

席位核对 — REWORK · repo:objectstack#3 · head 1179369 · 2026-11-25T04:04Z

L1: REWORK (L1-w, zone ai-A)
Head-sha: 11793695f5096ad42bd1e2a192c1d0974d630cea

The L2 at CONTRACT_REVIEW_TIER on this head is PASS with two should-fix findings open: comment 7152486548, claim 7152378467. Under the merge standard both are fixed and re-read before the hand-over, so this head is REWORK. Tier H (governed docs/adr/**). After a final ACCEPT plus a same-head L2 PASS, it goes to the seat for the maintainer. Never ready, queue or arm it here.

Should-fix (from the L2, adopted)

Nits (prose face; fix any in the same push, else each is an accepted deviation or a follow-up card)

L2 N1–N4 are in the record:

The seat's three questions (answered from the L2, which I adopt)

  • (a) NS-NAME via the face derivation, no new key. Sound: a pack name admits no -, so a face never equals a bare name, and nothing is added to D4's input or D8's arguments. It is in scope for an addendum, but it widens D6, so it is the maintainer's to accept (S2).
  • (b) A second holder refused through NAMESPACE_UNIQUE_TYPES. Sound, and in scope, since D2 as ruled already covers bucket 3. The list header reserves new types to the maintainer, so it needs the maintainer's own hand (S2).
  • (c) The root narrows before D3 picks. Right, and it needs no decision of its own. ADR-0160 D4 step 3 and its naming bound already require it.

Read and found right (head 1179369)

  • l1-face --pr 37209: 13 items clean or not yet measured. Draft, base main. Fixes #37180 binds only this card. skip-changeset is right: no published package is touched. The declarations are Clause-②: no · Metadata-protocol: none. At my read, CI had 24 success, 0 failed and 2 pending. The L2 later read 27 success, 23 skipped and 0 failed. mergeable_state was not yet computed at my read; the L2 reports the head merges cleanly into current main.
  • Fixes is right, once the findings close. The card asks for an ADR-0150 addendum putting ai_context in the package-scoped bucket beside skill, docs and ADR only, naming the readers that must move without moving them. The diff touches only the two ADRs, adds one dated D1 row and an addendum, rewrites no ruled sentence, and names readers 1–3 with "⛔ This addendum moves none."
  • Citations. All ten code paths and symbols the addendum cites exist in the tree. The anchors #d4 and #d8 resolve to ADR-0160's {#d4} / {#d8} headings. #addendum-2026-11-25-ai_context-joins-bucket-3 matches the new heading's slug.
  • The ADR-0160 cross-reference changes no sentence of that record, and the L2 finds it consistent with ADR-0160 as amended by docs(adr): ADR-0160 amended — a related child this caller is not served is left out; pack selection conditions; carried-text bound #37196.

Path to final ACCEPT

  1. Card thread: one prose push for S1 and S2, plus any nits.
  2. Zone: file the follow-up card (N3) and add Blocked-by on 记录 AI 问询 8:技能键 context,MCP 技能提示词可带记录参数 #37141.
  3. L1-w: a new claim, the same L2 reviewer reads the delta, and I read the L1 delta.
  4. Then the seat hands it to the maintainer as Tier H.

…re the maintainer's alone

The addendum's reading of the tree was taken before the context pack
type, its tool and the ADR-0160 amendment landed. Every "today" sentence
is re-measured on current main and reworded: the type and the pack
selection are cited as merged code, the showcase app's two packs are the
one first-party declarer and are not refused, and the follow-up card is
named with its order before the skill key.

The record now says who rules what. The face spelling in the context
argument widens D6, and admitting the type to the namespace-unique list
is reserved to the maintainer, so the addendum is ruled by the
maintainer's own merge or word. That the root narrows the candidates is
stated as following from ADR-0160 D4, not as a new decision.

Review nits folded in: the interim rule no longer says "one answer"
where an omitted context with a third pack gets the several-packs
answer; the overlays bullet says a package-less row under a shipped name
is not served; the no-hyphen premise of the face is anchored.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGufzi13yZRqVcp2mGonWK
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgv2LZN1W2qSYTZvYs

Contract-review-claim: session_01WGufzgv2LZN1W2qSYTZvYs · head deee29a · 2026-11-25T05:53Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgv2LZN1W2qSYTZvYs

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: deee29af32843420324bd0fa974337161838ba5f
Local-runs: none
Scope: docs/adr/0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md,docs/adr/0160-record-scoped-ai-inquiry.md + none
Security-touching: yes

Delta review of 11793695..deee29af, under claim comment 7154249113. It follows my record on 11793695 (comment 7152486548), which left S1 and S2 open and four nits, N1 to N4. The delta is a merge of main (0a1b69c0, as 783de611) and one prose commit over the two hits files. Against main the PR is still those two files, +44 / -1.

Read for this record: card #37180 and its thread, the PR body, the file list, the delta and the net diff, card #37216, and the check-runs on the head. The cited code was read on origin/main at a03c3d4e. That is one commit past the 0a1b69c0 the addendum is measured on, and that commit touches none of the cited paths.

Security-touching stays yes. The addendum still decides which pack names a refusal of get_record_context may show a caller.

① Derived judgments

  • Accept-sets and published surface: none move. The diff is two files under docs/adr/. ai_context is in none of the four lists on main, and the head changes no list. Right.
  • "No ruled sentence is rewritten": still right. In ADR-0150 the one changed line is the status line, and the change is one appended clause. The D1 table gains one dated row. In ADR-0160 one blockquote is added and no line is changed.
  • The readers are named and not moved: still right. The delta moves none.
  • Gate verdicts. Check-runs on the head: 27 success, 22 skipped, 0 failed, 0 pending. Check Documentation Links, Lint · docs & code guards, Check Changeset and Governed Surface Queue Guard are among the successes, so the two new symbol anchors resolve.

② Semver level

No changeset, and none is owed: docs/adr/ ships in no package. The PR carries skip-changeset, and Check Changeset is green on the head. Clause-②: no and Metadata-protocol: none are right.

③ Boundary flags

④ Design judgment

Closures, each read against origin/main.

S1: closed. The addendum is re-measured on main at 0a1b69c0, and every reworded sentence holds:

  • ADR-0160's status line reads Accepted.
  • The type and the pack selection are on main under the anchors cited: packages/spec/src/ai/ai-context.zod.ts#AiContextSchema and packages/services/service-record-context/src/read-set.ts#selectContextPack.
  • The skill key context is not in packages/spec/src/ai/skill.zod.ts.
  • ai_context is in none of the four lists.
  • The owner-stamp judge lists aiContexts.
  • The first-party count is right. examples/app-showcase is the one declarer: one package, two packs (showcase_project_brief on showcase_project, showcase_task_notes on showcase_task). objectstack-ai/hotcrm at b1ea6fcc holds no aiContexts.
  • No sentence still speaks of PR feat(ai): ai_context context packs and the get_record_context tool over MCP (ADR-0160 row 5) #37173 as open, or of 3b4f0b98.

S2: closed. The status clause and the addendum's opening both say the ruling is the maintainer's alone, by the maintainer's own merge or word. The D2 bullet and point 3 say that admitting a type to NAMESPACE_UNIQUE_TYPES is the maintainer's decision; that list's header still reserves it. The D6 bullet and point 1 say that a face as the value of an argument widens D6, and that context in ADR-0160 D4 and D8 then holds a face or a bare name. Point 2 is stated as no new decision, with ADR-0160 D4's step 3 and naming bound as its source. That matches D4's text on main.

N1: closed. The interim rule now matches selectContextPack case by case. A context that names the shared name answers duplicate (409). An omitted context answers duplicate when that is the only name on the root. It answers several, with the name listed once, when the root has another name. No branch takes a first match.

N2: closed. "Overlays" now says a package-less row under a name a package ships is not served. That is true on main: isSealedManagedItem holds for an item a package ships whose type opens no overlay channel, declinesStoredRow then declines the stored row, and the only exceptions are action and SEALED_ROW_SERVED_OVERRIDE_TYPES, which does not list ai_context. It also says the rule is read at (type, name) whatever the root, and gives #37216 the measurement.

N3: closed. Card #37216 exists and is open. It is what the text says: it adds ai_context to the four lists, moves the pack selection, declares the narrowings with counts, carries the overlay consequence, is blocked by #37209, and is to land before #37141. The addendum and the ADR-0160 note both name it.

N4: closed. The D6 bullet cites packages/spec/src/kernel/address-grammar.ts#ROUTER_ADDRESSABLE_NAME_PATTERN. The pack schema's name uses that pattern, and it admits no -.

New sentences in the delta. Each was read against the tree, and none is false.

The three points beyond the card. My judgment of the first round stands, and the delta changes none of the three designs. The face in context is sound. NAMESPACE_UNIQUE_TYPES is the right carrier for D2's refusal. The root narrowing follows from ADR-0160 D4. The addendum now puts the first two before the maintainer by name, which is where they belong.

No must-fix, no should-fix.

Implemented-by: claude/issue-37180-ai-context-package-scope-adr
Reviewed-by: session_01WGufzgv2LZN1W2qSYTZvYs

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzgv2LZN1W2qSYTZvYs

席位核对 — ACCEPT · repo:objectstack#3 · head deee29a · 2026-11-25T05:57Z

L1: ACCEPT (L1-w, delta read, zone ai-A)
Head-sha: deee29af32843420324bd0fa974337161838ba5f

No must-fix, no should-fix. The L2 at CONTRACT_REVIEW_TIER on this head is PASS with nothing open: comment 7154290067, claim 7154249113. It closes S1, S2 and N1–N4 of 7152486548. This PR is Tier H, because it touches governed docs/adr/**. It goes to the seat for the maintainer. ⛔ Never ready, queue or arm it here.

Delta 11793695..deee29af

The delta is a merge of main (783de611), then one prose commit. The net diff against main is still the two ADRs, +44/−1.

  • L2 S1 closed. "The tree today" is re-measured on 0a1b69c0:
    • ADR-0160 is Accepted;
    • row 5 has landed, with AiContextSchema and selectContextPack cited;
    • the skill key context has not landed (row 8);
    • ai_context is in none of the four lists;
    • the first-party count is restated against the showcase's two packs on two roots, and none in hotcrm b1ea6fcc.
  • L2 S2 closed. The opening paragraph and the status clause now make the addendum "the maintainer's alone to rule". Points 1 (the NS-NAME face as an argument value, widening D6) and 3 (admitting a type to NAMESPACE_UNIQUE_TYPES) are each marked "the maintainer's decision". Point 2 is stated as following from ADR-0160 D4, with D4's own step 3 and naming bound quoted.
  • Nits closed:
  • l1-face --pr 37209: 13 items clean. 27 success, 22 expected skips, 0 failed, 0 pending. mergeable_state clean. skip-changeset is right: no published package is touched.

Round 1's reads still stand: Fixes #37180, the citations and anchors, and an ADR-0160 note that changes no sentence of that record.

For the seat at hand-over

The maintainer's merge rules on the whole addendum. Points 1 and 3 under "Past the card's words" are the two decisions it asks of the maintainer by name. Row 8 (#37141) is blocked by #37216, and #37216 is blocked by this PR.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-support-ai · session_01WGufzi4PechTRCTBrfxV8W

维护者速读

Request: approval · Tier H by governed path (docs/adr/** ×2) · 2026-11-25T05:58Z

Seat's view: land. This is the ADR-0150 addendum that #37180 asks for. It puts ai_context in the package-scoped bucket beside skill, with a cross-reference note under ADR-0160 D1. It edits no code and moves no reader.


Generated by Claude Code

@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 25, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 25, 2026 06:08
@os-zhuang
os-zhuang enabled auto-merge November 25, 2026 06:08
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 6211ddf Nov 25, 2026
55 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-37180-ai-context-package-scope-adr branch November 25, 2026 06:29
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 pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

37140 跟进:资料包(ai_context)按包区分同名,补进 ADR-0150 的分桶表

3 participants