docs(skills): objectstack-ui 的 App 例子不再教 defaultAgent: 'sales_copilot' (#5985) - #6030
Queued
hotlong wants to merge 1 commit into
Queued
docs(skills): objectstack-ui 的 App 例子不再教 defaultAgent: 'sales_copilot' (#5985)#6030hotlong wants to merge 1 commit into
hotlong wants to merge 1 commit into
Conversation
#5985) `skills/` 下的 SKILL.md 随 `npx skills add` 原样发给第三方,是 AI 写元数据时 第一个读的语料。App 例子里的 `defaultAgent: 'sales_copilot'` 带 `os:check` 标记,parse / build / 类型检查全过(字符串就是字符串),运行期却绑不上任何 东西 —— ADR-0063 §2 撤回了租户与应用包级自定义 agent,可解析集合收窄到两个 平台 agent(`ask` / `build`),表外的名字静默回落平台默认。 例子里的 `crm_enterprise` 是数据类 app(leads / opportunities / dashboards / reports / approvals),按 ADR-0063 它本就该省掉这个 key —— `ask` 是隐式默认。 故改为注释掉该行,并照同块 `hidden:` 的既有写法把可解析集合与「表外名字绑不 上」这一条写进注释,替换掉原来那句诱导性的「optional AI copilot binding」。 `sales_copilot` 这个字面量不再出现在 skills/ 任何位置,避免被逐字抄进业务包。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BDmDsu2575gDxeMCxXhDE3
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
hotlong
marked this pull request as ready for review
August 6, 2026 15:27
hotlong
added this pull request to the merge queue
Aug 6, 2026
Any commits made after this event will not be merged.
This was referenced Aug 6, 2026
Contributor
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 31116189642 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 失败的 job(日志抽取,best effort):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 6, 2026
hotlong
added this pull request to the merge queue
Aug 6, 2026
Any commits made after this event will not be merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5985
问题
skills/objectstack-ui/SKILL.md的 App 例子(带os:check标记)教:ADR-0063 §2 撤回了租户 / 应用包级自定义 agent,
app.defaultAgent的可解析集合收窄到两个平台 agent(
ask/build,别名可解析)。这行 parse 得过、build 得过、os:check也过 —— 因为defaultAgent的类型就是string,字符串就是字符串 ——运行期却绑不上任何东西,静默回落平台默认。
skills/随npx skills add objectstack-ai/objectstack/skills原样发给第三方,是 AI 写元数据时第一个读的语料;
sales_copilot这种「像真的一样」的名字被逐字抄进业务包的概率很高。
前提已对
origin/main复核成立,三处独立佐证均为仓内实测而非推断:packages/spec/src/ui/app.zod.ts的defaultAgentJSDoc:「the resolvablevalues are the two platform agents… a name that is not a platform agent will
not resolve at chat time」;
packages/lint/src/validate-ai-agent-authoring.ts头注释:stack-authoredagent 在 chat 上 404,且不能经
app.defaultAgent钉住;packages/app-shell/src/hooks/surfaceAgent.ts:82——
const bounded = isBuiltinAgentName(appDefaultAgent) ? appDefaultAgent : undefined;表外的名字是拒收(丢弃)而不是透传,注释写明「so a roster cannot be
smuggled in via app metadata」。
选的路线:删掉该行(数据类 app)
按 PM 分诊给的两个合法方向,判断依据是该示例 App 本身的性质。例子里的
crm_enterprise/ 'Enterprise CRM' 是标准的数据类 app —— leads、opportunities、saved view、dashboard、report、approval requests,整棵导航树没有一处 authoring
语境。故按 ADR-0063 它本就该省掉这个 key:
ask是隐式默认。这与 #5891 / PR #5984 刚落地的
content/docs/ui/apps.mdx「Default Agent」一节逐条对齐(同一发现的来源),该节写的就是:
askis the implicit default;'build'on an authoring surface(Studio 是内置例子)。改法上没有直接删空,而是照同块
hidden:的既有写法留一条注释掉的示例 ——因为 PM 分诊要求「注释『optional AI copilot binding』必须跟着改(说明可解析集合
只有 ask/build)」,而整行删空就没有落点承载这条语义了。同时这样保留了 key 在语料
里的可发现性:AI 仍知道
defaultAgent存在,但读到的是收窄后的真语义。原注释「optional AI copilot binding」正是让人以为可以随便起名的那句,已整句替换。
三条事实写进注释:可解析集合恰好是两个平台 agent、表外名字 parse 得过但绑不上、
数据类 app 省掉此 key。
sales_copilot这个字面量不再出现在skills/任何位置(
git grep -n "sales_copilot" -- skills/空)。刻意没有把它作为反例写进注释:文档正文里点名它是安全的(apps.mdx 就那么做),但 skill 的代码块里出现该字面量,
恰好是本单要消除的复制粘贴风险。
反向验证:方向是「绿 → 绿」,不是「绿 → 红」
先声明预期方向再跑的:本单不可能出现「还原缺陷 → 门禁转红」。
defaultAgent的类型是
string,'sales_copilot'与'build'一样类型检查通过;缺陷是运行期解析事实,不是类型事实。若还原后能转红,issue 正文「parse 得过、build 得过、
os:check也过」这一核心论断就是假的,这个坏例子当初也就进不了仓。实测确认了这个预期:把
defaultAgent: 'sales_copilot'原样放回后重跑门禁对这一类缺陷结构性失明 —— 这正是它当初得以发布的原因,也正是 issue 正文
建议 2(给取值加 lint)想补的那一层。按分诊裁定,建议 2 是新门禁面,不在本单
范围,未夹带。
Changeset:按
skills/**先例走skip-changesetskills/是已发布内容但不经 changeset 发版。查同类先例,今日skills/**的 PR一律
skip-changeset标签、无 changeset:0d1bc15,今日碰过本文件的那一笔,九份 SKILL.md 的 compatibility声明改 17.x)—— 实测其提交文件清单零个
.changeset/条目;照抄该先例:本 PR 不提交 changeset,建 PR 后立即打
skip-changeset标签。自验(全部前台阻塞执行,build/test 持
flock /tmp/os-heavy-verify.lock)基线 rebase 到当时的
origin/main(b5bdf48),本文件上游无并发改动。先
pnpm --filter '@objectstack/spec^...' --filter @objectstack/spec build(
check:skill-examples读的是构建出的dist/*.d.ts),再逐条跑覆盖skills/的五道门禁:
check:skill-examplesskills/objectstack-ui/SKILL.md:472)check:doc-authoringcheck:skill-frame-synccheck:skill-docsskills/README.md、content/docs/ai/skills-reference.mdx)check:skill-refs字节纪律:
node scripts/check-nul-bytes.mjs→ OK(5778 tracked text files);对本文件另做定向自扫
grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]'→ 无命中。改动面严格等于申报文件面:
skills/objectstack-ui/SKILL.md一个文件,+5/-1。🤖 Generated with Claude Code
https://claude.ai/code/session_01BDmDsu2575gDxeMCxXhDE3
Generated by Claude Code