Skip to content

Skills are declared the only third-party extension primitive, but nothing in the open distribution consumes them #3905

Closed

Description

@os-zhuang

The gap

stack.zod.ts:294-317 and ADR-0063 §2 both name skills as the only third-party extension primitive:

2. Skills (+ tools / MCP) are the only third-party extension primitive

Therefore: third parties author *.skill.ts and tools / MCP connectors. *.agent.ts is closed to third parties.

In the open framework, nothing consumes them.

This is not a claim that the missing agent runtime is a bug. ADR-0063's own header says the open distribution is deliberately MCP-only:

the open framework exposes AI only via @objectstack/mcp (BYO-AI) and ships no in-product ask / build chat

That decision (cloud ADR-0025) is fine. The gap is what it leaves behind: the skill / tool / mcp metadata types still ship in the open spec, are authorable, are actively linted, and reach no runtime here.

Evidence

1. Authorable, and validated. SkillSchema (packages/spec/src/ai/skill.zod.ts:64), ToolSchema (ai/tool.zod.ts:106), MCPServerRefSchema / MCPToolBindingSchema (ai/mcp.zod.ts:47,88) are all in the open spec and declared on stack. Two lint rules in this repo check skill metadata seriously — validateAiToolReferences and validateAiSurfaceAffinity (packages/lint/src/reference-integrity-suite.ts), both wired into os validate / lint / compile. An open-source author naming a nonexistent tool in a skill gets an error today.

2. No consumer. Grep for SkillSchema / ToolSchema across packages/, excluding spec/ and tests: empty. The consumers — SkillRegistry, AgentRuntime — live in cloud/packages/service-ai.

3. MCP never reads them. The HTTP surface (packages/mcp/src/mcp-http-tools.ts) registers 11 fixed native tools — list_objects, describe_object, validate_expression, query_records, aggregate_records, get_record, create_record, update_record, delete_record, list_actions, run_action — and no code path reads skill metadata. The server also implements no prompts/* primitive (grep for prompts/list / prompts/get / listPrompts: empty).

So in the open distribution: author a skill → it validates → it lints → nothing ever runs it, and nothing says so.

That is the same declared-but-unenforced shape as the two defects just fixed under #3820 (agent.tools silently stripped, #3894/#3904; skill.permissions dead key, hotcrm#511). This one is larger because the spec advertises it as the extension path.

Naming collision (worth fixing regardless)

packages/mcp/src/skill.ts is not the skill metadata type. It is the portable SKILL.md distributable (ADR-0036 Amendment C) that teaches an external agent — Claude Code, Codex, Gemini CLI — to drive ObjectStack over MCP. Two unrelated concepts, one word, in the same repo. Anyone grepping skill in packages/mcp finds the wrong one first.

What to decide

The question is what authoring a skill should mean in a BYO-AI distribution. Two coherent answers:

A. Give it a consumer — project skill instructions onto MCP prompts.
A skill has two halves with very different value over MCP:

  • Tool binding (tools[], surface) — poor fit. In MCP the model lives client-side; the server exposes a flat tool list. Server-side per-skill tool filtering fights the client's own agent loop, and AI-exposed Actions already flow through list_actions / run_action, so action_<name> is reachable today.
  • Instructions (playbooks, judgment, persona) — natural fit. This is precisely MCP's prompts primitive, which the server does not implement yet. A tenant-authored skill would become a prompt any MCP client can list and fetch.

Under A, the tool-binding half gets documented as cloud-runtime-only, and skills authored in the open distribution remain meaningful in cloud.

B. Mark the AI metadata family cloud-only — the way stack.agents was marked platform-internal in #3885. Then os validate should stop reporting errors to open-source users about metadata their distribution cannot run.

A is my recommendation — the instructions half has real standalone value to MCP clients, and it keeps "a skill authored in OSS also works in cloud" true. But this is a product-boundary decision, not a cleanup, so it needs a maintainer call before any implementation.

Either way, the status quo should not persist: linting an author's work against a runtime their distribution does not ship is the failure mode this repo's ratchets exist to prevent.

Related

  • lint: no reference-integrity for AI metadata (agent skills, skill tools) — R7, blocked on D1/D2 #3820 (parent) — AI metadata positioning; the three defects fixed under it are the smaller instances of this shape
  • ADR-0063 §2 (extension primitive), cloud ADR-0025 (open = MCP-only), ADR-0109 (tool authoring model), ADR-0036 Amendment C (the SKILL.md distributable)
  • A separate cloud-side finding blocks the same promise from the other direction: ASK_AGENT.skills is a hardcoded 4-item allow-list intersected by resolveActiveSkills, and the persona carries protection.lock: 'full' — so a third-party surface: 'ask' skill registers successfully and is silently never activated. Filing separately against cloud.

Activity

  1. added
    needs-user-decisionBlocked on a maintainer decision — do not dispatch; decision cards only, never on a PR
    on Aug 2, 2026
  2. os-zhuang commented on Aug 3, 2026

    @os-zhuang
    ContributorAuthor

    维护者裁决(2026-08-03):方案 A —— 给 skill 一个开源消费方:

    1. skill 的 instructions 半边投影为 MCP prompts 原语(MCP 服务器目前未实现 prompts/*,补齐它,从 skill 元数据读取);
    2. tool-binding 半边(tools[]/surface)文档明确标注 cloud-runtime-only,不装样子;
    3. 顺带修 packages/mcp/src/skill.ts 与 skill 元数据类型的重名(ADR-0036 Amendment C 的 SKILL.md 分发物改名或挪位,由执行 agent 提方案)。

    理由(两轴):

    • 长远合理性:保住「开源里写的 skill 在 cloud 也能用」的扩展故事;MCP prompts 是标准原语,投影不是私造协议。
    • 防 AI 犯错:消除「写 skill → 校验通过 → 永不运行且无人告知」——declared ≠ enforced 的最典型形状;两条 lint 规则认真校验一个无消费方的类型,正是训练 AI 把假能力当真的温床。

    cloud 侧 ASK_AGENT.skills 硬编码白名单的对偶发现按原计划另单处理。已入队待派。


    Generated by Claude Code

  3. added
    pm:queueReady for the PM dispatch loop
    and removed
    needs-user-decisionBlocked on a maintainer decision — do not dispatch; decision cards only, never on a PR
    on Aug 3, 2026
  4. os-zhuang commented on Aug 6, 2026

    @os-zhuang
    ContributorAuthor

    分诊级别建议:第三方扩展原语的开放面设计属产品方向裁决,派发前需要维护者拍板——建议摘 pm:queue 换 needs-user-decision 进决策箱,避免 dev 空转。交分诊座位定夺。背景:维护者 2026-08-06 拍板 spec 车道缩盘方案,见 #5837。


    Generated by Claude Code

  5. added
    needs-user-decisionBlocked on a maintainer decision — do not dispatch; decision cards only, never on a PR
    and removed
    pm:queueReady for the PM dispatch loop
    on Aug 6, 2026
  6. os-zhuang commented on Aug 6, 2026

    @os-zhuang
    ContributorAuthor

    标签落实(维护者 2026-08-06 指示,session_01LeEfA7CFwbJb7JJmXm2KM3):按 08-06 降级建议执行 pm:queue → needs-user-decision——第三方扩展原语的开放面设计属产品方向裁决,进决策箱等拍板。


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:specDomain lane — seat card indexed by label:pm:seatpm:dispatchedDispatched to a dev agent by /pm-dispatchpm:queueReady for the PM dispatch loop

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions