Skip to content

feat(spec, mcp): a skill written for the in-product agents only opts out of MCP prompts with mcpPrompt: false - #34236

Merged
objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/project-thread-ujp3hv
Nov 16, 2026
Merged

objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/project-thread-ujp3hv

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

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 立即按未知回答)。
  • 为什么改: 工具绑定只能回答"这个连接能不能跑这份剧本",回答不了"这份剧本是不是写给 MCP 的"。cloud 的 record_writing、actions_executor 绑定的工具 MCP 也同名提供,却教模型调用产品内工具、等待产品内审批卡片;cloud 现在靠代理过滤,有了这个键就能删掉代理(cloud#4337 的后半)。
  • 风险与回滚: 纯加法:键没有默认值,不设置的技能解析结果与投影都和之前逐字节一致;产品内智能体不读这个键。回滚即 revert 本 PR,无需迁移。
  • 先看: 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. false declares the skill written for the in-product ask / build agents only. Absent or true: offered exactly as before, where the server serves every tool the skill binds (#32767's binding test, unchanged).

Where it is enforced. In projectSkillPrompt, beside active: false. That is the one function both MCP doors read, so a declared skill is withheld:

  • by registerSkillPrompts, the per-request HTTP prompt surface (/api/v1/mcp) and any host server that calls it: not in prompts/list, and prompts/get answers it with the same -32602 "Prompt not found" an unknown name gets, even on a connection that serves every tool it binds;
  • by 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: false while the server runs would have stayed gettable from that snapshot. The get now asks skillPromptWithdrawn on the same re-read: a row of that name and holder that declares mcpPrompt: false is 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: folding active: false into the same branch would change an existing stdio answer outside this card.

Why not surface. ask / build / both are 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 describe text, plus the instructions and tools describe text (the binding answers "can it run", not "is it written for MCP"). content/docs/ai/connect-mcp.mdx (prompts section, with an example) and content/docs/ai/agents.mdx (the two-halves table and the binding paragraph). The generated references/ai/skill.mdx follows.

Form. The skill form does not offer the key; the form-reconciliation ledger carries an omit row 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.json gains a mcpPrompt row on in-repo evidence (projectSkillPrompt); no cloud row is touched or re-stamped. The /meta/types count pin moves skill 16 → 17.

packages/mcp/src/skill-md.ts and 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 its mcp-skill-prompts.ts proxy, and widens its e2e to data:write / actions:execute tokens. That is cloud's own change, not this PR.

Tests

In packages/mcp/src/skill-prompts.test.ts, a new top-level describe in the existing harness, driven through the real JSON-RPC wire:

  • CONTROL (the card's reproduction): undeclared, record_writing (binds create_record, update_record) is listed on a data:read + data:write connection, and actions_executor (binds action_*) on an actions:execute connection.
  • Declared, record_writing is not listed on that data:write connection or on one serving everything; same for actions_executor on run_action.
  • prompts/get answers a declared skill exactly as it answers an unknown name (code, no data, same message).
  • CONTROL: mcpPrompt: true projects exactly as undeclared, beside a declared row.
  • stdio (bridgePrompts): CONTROL, an undeclared skill binding open_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.
  • stdio window: a skill listed at boot and then saved mcpPrompt: false is answered by prompts/get exactly 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: validateAiSurfaceAffinity and validateAiToolReferences each get a pin that mcpPrompt: false yields findings equal to the undeclared skill's. skill.test.ts pins that the key accepts booleans and refuses others, that an undeclared skill parses with no mcpPrompt key, and that surface / tools / triggerConditions / active parse 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 through scripts/ablation-replace.mjs (anchor hit 1 → 0, blob f2ceb1ef77ae → a036269c28c7) and running that door's pins, then restored (blob back to HEAD, git diff HEAD empty). The mcp tests import src/, so no build sits between the mutation and the run.

  • HTTP (registerSkillPrompts): 4 failed, 1 passed. Red: record_writing on data:write, actions_executor on run_action, the prompts/get parity pin, the mcpPrompt: true control (its declared sibling leaked). Green: the reproduction control, as predicted.
  • stdio (bridgePrompts): 1 failed, 1 passed. Red: the declared skill is listed. Green: the undeclared control.
  • stdio window (round 2, head c53ea9d14): the withdrawal branch disabled (if (false && skillPromptWithdrawn(…)), anchor 1 → 0, blob 9dbcf68fc246 → 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 HEAD empty.

Verification

Round 2 at head c53ea9d14 (round 1 at 50ccfc48f).

Package tests and typecheck
  • Round 2: pnpm --filter @objectstack/mcp test 65/65 files, 1195 tests; spec src/ai/skill.test.ts + src/system/metadata-form-zod-reconciliation.test.ts 94/94; platform-objects src/apps/translations 26/26 files, 587 tests (catalogs back to main); pnpm --filter @objectstack/mcp typecheck exit 0; pnpm lint exit 0.
  • Round 1: spec 844 files (26994 tests), lint 212 (9032), mcp 65 (1193), metadata-protocol 343 + 9 skipped (22937); typecheck on 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
  • Round 2, node scripts/pm/dispatch-gates.mjs --commands against this diff: 114 families, every one run at c53ea9d14 with its exit code recorded, all exit 0. --ran reconciliation: "114 derived, 114 run, 0 NOT-MEASURED, 0 UNRUN", a derived zero.
  • Round 1 needed a fetched pinned fixture sha and a full pnpm build for four prerequisite gates; both still stand in this worktree.

Acceptance notes

  • The changeset is minor on @objectstack/spec and @objectstack/mcp (Metadata-protocol added).
  • The skill form leaves mcpPrompt out (see Form above). A form control that shows the unset state needs a tri-state boolean control in the metadata form renderer under ui/; noted here, not filed.
  • Deactivating a skill (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): teach mcpPrompt where SKILL.md explains which skills MCP offers as prompts #34237 teaches mcpPrompt in the published skills/objectstack-ai/SKILL.md.

Generated by Claude Code

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation protocol:ai tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/mcp, @objectstack/spec, touching 4 documentable anchor(s). ⚠️ 3 changed file(s) yielded no anchor (packages/spec/authorable-surface/ai.json, packages/spec/liveness/skill.json, packages/spec/liveness/state-counts/skill.md), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/skills.mdx (via SkillSchema (symbol, a top-level const))

⛔ 1 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v17/17-0.mdx (via SkillSchema (symbol, a top-level const))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 3 changed file(s) yielded no anchor (packages/spec/authorable-surface/ai.json, packages/spec/liveness/skill.json, packages/spec/liveness/state-counts/skill.md) — pages documenting those are invisible to this run
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 178 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 36c0e96aa0ad1195293a5997e96fb88341815802 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 54aeda480b06bc4c71251a99c482aef9ce3a567c — the merge of head c53ea9d14701a0667f423e0d45b7c6749bd57f20 into base 36c0e96aa0ad1195293a5997e96fb88341815802, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# 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

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 36c0e96aa0ad1195293a5997e96fb88341815802 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx

Contract-review-claim: session_01L9qibzuZJBQY4wUQFJbkfx · head 50ccfc4 · 2026-11-16T01:48Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 50ccfc48fb6776a7e31d050e6592d75ca6f41704
Local-runs: none
Scope: packages/spec/src/ai/skill.zod.ts, packages/spec/src/ai/skill.form.ts + packages/mcp/src/skill-prompts.ts, packages/spec/liveness/skill.json, packages/spec/authorable-surface/ai.json, content/docs/ai/agents.mdx, content/docs/ai/connect-mcp.mdx, content/docs/references/ai/skill.mdx

Read from card #34167 (body and its three comments), the PR body and file list, the net diff origin/main...50ccfc48 (merge base 571cf908, main at 98a4449f), and the head's check-runs. Read but not reviewed: packages/mcp/src/mcp-server-runtime.ts, packages/runtime/src/domains/mcp.ts, ui/packages/app-shell/src/views/metadata-admin/SchemaForm.tsx.

Check-runs at this head, at the last read: 19 concluded success, 10 skipped, none failed, 35 still in_progress. Concluded green and relevant here: Spec property liveness, Check Changeset, Governed Surface Queue Guard, Lint · PM dispatch-gates, Lint · ESLint, Lint · repo & tooling gates, Type Check · source gates, Build Docs, Check Documentation Links, PR-body guards. Still running: Test Core 1/8 to 8/8, Test UI 1/16 to 16/16, Build Core, Build & E2E UI, Live E2E UI, Type Check UI, Type Check (workspace, debt ledger, consumer gates) and four Lint jobs (CI/release/engine gates, docs and code guards, query-options erasure, slot lookup and corpus). This verdict covers what had concluded; the test shards and the workspace type check had not, and the seat reads them before landing.

① Derived judgments

  • Accept-set, SkillSchema: one new optional key, mcpPrompt: boolean. Right. z.boolean().optional() with no default inside the existing strictObject. A document that parsed on main parses the same; a document carrying a boolean mcpPrompt, refused on main as an unknown key, is now accepted. Nothing is refused that was accepted. A widening.
  • Parsed shape for a row without the key: unchanged. Right. No default and no transform, so the parse output gains no key. The other keys of the schema are edited in JSDoc and describe text only.
  • Published text: the describe strings of instructions and tools change. Right. They move the generated reference page and the JSON Schema descriptions, not the accept-set.
  • MCP prompt surface: narrower only for rows that set mcpPrompt: false. Right. The one new line in projectSkillPrompt is a strict === false. Absent, true, or a non-boolean on an unvalidated raw row all project as on main. No skill on main can carry the key, since the strict schema refuses it, so no existing skill projects differently and there is no narrowing arm to declare.
  • HTTP (registerSkillPrompts): right. Both handlers read listSkillPromptsServedBy, which calls projectSkillPrompt per row. A declared row is absent from prompts/list, and prompts/get reaches the same not-found branch and the same -32602 as an unknown name. readMergedSkillRows in packages/runtime/src/domains/mcp.ts hands the rows over whole, so the key reaches the reader on the real endpoint.
  • stdio (bridgePrompts), key present at boot: right. The boot snapshot, each registered prompt's re-read and the bare-name route all go through listSkillPrompts. A row declared at boot is never registered and never got.
  • stdio, key set while the server runs: wrong against the published sentence. See ④, finding 1.
  • No other lister or resolver. agent_prompt (buildAgentPromptResult) serves the agent's own instructions and reads no skill. No MCP resource or tool in packages/mcp/src reads skill rows. skill-md.ts is the other "skill" and is untouched.
  • In-product agents, surface, tools: right as far as this repository can show. No file in the diff touches a reader of surface, tools, triggerConditions or active, and the only in-repo readers of the wiring half are the two lint validators, unchanged. The in-product runtime lives in cloud and was not read; the claim that it ignores the key rests on the key being new and is cloud#4337's to confirm.
  • Ledgers: right. authorable-surface/ai.json gains ai/Skill:mcpPrompt; liveness/skill.json gains a live row whose anchor packages/mcp/src/skill-prompts.ts#projectSkillPrompt is local and resolves to the line that reads the key; the state count moves 16 to 17.

② Semver level

Clause-②: yes (widening). Correct, and the PR body and changeset agree.
Metadata-protocol: added. Correct: a new key a metadata author can write.

AGENTS.md, Post-Task Checklist item 3: a kind takes at least minor on a package the diff moves. The changeset is minor on @objectstack/spec (the key), @objectstack/mcp (the reader) and @objectstack/platform-objects (the regenerated form catalogs). @objectstack/lint and @objectstack/metadata-protocol change in test files only and publish nothing. The level matches what the diff publishes. Not breaking, so no migration and no ADR-0087 disposition is owed. Check Changeset concluded success.

One sentence of the changeset body is wrong against the tree: it says the form offers the toggle "in its Basics section". skill.form.ts puts it in the "AI Instructions" section. Graded in ④, finding 3.

③ Boundary flags

  • open_questions: empty. Nothing to answer.
  • out_of_scope_findings, "Skills-docs follow-up owed: skills/objectstack-ai/SKILL.md should name mcpPrompt; carrier: server seat 7 files it": escalated to the seat. The PR body carries the matching Skills-docs: follow-up owed line, and skills/ is outside this PR's surface, so leaving it out is right. No follow-up card is cited anywhere in the inputs; the seat files it before landing.
  • Claim flag, "any existing skill that would project differently is declared as a narrowing arm": answered, none exists (① above).
  • Claim flag, "Metadata-protocol: derived in the shape note" and "every file is named in a shape note before code": escalated to the seat. The card thread holds a triage comment, the claim and the dev report, and no shape note. The value added is right on the merits; the note itself is the seat's to locate or waive.
  • Claim file surface: the diff also touches packages/spec/src/ai/skill.form.ts, the platform-objects catalogs and pin test, and pin tests in packages/lint and packages/metadata-protocol. The form and catalogs follow from the gates a new authorable key trips, and the rest are test pins. Answered: within the claim's "generated artefacts its gates demand"; the remainder is the lane seat's ACCEPT.
  • security_findings: none reported, and none found in scope.

④ Design judgment

packages/spec/src/ai/skill.zod.ts (hit). Holds against the card. Done-when 1 is met for a declared skill on both doors, with the caveat in finding 1. Done-when 2 holds: no default, the #32767 binding code is untouched, and a skill without the key takes the same path as on main. Done-when 3 holds as far as this repository reaches. Done-when 4 holds: the mcpPrompt, instructions and tools text all say how a skill opts out. The choice of a separate key over a new surface member is sound, because surface is read by the in-product runtime and a new member would change that read.

packages/mcp/src/skill-prompts.ts (implementing). The code agrees with its own header and with the schema JSDoc. One strict check, placed where both doors read. Attempts to break it that failed: a row with mcpPrompt: true; a declared row beside an undeclared row of the same name in another package (the declared one is dropped before faces are grouped, so the other is served alone); a declared row sharing a face with another (same); the binding filter running first (it cannot bring a row back).

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. bridgePrompts registers the prompt list once at boot. Its get callback re-reads, and when the re-read no longer finds the face it falls back to the boot snapshot (mcp-server-runtime.ts:2470 to 2471, "Gone since the snapshot: the snapshot's one skill, as before"). So a skill that was undeclared at boot and is then saved with mcpPrompt: false (the runtime PUT /api/v1/meta/skill/NAME that mergedRead exists to carry, and the path the new form toggle writes) stays in prompts/list and is still answered by prompts/get, with its boot-time instructions, until the process restarts. HTTP drops it at once. The same holds on main for active: false, and the fallback line is outside this diff. What is in the diff is the unqualified sentence, in five places: the mcpPrompt JSDoc and describe in skill.zod.ts, the header of skill-prompts.ts, the evidence of the liveness row, agents.mdx ("on every MCP connection, stdio included") and connect-mcp.mdx ("on every connection (HTTP and stdio)"). Either qualify those sentences (on the long-lived stdio server the prompt list is taken at boot, so a change made while it runs takes effect on restart), or make the stdio get stop serving the snapshot for a row the re-read shows as opted out, with a pin. Graded should-fix and not must-fix because the card's case, a skill declared in its package source, is read at boot and is withheld on both doors; the gap is a bounded window on one transport that main already has for active.

packages/spec/src/ai/skill.form.ts (hit).

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 SchemaForm renders it as a switch with checked={!!value} (SchemaForm.tsx:2492). The key has no default, so on every skill without it (every skill that exists today) the control labelled "Offer as MCP prompt" reads off while the code offers the skill. An author who opens the form to opt a playbook out sees it already off and has nothing to do; writing false takes turning the switch on and then off again. The help text ends "Unset = offered", which is correct, but a two-state switch cannot show unset, so the control and its help text disagree. This is the one place where the form does not say what the code does. The fix is a control whose unset state does not read as off, for example a select with an explicit "Offered (default)" entry as surface uses, or whatever the form kit offers for an optional boolean whose absence means yes. A schema default is not the fix: it would change the parsed shape the PR promises to leave alone.

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 colSpan: 1 in a section that declares no columns; the two fields beside it set none. Harmless.

packages/spec/liveness/skill.json (implementing). Agrees with the code apart from finding 1. Its note says the cloud agent runtime does not read the key; that is a cross-repo statement on an in-repo row. It sits in the note, not the evidence, so the gate reads nothing false, and no cloud row is re-stamped.

packages/spec/authorable-surface/ai.json (implementing). Agrees: one row, in sorted position.

content/docs/ai/agents.mdx, content/docs/ai/connect-mcp.mdx (implementing). Agree with the code sentence by sentence apart from finding 1. The example in connect-mcp.mdx uses defineSkill with keys the schema accepts.

content/docs/references/ai/skill.mdx (implementing). Generated; its three changed rows match the describe strings exactly.

Findings 1 and 2 earn a delta review. Neither is a must-fix.

Implemented-by: claude/project-thread-ujp3hv
Reviewed-by: session_01L9qibzuZJBQY4wUQFJbkfx

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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx

Contract-review-claim: session_01L9qibzuZJBQY4wUQFJbkfx · head c53ea9d · 2026-11-16T02:41Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: c53ea9d14701a0667f423e0d45b7c6749bd57f20
Local-runs: none
Scope: packages/spec/src/ai/skill.zod.ts + packages/mcp/src/skill-prompts.ts, packages/mcp/src/mcp-server-runtime.ts, packages/spec/src/system/metadata-form-zod-reconciliation.test.ts, packages/spec/liveness/skill.json, packages/spec/authorable-surface/ai.json, content/docs/ai/agents.mdx, content/docs/ai/connect-mcp.mdx, content/docs/references/ai/skill.mdx

Delta review of record 6905137383 for the hop 50ccfc48..c53ea9d1.

The hop is one commit on top of the reviewed head, with no rebase. packages/spec/src/ai/skill.form.ts and every packages/platform-objects file have left the net diff, so the one hits path is now skill.zod.ts. Outside the fix the net diff did not move: the lint and metadata-protocol pins, skill.test.ts, the liveness row, the state count, authorable-surface/ai.json and references/ai/skill.mdx are byte-identical to the first head. Read but not reviewed: ui/packages/app-shell/src/views/metadata-admin/SchemaForm.tsx.

Check-runs on c53ea9d1 at the last read: 16 concluded success, 11 skipped, none failed, 22 still in_progress. Concluded green: Spec property liveness, Governed Surface Queue Guard, Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, PR-body guards (both runs), Check Documentation Links, Check PR Size, Dogfood Regression Gate, the two shard planners, Flag docs, Auto Label, filter, and Check Changeset (both runs). Still running: Test Core 1/8 to 8/8, Build Core, Build Docs, Build UI Deps, Live E2E UI, Type Check (workspace, debt ledger, source gates, consumer gates) and six Lint jobs (ESLint, CI/release/engine gates, docs and code guards, repo and tooling gates, query-options erasure, slot lookup and corpus). Nothing that runs the new stdio pins or the form-reconciliation ledger had concluded. This verdict covers the tree and the concluded checks; the seat reads Test Core before landing.

① Derived judgments

  • Accept-set and parsed shape: unchanged from the first head. Right. The hop edits skill.zod.ts in one JSDoc sentence only.
  • stdio prompts/get for a skill opted out after boot: now answered as unknown. Right. The registered prompt's callback reads the rows once, projects from that same read, and when the face is no longer found asks skillPromptWithdrawn before it falls back to the boot snapshot. A withdrawn row raises -32602 with the SDK's own wording for a name it never registered.
  • stdio prompts/get for a skill deleted, unreadable or deactivated after boot: unchanged from main. Right. Only a row present with mcpPrompt === false under the same name and the same holder counts as withdrawn; anything else still serves the snapshot, as before, and the new CONTROL test pins the deleted case.
  • stdio prompts/list: still a boot snapshot. Right, and now said. A skill switched off while the server runs stays listed until restart. This is unchanged behaviour, now stated in the key's JSDoc, both docs pages and the changeset.
  • Form surface: the skill form offers no control for the key. Right. The net diff no longer touches the form, and the form-reconciliation ledger gains one root omit row for skill.mcpPrompt.
  • Published packages: @objectstack/platform-objects no longer moves. Right. All eleven catalogs, the source-hash files and the 741 pin are back to main.

② Semver level

Clause-②: yes (widening). Unchanged and correct.
Metadata-protocol: added. Unchanged and correct.

The changeset is now minor on @objectstack/spec and @objectstack/mcp only. That matches the diff: platform-objects has no net change, and lint and metadata-protocol still change in test files only. The body's new stdio paragraph and its form sentence both agree with the tree. Both Check Changeset runs concluded success.

③ Boundary flags

  • Escalated to the seat: the ledger row adds a reason no ruling names. The ledger's own header says its root rows are read off a key's describe or liveness verdict, or ruled, and the other rows that keep a live key off its form each cite a ruling. The new row keeps a live key off the skill form on the author's own reasoning. It does not borrow a ruled class phrase, so the class gate has nothing to refuse, and I judge the reason true on the merits (④). Whether a live key may stay out of Studio without the maintainer's word is the seat's call, not this review's.
  • The two escalations of record 6905137383 stand unchanged: the Skills-docs follow-up card, and the shape note the claim promised.
  • Nothing in this hop touches a path outside the claim's surface that the first head did not, except mcp-server-runtime.ts, which finding 1 asked for.

④ Design judgment

Finding 1 (stdio window): closed. mcp-server-runtime.ts and skillPromptWithdrawn in skill-prompts.ts agree with the sentence now published. Attempts to break the check, all read from the code:

  • A row of the same name in another package. The check compares the holder as well as the name, so package B's opt-out does not withdraw package A's prompt, and A's opt-out is caught under A's face.
  • An environment skill opted out while a package still holds the same bare name. The lookup resolves the bare name to the package's skill and serves that one. This is main's ADR-0150 bare-name rule; the withdrawn text is not served.
  • Deleted versus opted out. A missing row is not withdrawn and the snapshot is served, pinned by the new CONTROL. A row that is both active: false and mcpPrompt: false is withdrawn.
  • A face two skills derived at boot. That branch never served either skill and still refuses.
  • The bare-name route ahead of the SDK. It re-reads through listSkillPrompts, finds nothing, and hands the name to the SDK, which answers unknown.
  • Two reads disagreeing. The callback projects from the same rows it checks, and packageNamespace survives the spread.

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 SchemaForm draws checked={!!value}, so unset reads off; both select branches pass the chosen value to onChange as a string, which a z.boolean() in a strict schema refuses. Nothing in the tree still claims a control: no form row, no catalog entry, no count pin, and the changeset now says the form does not offer the key and why. The cost is stated in the row itself: a skill authored only in Studio sets the key through the metadata API, not the form. The ledger's resolve and non-vacuity tests read a row of exactly this shape (root coordinate, key in the schema, absent from the form); they run in Test Core, which had not concluded.

Nit 3 (the "Basics" sentence): closed. The sentence is gone from the changeset.

Nit 4 (colSpan): closed. The field is gone.

New, nit A. Three summary sentences still carry the unqualified "never listed". The describe string of mcpPrompt (and so references/ai/skill.mdx), the #34167 header paragraph of skill-prompts.ts, and the evidence of the liveness row were not touched by the hop. Each is a one-line summary of a rule whose full statement, with the stdio list caveat, now sits in the key's JSDoc and in both docs pages. The liveness evidence also names projectSkillPrompt alone, where the after-boot get is now decided by skillPromptWithdrawn. No effect on what the server does.

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.

content/docs/ai/agents.mdx, content/docs/ai/connect-mcp.mdx. Both now state the stdio list snapshot and the immediate get, and agree with the code sentence by sentence.

packages/spec/src/ai/skill.zod.ts (hit). Holds against the card's Done-when list as in the first record, with the caveat of finding 1 now written into the key's own JSDoc.

No must-fix and no should-fix. Nits alone: the round ends here.

Implemented-by: claude/project-thread-ujp3hv
Reviewed-by: session_01L9qibzuZJBQY4wUQFJbkfx

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx

Test Core (3/8) at c53ea9d1 is red on one test: packages/mcp/src/mcp-file-tools.test.ts › "read_file extracts PDF and Word text on a worker pool … out of CPU budget on the worker: the pages read so far, truncated". It expected content: 'text' (some pages read before the budget) and got content: 'none'. The seat's first reading is a timing flake, and the seat re-runs the failed job once (rerun-failed.mjs, run 43793582443):

  • The assertion depends on how many pages the worker reads inside a CPU-time budget, so it moves with runner speed.
  • This hop changes only the stdio prompts/get callback in mcp-server-runtime.ts and skillPromptWithdrawn in skill-prompts.ts. Neither is on the read_file / worker-pool path. The test file imports MCPServerRuntime, but no prompt is touched on that path.
  • The same test passed at the previous head 50ccfc48 (Test Core green, 58/58).

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#7 · os-tesla · session_01L9qibzuZJBQY4wUQFJbkfx

维护者速读 · PR #34236 @ c53ea9d1 · 2026-11-16T03:33Z

  • 改了什么:技能(skill)新增可选键 mcpPrompt。写 false 的技能只供产品内 agent 使用,任何 MCP 连接(HTTP 和 stdio)都不会把它列进 prompts/list,prompts/get 也当作不存在。不写就和现在完全一样。
  • 为什么改:mcp: a skill that serves only the in-product agents is still projected as an MCP prompt when its bound tools happen to be served, and a host has no way to say so #34167。云端把产品内 ask / build agent 的剧本注册成技能,其中两条(record_writing、actions_executor)绑定的工具恰好 MCP 也提供,于是被推给 Claude Code / Cursor,里面却要求调用 MCP 没有的工具和确认卡片。云端目前靠一层代理过滤,本键落地后可以删掉那层(cloud#4337)。
  • 权限与边界:放宽(新增可选键,Metadata-protocol: added,spec 与 mcp 各 minor)。不写此键的技能投影不变,mcp: prompts/list projects a skill whose bound tools the connection does not serve, and a host has no declared seam to withhold one #32767 的绑定判断不变,产品内 agent 不读此键。
  • 风险与回滚:stdio 长驻服务的列表仍是启动时的快照,运行中改为 false 的技能要重启后才从列表消失,但 prompts/get 立即按不存在回答(已在文档写明)。Studio 表单不提供这个开关(表单组件无法表达「未设置 = 提供」的三态布尔),作者用代码或元数据 API 设置。回滚即 revert。
  • 先看:packages/mcp/src/skill-prompts.ts 的 projectSkillPrompt / skillPromptWithdrawn。
  • 需要你做的:无,席位落地。
  • 席位意见:落地。CONTRACT_REVIEW_TIER 隔离复审首轮 PASS 带 2 条应修,delta PASS 只剩细节;CI 全绿(一次 PDF 预算计时抖动重跑后绿)。

席位核对

  • 形态: draft → main,Fixes #34167。申报 Clause-②: yes (widening)、Metadata-protocol: added、Skills-docs: follow-up #34237;changeset minor 于 @objectstack/spec、@objectstack/mcp。
  • 文件面: 认领 6903886722 所列面;形态说明(项目文件 34167-shape-note.md)本席 00:24Z 接受(键名 mcpPrompt,于 projectSkillPrompt 执行,覆盖 stdio)。表单字段在 r2 移除,改为表单对账台账一条 omit 行,理由经复审对照表单组件属实,本席接受,不需另立裁定(可逆、非受管面)。
  • 契约复审: CONTRACT_REVIEW_TIER,本席隔离审读子代理。r1 6905137383 在 50ccfc48 上 PASS,应修 2 条(stdio 启动快照窗口;布尔开关对未设置显示「关」)、细节 2 条;delta 6905857367 在 c53ea9d1 上 PASS,四条全部关闭,新细节 2 条接受为偏差(三处一句话摘要仍写「never listed」未带启动列表注;台账头部散文未计入新理由)。
  • 门禁 check-runs @ c53ea9d1: 58 success、10 skipped、0 失败(按名取最新)。Test Core (3/8) 首跑红于 mcp-file-tools.test.ts 的 CPU 预算计时断言,与本 diff 路径无关、上一 head 同测绿,理由 6906173291 后重跑一次转绿。
  • K = 5(PRBASE 36c0e96a),无新语种包,git merge-tree 干净,Tier S(388 行,非受管面)。
  • 范围外去向: skills(objectstack-ai): teach mcpPrompt where SKILL.md explains which skills MCP offers as prompts #34237(SKILL.md 教 mcpPrompt,Blocked-by mcp: a skill that serves only the in-product agents is still projected as an MCP prompt when its bound tools happen to be served, and a host has no way to say so #34167);Studio 三态布尔控件未立卡,待有作者需要时再提。
  • 落地条款: 常设落地令 「按 pm-dispatch 审过的pr你可以自主落地」 (2026-10-30T14:20Z)、「车道座位应该使用pm-dispatch 技能审核和落地pr」 (2026-11-14T14:32Z)。

ACCEPT · PR #34236 @ c53ea9d14701a0667f423e0d45b7c6749bd57f20

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 16, 2026 03:33
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit c2cabce Nov 16, 2026
114 of 116 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-ujp3hv branch November 16, 2026 04:25
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 protocol:ai protocol:system size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants