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).