Skip to content

fix(create-objectstack): scope skill installs to the curated skills/ catalog - #3101

Merged
os-zhuang merged 2 commits into
mainfrom
fix/scaffold-skill-catalog-boundary
Jul 17, 2026
Merged

fix(create-objectstack): scope skill installs to the curated skills/ catalog#3101
os-zhuang merged 2 commits into
mainfrom
fix/scaffold-skill-catalog-boundary

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

问题(15.1 第三方评估 P2 #1)

create-objectstack 生成的项目 .agents/skills/ 里出现了仓库内部 skill dogfood-verification(frontmatter 自述 "NOT a customer-published skill")。

根因

泄漏不在模板或 npm 发布产物,而在脚手架运行时:scaffolder(及文档)执行 npx skills add objectstack-ai/framework --all。skills CLI 的 --all 隐含 --skill '*'(add.ts:1049-1052),而任何非空 --skill 会把 includeInternal 置真 —— 即 --allmetadata.internal 标记的 skill 也一并安装。仓库全量发现会走 .claude/skills/,于是内部 skill 进入每个新项目。CI 的 scaffold-e2e 两处均 --skip-skills,该路径从未被守。

修复(双层)

  1. 硬边界 = /skills 子路径:scaffolder 与全部文档改为 npx skills add objectstack-ai/framework/skills --all,skills CLI 的发现范围被钉死在发布目录(对 --all 也有效;已实测远端 GitHub 源 Found 9 skills)。
  2. 交互兜底 = metadata.internal: true:.claude/skills/dogfood-verification 加标记,裸 skills add objectstack-ai/framework(无 --all)的交互发现也不再露出(实测 --list 只列 9 个)。

防线

  • template-consistency.test.ts 新增 4 个 ratchet:skills/ 外的 SKILL.md 必须标 internal;curated 条目不得标 internal;scaffolder 必须用子路径源;客户面(docs/skills/create-objectstack)禁止裸根路径安装命令。
  • scaffold-e2e.yml 新增步骤:从本 checkout 的 skills/ 子路径真实安装进全新 scaffold,断言安装集合与 curated 目录集合相等;根路径 --list 断言恰好 curated 数量且无内部 skill。

验证

  • pnpm --filter create-objectstack test 10/10 通过;build 通过
  • 本地 worktree 实测:子路径安装 → 恰好 9 个 curated;根路径 --list → Found 9(internal 隐藏)
  • 远端实测:npx skills add objectstack-ai/framework/skills --list → Found 9
  • check:doc-authoring / check:role-word 通过

🤖 Generated with Claude Code

…catalog
The scaffolder (and docs) ran `npx skills add objectstack-ai/framework
--all`, and the skills CLI's --all implies --skill '*', which includes
metadata.internal skills — so the repo-internal dogfood-verification
skill (.claude/skills/) landed in every scaffolded project's
.agents/skills/ (15.1 third-party eval, P2).
- scaffolder + docs now install from the /skills subpath, which scopes
skills-CLI discovery to the published catalog
- mark .claude/skills/dogfood-verification metadata.internal: true so
interactive repo-root discovery hides it too
- template-consistency ratchets: every SKILL.md outside skills/ must be
metadata.internal, curated entries must not be, no customer-facing
surface may advertise a repo-root install
- scaffold-e2e: install from this checkout's skills/ subpath and assert
set-equality with the curated catalog; assert repo-root listing
surfaces exactly the curated set
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercelBot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
specReadyReadyPreview, CommentJul 17, 2026 10:00am

Request Review

@github-actionsgithub-actionsBot added size/m documentation Improvements or additions to documentation ci/cd tests tooling labels Jul 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): create-objectstack.

7 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/ai/skills-reference.mdx(via create-objectstack)
  • content/docs/ai/skills.mdx(via create-objectstack)
  • content/docs/getting-started/index.mdx(via create-objectstack)
  • content/docs/getting-started/your-first-project.mdx(via create-objectstack)
  • content/docs/plugins/packages.mdx(via create-objectstack)
  • content/docs/releases/v15.mdx(via create-objectstack)
  • content/docs/releases/v9.mdx(via create-objectstack)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

The skills CLI colors the count even when piped (Found \e[32m9\e[39m
skills), so the repo-root listing greps in the new skills-boundary step
never matched in CI. The subpath-install set-equality assertion had
already passed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@os-zhuang
os-zhuang merged commit 809214f into mainJul 17, 2026
18 checks passed
@os-zhuang
os-zhuang deleted the fix/scaffold-skill-catalog-boundary branch July 17, 2026 11:28
os-zhuang added a commit that referenced this pull request Jul 20, 2026
…-boundary ratchet (#3346)
The skills-catalog-boundary guard flagged an auto-generated CHANGELOG entry (#3101's changeset prose) that quotes the removed `skills add objectstack-ai/framework --all` command in past tense while documenting its removal, turning Test Core red on main. Exclude **/CHANGELOG.md from the guard's grep surfaces — documenting a fix is not advertising the anti-pattern. Test-only.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/framework that referenced this pull request Jul 21, 2026
…DME framing
Third-party review of the published skills bundle (installed via
`npx skills add objectstack-ai/framework/skills --all` into a scaffolded
app) found the references layer leaking monorepo-only surface:
- build-skill-references.ts listed transitively-imported src files that
are NOT in the published package (only src/**/*.zod.ts ships) —
lazy-schema.ts / visibility.ts / public-auth-features.ts pointers 404
in a consumer's node_modules. The generator now traverses through
non-shipping files but never lists them.
- Add missing load-bearing schemas to the map: ai/knowledge-source +
knowledge-document (the real RAG primitives), automation/
time-relative-trigger + data/validation (state-machine rules),
ui/dataset, query date-macros.
- Give objectstack-formula a references/_index.md like its 8 siblings
(it previously pointed at monorepo-relative packages/ paths instead).
- Mark the regen note maintainers-only and stop claiming the root barrel
re-exports every symbol (it doesn't — e.g. DATE_MACRO_TOKENS lives on
@objectstack/spec/data only).
- skills/README.md: reposition the bundle as serving any ObjectStack app
(not 'the monorepo'), document the install commands and the /skills
catalog boundary (objectstack-ai#3101), and describe the real skill anatomy
(rules/, contracts/, evals/).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Kj2MJEPXoUXC4LiC3XYJc
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cddocumentationImprovements or additions to documentationsize/mteststooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@os-zhuang