Repository navigation
feat(spec, mcp): a skill written for the in-product agents only opts out of MCP prompts with mcpPrompt: false - #34236
Conversation
…t: false Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude <noreply@anthropic.com>
…slations Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude <noreply@anthropic.com>
…e skill form's MCP prompt toggle Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 178 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 54aeda480b06bc4c71251a99c482aef9ce3a567c && git checkout 54aeda480b06bc4c71251a99c482aef9ce3a567c
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 36c0e96aa0ad1195293a5997e96fb88341815802 c53ea9d14701a0667f423e0d45b7c6749bd57f20 && git checkout -B drift-repro 36c0e96aa0ad1195293a5997e96fb88341815802 && git merge --no-ff c53ea9d14701a0667f423e0d45b7c6749bd57f20
node scripts/docs-audit/affected-docs.mjs --json 36c0e96aa0ad1195293a5997e96fb88341815802
|
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx Contract-review-claim: session_01L9qibzuZJBQY4wUQFJbkfx · head 50ccfc4 · 2026-11-16T01:48Z |
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx Contract reviewServed-tier: Read from card #34167 (body and its three comments), the PR body and file list, the net diff Check-runs at this head, at the last read: 19 concluded ① Derived judgments
② Semver levelClause-②: yes (widening). Correct, and the PR body and changeset agree. AGENTS.md, Post-Task Checklist item 3: a kind takes at least One sentence of the changeset body is wrong against the tree: it says the form offers the toggle "in its Basics section". ③ Boundary flags
④ Design judgment
Finding 1, should-fix. The "never, on every connection, stdio included" sentence is false for a skill switched off while the stdio server is running.
Finding 2, should-fix. The toggle shows "off" for every skill that is in fact offered. The field is a bare boolean, and Studio's Finding 3, nit. The changeset body and the PR body say the toggle is in the form's "Basics" section; it is in "AI Instructions". One word in the changeset, which ships as CHANGELOG text. No effect on the contract. Finding 4, nit. The new field sets
Findings 1 and 2 earn a delta review. Neither is a must-fix. Implemented-by: VERDICT: PASS |
…y; the skill form leaves the key to source Claude-Session: https://claude.ai/code/session_01L9qiby4dRyeuWrpDd4sZKx Co-Authored-By: Claude <noreply@anthropic.com>
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx Contract-review-claim: session_01L9qibzuZJBQY4wUQFJbkfx · head c53ea9d · 2026-11-16T02:41Z |
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx Contract reviewServed-tier: Delta review of record 6905137383 for the hop The hop is one commit on top of the reviewed head, with no rebase. Check-runs on ① Derived judgments
② Semver levelClause-②: yes (widening). Unchanged and correct. The changeset is now ③ Boundary flags
④ Design judgmentFinding 1 (stdio window): closed.
The new pin drives the real client and server pair, swaps the store after boot, and compares the answer with an unknown name's. Finding 2 (form toggle): resolved, correctly and honestly. The control is gone, not replaced by one that misreports. The ledger row's reason holds against the form kit as read: the boolean branch of Nit 3 (the "Basics" sentence): closed. The sentence is gone from the changeset. Nit 4 ( New, nit A. Three summary sentences still carry the unqualified "never listed". The New, nit B. The ledger's header prose still counts its root reasons ("three reasons ... a fifth ... three more were ruled"); the new row is a further reason the prose does not mention.
No must-fix and no should-fix. Nits alone: the round ends here. Implemented-by: VERDICT: PASS |
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx Test Core (3/8) at
If it fails the same way again, it is real, and the seat diagnoses it and files it with its full signature. · 2026-11-16T03:08Z |
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx 维护者速读 · PR #34236 @
|
domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx
Requested by Tesla · project thread
Fixes #34167
Clause-②: yes (widening)
Metadata-protocol: added
Skills-docs: follow-up #34237
维护者速读
SkillSchema新增可选布尔键mcpPrompt。设为false的技能永远不会作为 MCP 提示词出现:prompts/list不列出,prompts/get按未知名称回答,HTTP 与 stdio 两条路径、任何连接、无论绑定哪些工具都一样(stdio 的列表在启动时取一次,运行中改成false的技能列表里留到重启,但 get 立即按未知回答)。record_writing、actions_executor绑定的工具 MCP 也同名提供,却教模型调用产品内工具、等待产品内审批卡片;cloud 现在靠代理过滤,有了这个键就能删掉代理(cloud#4337 的后半)。packages/mcp/src/skill-prompts.ts的projectSkillPrompt(主判断点)和mcp-server-runtime.ts里 stdio get 回调的撤回分支;packages/spec/src/ai/skill.zod.ts的新键与tools说明;packages/mcp/src/skill-prompts.test.ts末尾的新 describe。pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 src/skill-prompts.test.ts,预期 36 个用例全绿,其中 9 个是本卡新增(含 stdio 四例)。What changes
The key.
SkillSchema.mcpPrompt?: boolean, no default.falsedeclares the skill written for the in-productask/buildagents only. Absent ortrue: offered exactly as before, where the server serves every tool the skill binds (#32767's binding test, unchanged).Where it is enforced. In
projectSkillPrompt, besideactive: false. That is the one function both MCP doors read, so a declared skill is withheld:registerSkillPrompts, the per-request HTTP prompt surface (/api/v1/mcp) and any host server that calls it: not inprompts/list, andprompts/getanswers it with the same-32602"Prompt not found" an unknown name gets, even on a connection that serves every tool it binds;MCPServerRuntime.bridgePrompts, the long-lived stdio server, which applies no binding filter at all. Before this, an in-product skill reached stdio clients whatever its tools.The stdio window. The stdio server registers its prompt list once, at boot, and each registered prompt's get re-reads the store, falling back to the boot snapshot when the skill is no longer found. A skill saved with
mcpPrompt: falsewhile the server runs would have stayed gettable from that snapshot. The get now asksskillPromptWithdrawnon the same re-read: a row of that name and holder that declaresmcpPrompt: falseis answered with the SDK's own unknown-prompt error (-32602,Prompt NAME not found). The list stays the boot snapshot until restart, as it already is for any skill saved after boot; the docs and the JSDoc say so. A skill that is simply gone, or deactivated after boot, keeps the snapshot fallback exactly as before: foldingactive: falseinto the same branch would change an existing stdio answer outside this card.Why not
surface.ask/build/bothare all in-product affinities read by the cloud runtime's skill resolution; any new member would change that read. A separate key changes nothing the in-product runtime reads.Docs. The key's JSDoc and
describetext, plus theinstructionsandtoolsdescribe text (the binding answers "can it run", not "is it written for MCP").content/docs/ai/connect-mcp.mdx(prompts section, with an example) andcontent/docs/ai/agents.mdx(the two-halves table and the binding paragraph). The generatedreferences/ai/skill.mdxfollows.Form. The skill form does not offer the key; the form-reconciliation ledger carries an
omitrow with the reason. Unset means offered and the key has no default, so its meaning lives in its absence. The form's boolean control is a switch that draws unset as off (checked={!!value}), so every offered skill would read as withheld; a select writes its option value as a string, which the boolean key refuses. Authors set it in source or through the metadata API.Ledgers.
liveness/skill.jsongains amcpPromptrow on in-repo evidence (projectSkillPrompt); no cloud row is touched or re-stamped. The/meta/typescount pin movesskill16 → 17.packages/mcp/src/skill-md.tsand its console mirror do not teach skill prompts (one code comment), so they are unchanged.Consumer. objectstack-ai/cloud#4337: cloud marks its in-product skill rows
mcpPrompt: false, drops itsmcp-skill-prompts.tsproxy, and widens its e2e todata:write/actions:executetokens. That is cloud's own change, not this PR.Tests
In
packages/mcp/src/skill-prompts.test.ts, a new top-leveldescribein the existing harness, driven through the real JSON-RPC wire:record_writing(bindscreate_record,update_record) is listed on adata:read+data:writeconnection, andactions_executor(bindsaction_*) on anactions:executeconnection.record_writingis not listed on thatdata:writeconnection or on one serving everything; same foractions_executoronrun_action.prompts/getanswers a declared skill exactly as it answers an unknown name (code, no data, same message).mcpPrompt: trueprojects exactly as undeclared, beside a declared row.bridgePrompts): CONTROL, an undeclared skill bindingopen_record(a tool no MCP family serves) is listed and got, which proves the binding filter is not what could hide it; declared, the same skill is neither listed nor got, beside an undeclared sibling that is.mcpPrompt: falseis answered byprompts/getexactly as a never-registered name (code and message), while its sibling still serves. CONTROL: a skill gone from the store since boot is still served from the snapshot, as before.In-product unchanged: the in-product resolution lives in cloud, and this repo has no runtime reader of it. The in-repo readers of the skill's wiring half are the authoring checks:
validateAiSurfaceAffinityandvalidateAiToolReferenceseach get a pin thatmcpPrompt: falseyields findings equal to the undeclared skill's.skill.test.tspins that the key accepts booleans and refuses others, that an undeclared skill parses with nomcpPromptkey, and thatsurface/tools/triggerConditions/activeparse the same with it.The #32767 binding tests are unchanged and green.
Ablation (both doors, one mutation each run)
The check is one line in
projectSkillPrompt, so each door was ablated by deleting it throughscripts/ablation-replace.mjs(anchor hit 1 → 0, blobf2ceb1ef77ae→a036269c28c7) and running that door's pins, then restored (blob back to HEAD,git diff HEADempty). The mcp tests importsrc/, so no build sits between the mutation and the run.registerSkillPrompts): 4 failed, 1 passed. Red: record_writing ondata:write, actions_executor onrun_action, theprompts/getparity pin, themcpPrompt: truecontrol (its declared sibling leaked). Green: the reproduction control, as predicted.bridgePrompts): 1 failed, 1 passed. Red: the declared skill is listed. Green: the undeclared control.c53ea9d14): the withdrawal branch disabled (if (false && skillPromptWithdrawn(…)), anchor 1 → 0, blob9dbcf68fc246→d26192d35f8b),-t bridgePrompts: 1 failed, 3 passed. Red: the opted-out get. Green: both controls and the boot-time declared case. Restored, blob == HEAD,git diff HEADempty.Verification
Round 2 at head
c53ea9d14(round 1 at50ccfc48f).Package tests and typecheck
pnpm --filter @objectstack/mcp test65/65 files, 1195 tests; specsrc/ai/skill.test.ts+src/system/metadata-form-zod-reconciliation.test.ts94/94; platform-objectssrc/apps/translations26/26 files, 587 tests (catalogs back to main);pnpm --filter @objectstack/mcp typecheckexit 0;pnpm lintexit 0.typecheckon spec, mcp, lint, metadata-protocol, platform-objects exit 0. Round 2 changed no lint or metadata-protocol file, and spec only in a JSDoc comment and a ledger row.Derived gates
node scripts/pm/dispatch-gates.mjs --commandsagainst this diff: 114 families, every one run atc53ea9d14with its exit code recorded, all exit 0.--ranreconciliation: "114 derived, 114 run, 0 NOT-MEASURED, 0 UNRUN", a derived zero.pnpm buildfor four prerequisite gates; both still stand in this worktree.Acceptance notes
minoron@objectstack/specand@objectstack/mcp(Metadata-protocoladded).mcpPromptout (see Form above). A form control that shows the unset state needs a tri-state boolean control in the metadata form renderer underui/; noted here, not filed.active: false) after the stdio server booted still leaves its get serving the boot snapshot. That predates this card and is left as it was.Skills-docs:skills(objectstack-ai): teachmcpPromptwhere SKILL.md explains which skills MCP offers as prompts #34237 teachesmcpPromptin the publishedskills/objectstack-ai/SKILL.md.Generated by Claude Code