Repository navigation
Todo
Labels
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p2Medium: important, M3
Description
repo:objectstack#3 · os-support-ai · session_01WGufzi4PechTRCTBrfxV8W
Filing gate: ③ maintainer-directed (topic #36996 handed to seat 3). Source: step 3 of #37180, carried by the ADR-0150 addendum in PR #37209 ("Follow-up, one card, after the merge"), and nit N3 of the #37209 contract review (7152486548).
Grading: area:ai · Task · p2 (topic child; blocks row 8, #37141) · evidence: read.
Blocked-by: #37209
维护者速读
- 背景:ADR-0150 补充(docs(adr): ADR-0150 addendum — ai_context joins the package-scoped bucket beside skill #37209)定下「资料包按应用+名字认」,但只是声明,代码里资料包还按名字只认一份。
- 要做的:把
ai_context加进按包分桶的四张表,get_record_context选包时按应用+名字选;同名两个应用的包各自能被选到。 - 为什么排在 记录 AI 问询 8:技能键 context,MCP 技能提示词可带记录参数 #37141 前:记录 AI 问询 8:技能键 context,MCP 技能提示词可带记录参数 #37141(技能键
context)解析包名时用的解析器,对不在表里的类型直接报错。 - 要你做的:无(docs(adr): ADR-0150 addendum — ai_context joins the package-scoped bucket beside skill #37209 合并即是裁决)。
What
Measured on main at 886e9707.
- Add
ai_contextto the four lists the addendum names:PACKAGE_SCOPED_TYPES—packages/core/src/package-scoped-resolution.ts:245(the one rule;packages/objectql/src/package-scoped-resolver.ts:149throws for a type outside it);PACKAGE_SCOPED_READ_TYPES—packages/objectql/src/package-scoped-read.ts:88(the/metaby-name read and its?package=qualifier);PACKAGE_SLOTTED_METADATA_TYPES—packages/spec/src/api/protocol.zod.ts:2753(the metadata service's slot,packages/metadata/src/package-slotted-store.ts:797storeWriteKey; uninstallpackages/metadata/src/metadata-manager.ts:2880);NAMESPACE_UNIQUE_TYPES—packages/objectql/src/namespace-co-owner-names.ts:96(child N's install andos validaterefusal; its header reserves a new type to the maintainer, and the docs(adr): ADR-0150 addendum — ai_context joins the package-scoped bucket beside skill #37209 merge is that admission).
- Move reader 1, pack selection behind
get_record_context(packages/services/service-record-context/src/read-set.ts:65selectContextPack): candidates stay the packs rooted onobjectName;contextis read as a skill prompt's name is (packages/mcp/src/skill-prompts.tslookupSkillPrompt): a face (NS-NAME,deriveAiFaceName) answers its one pack; a bare name resolves by D3 as a caller with no package (environment pack, else the one package holder, else409naming each candidate by its face). Withcontextomitted, the "several" answer spells each name as its face. - Declare each narrowing with a measured count (
Clause-②: no (narrowing)arms): D2's install refusal of a second holder in one namespace; the/metaby-name read of a bare name two packages hold, which today serves the first (getItem) and becomes a refusal. - State and measure the overlay consequence (nit N2): a package-less
ai_contextrow under a name one package holds becomes that holder's customization and is not served (ai_contextis not inSEALED_ROW_SERVED_OVERRIDE_TYPES,packages/metadata-protocol/src/protocol-package-bindings.ts), and the rule is read at(type, name)while selection narrows by root, so an environment pack on another root stops being served when a package holding its name installs. That is ADR-0150 D4 as ruled forskill.
Acceptance
- Two packages each ship a pack of one name on one root: each is reached by its face; the bare name answers
409naming both faces; uninstalling one keeps the other. - A second holder of a pack name inside one namespace is refused at install and by
os validate. - Measured first-party refusals stated: today
examples/app-showcasedeclares two packs (showcase_project_brief,showcase_task_notes,examples/app-showcase/src/ai/record-context.ai-context.ts) in one package, andobjectstack-ai/hotcrmatb1ea6fccdeclares none, so the expected count is 0. - Lands before 记录 AI 问询 8:技能键 context,MCP 技能提示词可带记录参数 #37141 (row 8); triage adds
Blocked-by: <this card>on 记录 AI 问询 8:技能键 context,MCP 技能提示词可带记录参数 #37141.
Out of scope
- The skill key
contextitself (记录 AI 问询 8:技能键 context,MCP 技能提示词可带记录参数 #37141) and the in-app runtime (row 9, cloud#4978): they read the resolved pack by its face once this lands.
Parent: #36996. Related: #37180, #37209, #37140, #37141.
Dedupe words: ai_context PACKAGE_SCOPED_TYPES · context pack package-scoped · get_record_context pack selection face · PACKAGE_SLOTTED_METADATA_TYPES ai_context.
Generated by Claude Code
Metadata
Metadata
Assignees
Labels
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p2Medium: important, M3
Activity
objectstack-fleet commentedon Nov 25, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Triage: first touch 2026-11-25T04:12Z (repo:objectstack#3's request 7152609034)
Task. Addedpriority:p2,domain:serverandpm:blocked(Blocked-by: #37209, in the body).objectstack-fleet commentedon Nov 25, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Row added 2026-11-25T06:13Z, at repo:objectstack#3's request (mailbox #36743, 7154521857). It is a conformance gap against ADR-0160 D4 step 3 as amended by #37196. This card rewrites how
get_record_contextselects a pack, so the several-packs answer rides here.packages/services/service-record-context/src/sentences.ts:44(en) and:75(zh-Hans)severalPacksjoin the pack names alone. The amended D4 step 3 says each pack is named with its label. Done when both locales list each pack by name with its label, pinned for a pack with a label and one without (the fallback stated). The package-plus-name selection here may change how a pack is named, so write the sentence after that.Read on
main(the lines are confirmed), not yet measured through the tool.objectstack-fleet commentedon Nov 25, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Unlocked 2026-11-25T06:38Z. PR #37209 (the ADR-0150 addendum) merged.
pm:blocked→pm:queue. Goes to seat 3 zone ai-A. It also carries theseveralPackslabel row. #37141 (row 8) unlocks when this lands.objectstack-fleet commentedon Nov 25, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzi13yZRqVcp2mGonWK
Claim: PM loop round 7 (area:ai zone ai-A, topic #36996 non-cloud rows) · 2026-11-25T06:55Z
Session:
session_01WGufzi13yZRqVcp2mGonWKAccount:
os-support-aiBranch:
claude/issue-37216-ai-context-package-scopeWorktree:
objectstack-issue-37216Domain:
domain:serverSeat:
repo:objectstack#3Area: ai-A
File surface: the four lists (
packages/core/src/package-scoped-resolution.tsPACKAGE_SCOPED_TYPES :245;packages/objectql/src/package-scoped-read.tsPACKAGE_SCOPED_READ_TYPES :88;packages/spec/src/api/protocol.zod.tsPACKAGE_SLOTTED_METADATA_TYPES :2753;packages/objectql/src/namespace-co-owner-names.tsNAMESPACE_UNIQUE_TYPES :96, its type union and header) and the code those lists key where a new type needs a row;packages/services/service-record-context/src/**(read-set.tsselectContextPack:65, record-context-tools.ts several answer :265, sentences.tsseveralPacks:44/:75 with labels per the triage row 7154571964);packages/mcp/src/skill-prompts.tsonly to share the face lookup, never to change skill behaviour; the CLIos validaterow for D2's refusal if it is per-type; tests in card-named files unless the shared-harness rule says otherwise; generated spec artefacts;.changeset/.Container & model: L, mode:subagent, model: default, effort: high
Clause-②: no (narrowing) — declared by the ruled ADR-0150 addendum (PR #37209, merged by the maintainer 06:29Z): D2's install / os validate refusal of a second holder of a pack name in one namespace, and the
/metaby-name read of a bare name two packages hold turning from first match into a refusal; each with its measured first-party count (expected 0: examples/app-showcase holds two differently named packs in one package; hotcrm declares none). Reader 1 narrows nothing (the interim rule already refuses a shared name on a root). Owes the L2 at CONTRACT_REVIEW_TIER in L1-w.Metadata-protocol: narrowed
Responsibility:
n/a — not a defect card(the several-packs label row is a conformance gap against ADR-0160 D4 step 3 as amended by #37196; owner: service-record-context in objectstack; no other path covers it; every MCP caller who omitscontexton a root with several packs, no first-party root has several today)Thread-read: 7155008959
Premise: holds. Re-measured at d7f299c: the four lists and
selectContextPacksit at the card's lines;ai_contextis in none of the four lists;severalPacksjoins names only (sentences.ts:44, :75). The ruling the card executes is the merged ADR-0150 addendum (6211ddf).Serial constraints cleared:
Blocked-by: #37209merged 06:29Z. This zone's #37243 (in flight) edits both doors'listContextPacksand the door.ts docblock, not read-set.ts / sentences.ts; #37233 (queued) will touch body-outline / sentences.ts and goes after this. Overlap check runs at the first push and before each push.Pre-claim lane:
domain:server(core, objectql, service-record-context); the spec list row stays here by the lane-keep rule and owes the L2.Pre-claim deps:
Blocked-by: #37209, met (merged 6211ddf)Prior rulings read: ADR-0150 addendum of 2026-11-25 (merged, points 1–3 accepted by the maintainer's merge), ADR-0150 D2–D5, D9; ADR-0160 D4 step 3 as amended by #37196; none conflicting
Done when: two packages each ship a pack of one name on one root: each reached by its face, the bare name answers 409 naming both faces, uninstall keeps the other; a second holder in one namespace refused at install and by
os validate; the several-packs answer names each pack with its label in both locales; narrowing counts stated in the PR; #37141 is told it may start.objectstack-fleet commentedon Nov 25, 2026
repo:objectstack#3 · os-support-ai · session_01WGufzi13yZRqVcp2mGonWK
Release: hand-off · 2026-11-25T07:50Z · zone ai-A of seat repo:objectstack#3 stops this card on the maintainer's order (「那这个新任务就可以停了」「只处理收尾的」, 2026-11-25 07:48Z). Released, not finished; no PR.
claude/issue-37216-ai-context-package-scopeat5162430c, based7f299c0, 5 commits. Resume from it.Clause-②: no (narrowing)·Metadata-protocol: narrowed·Skills-docs: follow-up #37177. Narrowings, each measured at 0 first-party (objectstackd7f299c0: the one declarer, examples/app-showcase, holds two differently named packs in one package; hotcrm9b735103: none): D2's install /os validaterefusal of a second holder in one namespace; the/metaby-name read of a bare name two packages hold (first match → refusal); a package-less row under a held name. Owes the L2 at CONTRACT_REVIEW_TIER and the dogfood battery for the narrowing arm.ai_contextin all four lists:PACKAGE_SCOPED_TYPES(core),PACKAGE_SCOPED_READ_TYPES(objectql),PACKAGE_SLOTTED_METADATA_TYPES(spec),NAMESPACE_UNIQUE_TYPES(objectql, union and header noting the addendum's admission); the pins that enumerate these types updated (objectql full suite green, core green).read-set.ts):contextPackCandidatesgives each pack its holder (_packageId; the sys_metadata sentinel = environment) and its face (deriveAiFaceName);selectContextPacknarrows to packs rooted onobjectName, then a face answers its one pack, a bare name resolves by D3 as a caller with no package (environment pack, else the one holder, else 409 naming each face), a face two packs derive is refused naming each holder;RecordContextDoorgains an optionalpackageNamespacemember; the tool description teachesNAMESPACE-NAME. service-record-context tests 82/82, typecheck clean.packages/metadata-protocol/src/protocol.reads-environment-only.test.tswith a control (result unread, see owed)..changeset/37216-ai-context-package-scoped.md(spec, core, objectql, service-record-context minor), markerai-context-package-scoped-name.packages/metadatapins the slot list turned red:metadata-manager-keyed-plural-read.test.ts(the live slotted-set enumeration needsai_context);database-loader.test.tsmetadata: the boot priming pass primes one holder per name for unbundled slotted types, so a bare read of a two-holder name answers the last row saved instead of 409 (epic red line 2) #32521 priming, twoai_contextcases asserting the pre-slot behaviour (re-read them as slotted).packageNamespace(packages/runtime/src/domains/mcp.tsviapackageNamespaceOf,packages/mcp/src/stdio-data-bridge.ts), after get_record_context finds no context pack a real protocol serves: getMetaItems adds _diagnostics, the strict AiContextSchema parse drops every pack #37243 lands in the same regions; without them a real door spells package packs by bare name and same-name packs are not reachable by face. This widens the claimed surface.packages/spec/src/migrations/entries/semantic/18.ai-context-package-scoped-name.ts(check:adr-0087-registrationis red until it exists).Fixes #37216.record-context-tools.zod.ts'scontextdescribe still says "by name"; the addendum makes it a face or a bare name.objectstack-fleet commentedon Nov 25, 2026
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr
Claim: PM loop round 6 · 2026-11-25T08:45Z · resume (topic #36996 non-cloud rows, handed to seat 4 by triage 7157351103)
Area: a4-A
Session:
session_01QSeKYo86w1wqy2z2fMrryrAccount:
os-justinBranch:
claude/issue-37216-ai-context-package-scope(resumed)Worktree: the cloud session's own checkout
Domain:
domain:serverSeat:
repo:objectstack#4Resume-from:
claude/issue-37216-ai-context-package-scope@5162430c2bdbd77af2efd661ef63eb7687897d70(hand-off 7156321844; head re-read unchanged, 4 behindmain)File surface: as claim 7155305628 (the four lists and the code they key;
packages/services/service-record-context/src/**;packages/mcp/src/skill-prompts.tsonly to share the face lookup; the CLIos validaterow for D2's refusal; tests; generated spec artefacts;.changeset/), plus what the hand-off's owed list adds: the threepackages/metadatapins (metadata-manager-keyed-plural-read.test.ts,database-loader.test.ts), the metadata-protocol §5 pin, the ADR-0087 semantic entrypackages/spec/src/migrations/entries/semantic/18.ai-context-package-scoped-name.tsand its registration, and both doors'packageNamespace(packages/runtime/src/domains/mcp.ts,packages/mcp/src/stdio-data-bridge.ts) — the doors only after PR #37255 (#37243) merges (stop on breach; explain in the report)Container & model:
L,mode:cloud,model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate),effort: highClause-②: no (narrowing) — declared by the ruled ADR-0150 addendum (PR #37209, merged): D2's install /
os validaterefusal of a second holder of a pack name in one namespace; the/metaby-name read of a bare name two packages hold (first match → refusal); a package-less row under a held name; each measured at 0 first-party (hand-off 7156321844). Owes the L2 at CONTRACT_REVIEW_TIER (packages/spec/src/api/protocol.zod.ts) and the dogfood battery for the narrowing arm.Metadata-protocol: narrowed
Responsibility:
n/a — not a defect cardThread-read: 7156321844
Premise: holds (hand-off 7156321844; the backup branch carries the four lists, the selection and the several-packs labels; owed items 1–5 as listed there)
Serial constraints cleared:
overlap-check at 5162430c vs origin/main 1b91538bb2 and open PR #37255 (shares service-record-context/src/door.ts): VERDICT clean exit 0; the door step (owed 3) waits for PR #37255 to merge, then mergesmainfirstPre-claim lane:
domain:server(core, objectql, metadata, service-record-context, runtime, mcp); the spec row stays here by the lane-keep rule and owes the L2Pre-claim deps:
Blocked-by: #37209— mergedPrior rulings read: ADR-0150 addendum (PR #37209, merged by the maintainer), ADR-0150 D2–D5, D9; ADR-0160 D4 step 3 as amended by #37196
objectstack-fleet commentedon Nov 25, 2026
repo:objectstack#4 · os-justin · session_01QSeKYo86w1wqy2z2fMrryr
Dispatched · 2026-11-25T08:46Z ·
mode:cloud: cloud sessionsession_01QSeKYohZLmQ1Ug9FKcQtVu(TIER_DEFAULT, effort high), outcome branchclaude/issue-37216-ai-context-package-scope, resumed from5162430cunder claim 7157432984. It does the hand-off's owed items 1, 2, 4 and 5; item 3 (both doors'packageNamespace) waits for PR #37255 (#37243) to merge and is reported as owed if it has not. The contract review at CONTRACT_REVIEW_TIER runs after the draft PR, in a separate session.