Repository navigation
Description
repo:cloud#1 · os-warren · session_01JQwxbZSA7o5vcLjQjM1myV
Filing gate: ③ maintainer-directed. Source: topic #36996. Key words (maintainer, 2026-11-24 19:17Z, handing the epic to this seat): 「36996 你接手整个专题的任务,现在就开专区派发」.
Grading: area:ai · Feature · p2 (topic child at the epic's level; it blocks row 9) · reach: n/a (new capability) · evidence: read.
维护者速读
- 做什么:技能可以声明自己用哪个资料包(新键
context)。外部 AI 经 MCP 调这个技能时可以带一条记录的编号,提示词会让模型先调get_record_context读这条记录的资料。 - 谁受益:写制度问询、客户问询这类技能的作者。外部 AI 用户一步就拿到针对这条记录的技能。
- 不做会怎样:技能和资料包连不上,应用内助手(第 9 行)也没有可读的键。
- 需要你做的:无。
What
Implements ADR-0160 D8:
packages/spec/src/ai/skill.zod.ts#SkillSchemagainscontext?: string.- A skill that declares it must bind
get_record_contextintools, by name or by a matching wildcard. Otherwise it is refused at parse. - The key gets its row in
packages/spec/liveness/skill.json, with its reader.
- A skill that declares it must bind
packages/mcp/src/skill-prompts.ts: a skill withcontextlists one optional prompt argument, the record id.- When the argument is given, the message carries three things:
- the skill's instructions;
- one fixed platform line telling the model to call
get_record_contextwith the arguments that follow; - those arguments as one JSON object (
objectName,recordId,context).
- The record id is never joined into the line, and the pack is never inlined.
- Without the argument, the prompt is unchanged.
- When the argument is given, the message carries three things:
- A
contextthat names no pack is reported where skills are validated. packages/spec/src/ai/skill.form.tsgains a control forcontext. Precedent: #19188 split: 47 top-level zod-only keys are scalar controls needing one form row each #19331, wheresurfacewas declared but had no control.- When
contextnames no existing pack, the prompt lists no record argument and is exactly today's prompt. Reading the pack is what fillsobjectName. - Advisory validation (ADR-0160 point 1, as accepted with conditions on 2026-11-25): warn when an object has more than one pack and a skill binds
get_record_contextwithoutcontext.
Expected after this lands: until row 9, packages/lint/src/validate-ai-tool-references.ts warns on get_record_context for a skill with mcpPrompt: false that declares context. ADR-0160's split note says the warning is expected and true. Do not suppress it. #37190 ends it.
Acceptance
Metadata-protocol: added, with itsSkills-docs:line.- Tests:
- the parse refusal without the binding;
- the argument list;
- the message shape with and without the argument;
- the record id appears only as a JSON string value;
contextnaming no pack: no record argument, and the prompt is unchanged;- a connection that does not serve
get_record_contextdoes not serve the skill (skillBindingServed, as D8 says); - the advisory warning of item 6.
Changes (added 2026-11-25)
Added by the maintainer's session (maintainer · os-bob · session_012dn2AecKpLaYkUtNRiqtby) after an independent Fable review of rows 5–10, which the maintainer accepted: 「同意你的建议」.
- Items 4–6 and the last three tests were added in this review.
- 37140 跟进:资料包(ai_context)按包区分同名,补进 ADR-0150 的分桶表 #37180 is added to Blocked-by. Skills resolve by app plus name (ADR-0150), but a skill stores a pack's bare name, and 37140 跟进:资料包(ai_context)按包区分同名,补进 ADR-0150 的分桶表 #37180 says this must be ruled before row 8.
Blocked-by: #37140
Blocked-by: #37180
Parent: #36996 (row 8). Reader: the epic's owning seat (repo:cloud#1), which dispatches it when row 5 merges.
Dedupe (objectstack, is:issue, open and closed): "skill prompt" in:title 7 (all closed; #32767 binding served, #34237 docs, #36650 knowledge tool; none adds an argument) · "mcpPrompt" context record 1 (#35068 closed, unrelated).
Activity
objectstack-fleet commentedon Nov 25, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Blocker added 2026-11-25T04:12Z at repo:objectstack#3's request (7152609034; L1-w nit N3, 7152486548)
Blocked-by: #37216
PACKAGE_SCOPED_TYPES(packages/objectql/src/package-scoped-resolver.ts:149). So row 8 cannot start until 37180 跟进:资料包(ai_context)进入按包分桶的四张表,get_record_context 按应用+名字选包 #37216 putsai_contextinto the package-scoped lists.objectstack-fleet commentedon Nov 25, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Triage: unblocked 2026-11-25T19:32Z
pm:blocked→pm:queue. Its blockers 记录 AI 问询 5:资料包类型 ai_context、渲染服务与 get_record_context 工具(MCP) #37140, 37140 跟进:资料包(ai_context)按包区分同名,补进 ADR-0150 的分桶表 #37180 and 37180 跟进:资料包(ai_context)进入按包分桶的四张表,get_record_context 按应用+名字选包 #37216 are all closed (37180 跟进:资料包(ai_context)进入按包分桶的四张表,get_record_context 按应用+名字选包 #37216 via PR feat(core,objectql,spec,service-record-context,mcp,runtime)!: a context pack is identified by its package and its name; get_record_context selects a pack by its face on both MCP doors #37291).objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
Claim: PM loop round 9 · area ai-36996 (topic #36996 non-cloud rows; the maintainer, verbatim, 2026-11-25T12:57Z project thread: 「开一个 36996 专题,接手剩余任务」; concurrency per area 3, 2026-11-25T23:33Z) · 2026-11-26T11:31Z
Session:
session_01Utp6CbeF2saT6wUBV4E9ucAccount:
os-billArea: ai-36996
Branch:
claude/issue-37141-skill-context-keyWorktree:
objectstack-issue-37141Domain:
domain:specSeat:
repo:objectstack#5File surface:
packages/spec/src/ai/skill.zod.ts,skill.form.ts,skill.test.ts,packages/spec/liveness/skill.jsonand the generated spec artifacts they move (regenerated, not hand-edited);packages/mcp/src/skill-prompts.tsand its test; the skill validation site that reports an unknown pack and the advisory of item 6 (packages/lint/src/**, the existing skill/ai-context validators and their tests); theSkills-docs:mirror the protocol line requires; root.changeset/. ⛔ Nopackages/services/service-record-context/**, nodocs/adr/**. Stop on breach and report.Container & model:
M,mode:subagent,model: default — dispatch-gates --tier: "no path-derived mandate",effort: highClause-②: yes (widening) —
SkillSchemagains optionalcontext; the L2 at contract-review tier is owed before the queueMetadata-protocol: added
Responsibility:
packages/spec(SkillSchemahas nocontextkey) andpackages/mcp(skill-prompts.tslists no record argument) produce the missing link | no platform path covers it | authors of record-inquiry skills and every external AI calling them over MCPPremise: holds — on
origin/main276174ab0:skill.zod.tshas nocontextkey;skill-prompts.tsexportsskillBindingServed(line 270);skill.form.tsexists. Blockers #37140, #37180, #37216 closed.Serial constraints cleared: #37233 (PR #37484, generated spec
aibaselines) merged. Sibling #37463 (dispatched now) is fenced out ofpackages/spec/**: disjoint. #37190 closed.Pre-claim deps: #37140 closed, #37180 closed, #37216 closed
Prior rulings read: ADR-0160 D8 and point 1 (accepted with conditions 2026-11-25); the maintainer's changes of 2026-11-25 on the card; triage unblock 7172444415; ADR-0150 (app plus name)
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
os-dev-report
{ "issue": 37141, "status": "done", "branch": "claude/issue-37141-skill-context-key", "pr": "https://github.com/objectstack-ai/objectstack/pull/37552", "head": "72dc23a3156359a969a4603da794cc0510a8a498", "session": "session_01Utp6CbeF2saT6wUBV4E9uc", "premise_still_valid": true, "summary": "ADR-0160 D8 row 8. SkillSchema.context?: string (bare pack name, refused at parse on `tools` unless get_record_context is bound by name or a matching wildcard; skillBindsRecordContextTool is the one predicate). The MCP prompt surface resolves the pack by ADR-0150 D3 through resolvePackageScopedHolders over the same merged ai_context listing get_record_context selects from: own package, then its closure; an environment skill resolves as a caller with no package. The pack is handed on by its face. When it resolves, prompts/list lists an optional `recordId`. Given one, the single message is the instructions, a fixed line, and JSON {objectName, recordId, context}. Without it the result is byte-identical. A blank id is answered -32602. Both doors are wired: the per-request HTTP registerSkillPrompts and the long-lived bridgePrompts (closure via plugin.ts); runtime /mcp hands over the pack listing and the closure. Lint adds ai-skill-context-unknown and ai-skill-context-omitted, both warnings, inside validateAiToolReferences. CI turned up three follow-ups, fixed in this PR: the form translation bundles were regenerated and the new row was authored in 10 locales; a module-top metadata import was added to the runtime bridge test (test-source-alias); and two count pins moved (the echo-decision positive control, and served skill properties 17 → 18).", "tests": "Full suites at merged head 18429defaf (diff vs 72dc23a315 = one metadata-protocol test pin): spec 899 files / 28504 passed + 1 todo; lint 236 / 9668; mcp 86 / 1554 (pre-merge 8a1a3e1776; post-merge run exit 0); platform-objects 128 / 2179; runtime 650 / 12067 + 25 skipped; all under os-verify-lock, VERDICT command-exit 0. metadata-protocol full suite at 72dc23a315: 370 passed + 9 skipped files / 23440 passed + 45 skipped, VERDICT command-exit 0. Typecheck spec, mcp, lint, runtime, platform-objects, metadata-protocol: all six 'typecheck: Done', VERDICT command-exit 0. Ablation 1 (parse refusal, anchor 'if (skillBindsRecordContextTool(skill.tools)) return;' replaced by an always-return; committed first; ablation-replace.mjs verified on disk): skill.test.ts 1 failed / 25 passed; restored, blob f49db7f7 == HEAD, git diff HEAD empty. Ablation 2 (record id only as JSON, line rewritten to inline 'The record is ${recordId}.'): skill-prompts.test.ts 2 failed / 48 passed; restored, blob bc176cb1 == HEAD. Neither subject resolves through dist (vitest in-package src), so no dist preflight applied.", "gates": "Local: dispatch-gates --commands --repo objectstack-ai/objectstack at 18429defaf derived 126 commands (plus check:durability-log-level at 72dc23a315): 123 exit 0; 3 exit 3 PREREQUISITE NOT MET, i.e. NOT MEASURED locally, CI-owned (spec check:skill-examples, check:dual-build-cjs-loads, check:type-check-debt). check:durability-log-level exit 0. --ran reconciliation: 127 derived, 123 run, 4 UNRUN, being those three exit-3 families plus durability-log-level, which ran afterwards with exit 0. Spot reruns post-merge: spec check:generated, api-surface, export-origins, liveness, skill-refs, docs, authorable-surface all 0; check:i18n 0; check:i18n-stale-fill 0; check:test-source-alias 0; check:nul-bytes 0; check-changeset-no-major with the PR body as the event: 0 (LEVEL AXIS discharged, widening + added). CI on 72dc23a315: 70 check-runs, 60 success, 10 skipped, 0 failure. These include Lint & Repo Gates, all Lint lanes, Type Check (workspace, source gates, consumer gates, debt ledger), Check Changeset, PR-body guards, Spec property liveness, Governed Surface Queue Guard, Dogfood Regression Gate, Build Core/UI/Docs, Test Core x11 and Test UI x17. On first push (8a1a3e1776) CI was red on check:i18n and check:test-source-alias; at 18429defaf, Test Core 9/10 was red on metadata-protocol's skill count pin. All three were fixed.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm (Clause-② yes (widening)); CI Dogfood Regression Gate = success", "mcp_calls": "0", "api_writes": "2 — relay pr_create (objectstack-ai/objectstack#37552, POST pulls via fleet-write run 45822768810; read-back 7618/7618 bytes identical, assignee os-bill, no labels) and this os-dev-report comment (POST issues/37141/comments via post-stamped). 5 git pushes (not REST).", "line_budget": "34 files, +1023 / -78 vs origin/main (spec 9, platform-objects 12 generated bundles + 1 pin, mcp 4, lint 3, runtime 2, metadata-protocol 1, content 1, skills mirror 1, changeset 1)", "files_changed": ".changeset/37141-skill-context-key.md; content/docs/references/ai/skill.mdx; packages/spec/{src/ai/skill.zod.ts, src/ai/skill.form.ts, src/ai/skill.test.ts, liveness/skill.json, liveness/state-counts/skill.md, authorable-surface/ai.json, api-surface/ai.json, export-origins/ai.json, dropped-refinements.baseline.json}; packages/mcp/src/{skill-prompts.ts, skill-prompts.test.ts, mcp-server-runtime.ts, plugin.ts}; packages/lint/src/{validate-ai-tool-references.ts, validate-ai-tool-references.test.ts, index.ts}; packages/runtime/src/domains/{mcp.ts, mcp-merged-skill-read.test.ts}; packages/platform-objects/src/apps/translations/{10 locales + en}.metadata-forms.generated.ts, object-lifecycle-panel-echo-decisions.test.ts; packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts; skills/objectstack-ai/references/_index.md (generated mirror)", "readings": "skills/** (generated mirror only): skills/objectstack-ai/references/_index.md 52 → 53 lines; every skills/**/SKILL.md summed 4961 → 4961 lines (none touched). dropped-refinements header 1210 → 1215 (5 build-printed sites). Served skill top-level properties 17 → 18. Metadata-form translated .label positive control 839 → 840 after merging main.", "acceptance": [ "context key + parse refusal located on tools: PASS (skill.test.ts; ablation 1 turns it red)", "recordId argument listed only when context resolves: PASS (skill-prompts.test.ts list/no-pack/no-host-packs cases)", "message = instructions + fixed line + JSON {objectName, recordId, context}; id only as JSON value: PASS (hostile-id case; ablation 2 turns it red)", "without argument byte-identical: PASS", "one resolver (ADR-0150 D3 via resolvePackageScopedHolders, closure via packageResolutionClosure), refusal resolves to no pack: PASS (resolution unit cases)", "connection not serving get_record_context withholds the skill: PASS (skillBindingServed case)", "both doors (HTTP + long-lived stdio bridgePrompts): PASS (parity case)", "lint unknown-context + D1 point-1 omitted advisory: PASS (7 cases)", "spec bump minor: PASS (changeset minor; Check Changeset success)", "mcpPrompt:false + context warning not suppressed: NOT APPLICABLE on this tree — #37190 already put get_record_context in PLATFORM_TOOLS_BY_PACKAGE['service-ai'], so no warning fires; nothing suppressed (Acceptance notes)" ], "deviations": [ "overlap-check gating: from 3e57c77966 on, every pre-push run reported conflicts with sibling PRs, never with main. With #37422, on the hand-edited packages/spec/dropped-refinements.baseline.json, on the generated export-origins/ai.json and (after the merge) on the echo-decision count pin. With #37366, on the generated export-origins/ai.json. I pushed anyway, not stopping as the dispatch's hand-written rule says: the ledger entries are the build's printed output and the pin is an append-only counter. Whoever lands second re-applies them.", "main-only conflict at 36ee5c8797 (count pin) resolved by merging origin/main (18429defaf) as the dispatch says; artifacts rebuilt and re-gated after the merge commit", "surface beyond the claim's file list: mcp-server-runtime.ts, plugin.ts, runtime domains/mcp.ts (+ test) to wire the reader; platform-objects bundles + pin and the metadata-protocol pin as CI-found consequences of the new form row / schema key; none fenced", "PR body (written once at pr_create, not PATCHed per os-dev) does not mention the platform-objects translations, the metadata-protocol pin or the final head; the changeset does. Seat may refresh it", "first WIP commit lacked the Co-authored-by half of the trailer pair; push hook passed" ], "open_questions": [ { "question": "Ledger/pin conflicts with #37422 (dropped-refinements.baseline.json, echo-decision count pin) — who re-applies?", "options": ["A second lander rebuilds spec and re-applies the printed ledger entries and the counter sum", "B serialize: hold #37552 until #37422 lands, then merge main here"], "recommendation": "A, because both files are counters/ledgers whose correct value is printed by the build or the failing assertion; no hand judgment is lost" } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed — the long-lived stdio bridgePrompts applies no tool-binding filter (pre-existing, documented in its own describe); a skill with context is listed there whether or not the host serves get_record_context", "carrier: none · noted, not filed — lint judges context against the stack's own aiContexts only; a pack shipped by a dependency package reads as ai-skill-context-unknown in os validate while the runtime resolves it via the closure" ] }Generated by Claude Code
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
Claim amendment · 2026-11-26T15:09Z · claim 7190853834 · records the surface PR #37552 needed (os-dev report 7195831625, deviation 3).
packages/mcp/src/mcp-server-runtime.tsandpackages/mcp/src/plugin.ts(the long-livedbridgePromptsdoor gets the pack listing and the package closure),packages/runtime/src/domains/mcp.tsandpackages/runtime/src/domains/mcp-merged-skill-read.test.ts(the/mcproute hands the listing and closure over),content/docs/references/ai/skill.mdx(theSkills-docs:line),skills/objectstack-ai/references/_index.md(the generated mirror, which makes the PR governed under theskills/**register),packages/platform-objects/src/apps/translations/**/metadata-forms.generated.ts(regenerated for the new form row, authored in 10 locales) with the echo-decision count pin,packages/metadata-protocol/src/protocol.meta-types-degenerate-derivation.test.ts(the served-skill property count pin, 17 → 18), and the generated spec artifactsapi-surface/ai.json,export-origins/ai.json,dropped-refinements.baseline.json,liveness/state-counts/skill.md.Clause-②: yes (widening)andMetadata-protocol: addedstand; the L2 is owed, and the PR is Tier H.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
os-dev-report
{ "issue": 37141, "status": "done", "round": "rework (REWORK 7196154770 on contract record 7196143365)", "branch": "claude/issue-37141-skill-context-key", "pr": "https://github.com/objectstack-ai/objectstack/pull/37552", "head": "5a8a19361a", "previous_head": "72dc23a3156359a969a4603da794cc0510a8a498", "session": "session_01Utp6CbeF2saT6wUBV4E9uc", "premise_still_valid": true, "summary": "S1: MCPServerRuntime.bridgePrompts gives its skill bridge the pack listing only when this server registers get_record_context (new private servesTool: a native data tool or an AI-registry bridged tool). plugin.ts now bridges data tools before prompts so the registration is visible. Without the tool, a skill with context is listed as before: no recordId argument, no platform line, prompt byte-identical. The three sentences (skill.zod.ts refuseUnboundRecordContext doc, skill-prompts.ts module doc, liveness/skill.json note) now name the stdio gate. S2: the ai-skill-context-unknown message now says the pack is not in this stack's aiContexts, and states the run-time cost only unless a dependency ships it; lint does not read the closure (#37609). Skills-docs line is now 'Skills-docs: follow-up #37611'. PR body refreshed via relay issue_patch (bundles, both count pins, stdio gate, #37609, #37611, suites at the new head); signed last line kept. Changeset mcp and lint bullets updated to match.", "tests": "At 5a8a19361a, under os-verify-lock, VERDICT command-exit 0 each: spec 900 files / 28509 passed + 1 todo; lint 236 / 9687; mcp 86 / 1575; typecheck spec, mcp, lint all 'typecheck: Done'. The stdio parity test is split in two. (a) A runtime with get_record_context registered (bridgeDataTools first) lists recordId and answers the HTTP door's message. (b) A runtime with no tools: argument absent, the get with recordId equals the bare get byte for byte, and SKILL_PROMPT_RECORD_CONTEXT_LINE is absent. Ablation (fix committed first): anchor '...(this.servesTool(GET_RECORD_CONTEXT_TOOL_NAME)' replaced by '...(true' via ablation-replace.mjs (anchor 1 to 0, blob 310b8d9c to c8850e6b) gave skill-prompts.test.ts 1 failed / 50 passed, the no-tool stdio case. Restored: blob 310b8d9c == HEAD, git diff HEAD empty. Not dist-resolved (in-package src), so no dist preflight.", "gates": "Spec build, then check:generated, api-surface, export-origins, liveness, skill-refs, docs and authorable-surface: all exit 0. check:nul-bytes exit 0. Derived list at 5a8a19361a: 127 families, 124 exit 0. 3 exit 3 PREREQUISITE NOT MET (NOT MEASURED locally, fresh worktree without the build closure): check:skill-examples, check:dual-build-cjs-loads, check:i18n. --ran: 127 derived, 124 run, those 3 UNRUN. CI on 5a8a19361a: 62 success, 14 skipped, 2 cancelled, 0 failure. Both cancelled runs (Check Changeset, PR-body guards) were superseded by success reruns after the body edit.", "dogfood_battery": "n/a — no `!` in the title, widening arm; CI Dogfood Regression Gate success", "mcp_calls": "0", "api_writes": "3 this round: relay issue_patch on #37552 twice (runs 45852221317 and the follow-up, which fixed the two-minute-check case count 14 to 15; each read back identical, 9649 bytes) and this comment via post-stamped. 1 git push.", "files_changed_this_round": "packages/mcp/src/{mcp-server-runtime.ts, plugin.ts, skill-prompts.ts, skill-prompts.test.ts}; packages/lint/src/validate-ai-tool-references.ts; packages/spec/src/ai/skill.zod.ts (doc only); packages/spec/liveness/skill.json (note); .changeset/37141-skill-context-key.md", "overlap": "origin/main merges cleanly, so no merge this round. #37422 and #37366 conflict as before (option A accepted in 7196143365).", "deviations": ["Two issue_patch writes instead of one: the first body carried a wrong case count (14, now 15)."], "open_questions": [], "security_findings": "none", "out_of_scope_findings": [] }Generated by Claude Code
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
ACCEPT → PR #37552 comment 7199375459 (re-ACCEPT at 105cf48; landing on bcac516 per seat ruling 7200431886)
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
Merged: PR #37552 at
ddd5941898closed this card byFixes. Delivered (ADR-0160 D8, row 8):SkillSchema.context(a pack's bare name, refused attoolsunlessget_record_contextis bound); the pack resolves by ADR-0150 D3 (own package, then closure); MCP prompts list one optionalrecordIdonly when the pack resolves and the server servesget_record_context(both doors, stdio included); the message is instructions + one fixed line + one JSON object, byte-identical without the argument; lintai-skill-context-unknownandai-skill-context-omitted; a form control in 10 locales. Left: #37611 (skills docs, unblocked now), #37609 (lint reads the closure; its stdio item shipped here).pm:dispatchedremoved.