Repository navigation
docs(skills,AGENTS): teach action:button + actionType, retire the events bag - #9592
Conversation
…nts bag The published `skills/objectui` pack and AGENTS.md still taught the `events` action bag as the action system, in five places, while the runtime dialect is `action:button` + `actionType` — the spelling landed in quick-start and `content/docs`. Nothing reads that bag. `BaseSchema` declares no `events` member and no renderer reads `schema.events`; `BaseSchemaCore` is `.passthrough()`, so an authored one is kept, judged by nothing and run by nothing. The in-tree note in `packages/types/src/zod/base.zod.ts` names AGENTS.md's sketch and commandment as the surfaces carrying the wrong teaching, which is what this commit repairs. Each replacement is in place, so the published pack grows by 2 net lines. The normative site in `rules/protocol.md` stays normative: the rule is renamed to "Rule: Actions Are Node Types, Not An Event Bag" and now also states, for the abridged schema sketch earlier in the same file, why `events` appears there and that nothing reads it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XeoGH6X7MtfbjcRDscyXi1
…nts-bag-retirement
|
changeset-claim-re-read
|
…sion roots (objectui#9672) (objectstack-ai#9997) Fixes objectstack-ai#9672 Clause-②: yes ## What changed `skills/objectui/guides/page-builder.md` only — one guide, seven hunks, net +8 lines (331 → 339 against BASE `edbcf1e7a`). 1. Section 4 「Wire renderer and registry cleanly」 step 3 no longer says 「Provide `dataSource` and contextual data through renderer provider」. It now names ONE channel: `PredicateScopeProvider` from `@object-ui/react` — every key of the `scope` you hand it becomes an expression root (and `bind` reads the same bag). It also states which roots the renderer adds on its own (`record`, `page`), that nothing publishes `data`, and what `SchemaRendererProvider`'s `dataSource` still is: the adapter the object-bound blocks fetch through, not an expression root. The provider fence is pointed at, not copied — `guides/auth-permissions.md` carries it since PR objectstack-ai#9669. 2. The four `${data.…}` reads the page's own examples made (BASE :43, :47, :179, :193) now read roots the surrounding prose says the host published: `${userRole !== 'admin'}`, `${metrics.activeUsers}`, `${metrics.growth}`. Two short sentences carry the publication claim (section 3's lead-in and the 「Expression evaluation boundaries」 lead-in), the same shape as auth-permissions.md's 「a page whose host published `userRole`」. Residual `${data.` in this file after the change: 0. ## The measurement that decided the channel `packages/react/src/SchemaRenderer.tsx`, the evaluator that `hidden` / `content` / a `statistic`'s `value` are evaluated on (the `new ExpressionEvaluator({ … })` block inside `evaluatedSchema`): - spreads `usePredicateScope()` — the `PredicateScopeProvider` context (`packages/react/src/hooks/useExpression.ts`: `PredicateScopeProvider` / `usePredicateScope`, exported through `hooks/index.ts` and the package index); - adds `current_user` (alias of a published `user`), `record` (from `RecordContextProvider`, only when a row is bound) and `page` (page variables); - binds NO `data`. The block's own comment: 「`data` is NOT here, and the absence is the decision (objectui#9308, maintainer ruling 2026-09-13 option B)」. `SchemaRendererContext.dataSource` is read by `useViewData` (the object-bound blocks' adapter) and is no longer an expression root; `useDataScope` — what `bind` reads — now walks `usePredicateScope()` too (same ruling, per its docblock). So under the old step-3 wiring a `${data.metrics.activeUsers}` has no root: `hidden` fails soft (hidden for everyone), a `text` `content` / `statistic` `value` prints its own source text — the card's silent failure, reproduced by reading rather than asserted. `useExpression` / `useCondition` (the widget tier) merge the same published scope under the caller's local context, so the roots are the same on both tiers. ## Class count, re-derived (⛔ not copied forward) `git grep -c '\${data\.' -- 'skills/objectui/**/*.md'` at `edbcf1e7a`: architecture.md 1 · data-integration.md 2 · page-builder.md 4 · schema-expressions.md 21 · testing.md 4 · rules/protocol.md 13 — six files, 45 reads. Only page-builder.md is touched here: data-integration.md / schema-expressions.md / rules/protocol.md are PR objectstack-ai#9378's (objectui#9370); testing.md is objectui#9380's; auth-permissions.md was repaired by PR objectstack-ai#9669 and reads 0. ## Line readings (the PM's budget: net ≤ +8 in the file) | reading | before (`edbcf1e7a`) | after | |---|---|---| | `skills/objectui/guides/page-builder.md` | 331 | 339 (+8, at the cap) | | package `skills/objectui/**/*.md`, 16 files | 4,640 | 4,648 | Package spelling: `find skills/objectui -name '*.md' -type f` piped through `cat` and `wc -l` (a `git ls-files 'skills/objectui/**/*.md'` glob skips the two top-level files and reads 4,439 — not the figure used). ## Region fence — open PR objectstack-ai#9592 (objectui#7945) PR objectstack-ai#9592's only hunk on this file is `@@ -105,18 +105,16 @@` (section 5, the `events` bag → `action:button`). BASE :102–:122 — that hunk plus its leading context — is byte-identical at :109–:129 of this branch (`diff` empty). Nothing here touches section 5, so the two land in either order. ## The card's 「related」 item The 「Provider composition pattern」 example that nests only `SchemaRendererProvider` is NOT in page-builder.md (`composition` → 0 hits in this file at BASE; control `SchemaRenderer` → 5). It lives in `skills/objectui/guides/auth-permissions.md` under the heading 「## Provider composition pattern」, an unmarked `typescript` fence — a file outside this card's surface (PR objectstack-ai#9994 / objectui#9671 holds it). Not touched here; handed to the seat in the dev report. ## Gates (exit captured before any pipe; the gate's own verdict line quoted) - build closure under the shared lock — `pnpm exec turbo run build $(node scripts/check-skill-examples.mjs --build-filter) --concurrency=2` → `VERDICT command-exit 0` (29/29 cached, shared worktree cache) - `node scripts/check-skill-examples.mjs --self-test` → exit 0, 「60 cases pass」 - `pnpm check:skill-examples` → exit 0: 「Semantic phase: 15 of 15 ts fence(s) judged, 0 failed. JSON phase: 70 fence(s) parsed, 0 failed.」 — all ten marked page-builder.md fences read `pass` in `--list` - `pnpm check:skill-eval-tokens` → exit 0: 「Every must_contain token is taught by its own skill bundle.」 (no eval touched) - `pnpm check:skills-paths` → exit 0 (88/89 resolve, 1 baselined) - `pnpm check:new-line-citations` → exit 0 on the committed head: 「0 new citation(s)」 - `pnpm check:control-bytes` → exit 0 (8061 files) - `node scripts/check-governed-queue-guard.mjs --test skills/objectui/guides/page-builder.md` → exit 3, 「GOVERNED — 1 of 1 path(s)」 — expected: Tier H, this PR stays draft until an authorized approval - `node scripts/check-changeset-presence.mjs` → exit 0, no changeset owed (`skills/**` is not published source) - `pnpm exec vitest run scripts/__tests__/check-skill-eval-tokens.test.ts` → exit 0, 36 passed (the only test naming `page-builder.md`; it uses a fixture by that name) `pnpm lint` not run locally: repo-wide and CI-owned; the diff is one `.md` outside every eslint population. ## Acceptance notes - noted, not filed: the auth-permissions.md 「Provider composition pattern」 fence above nests no `PredicateScopeProvider`, so a reader copying it gets no expression scope — incompleteness, not a false statement. 承接者: the seat, since PR objectstack-ai#9994 holds that file. ## 维护者速读(草稿) **改了什么**:只改 `skills/objectui/guides/page-builder.md` 一个文件,净 +8 行。第 4 节第 3 步原来教读者「通过 renderer provider 提供 `dataSource` 和上下文数据」,而这条通道在 objectui#9308 之后已不再给表达式发布 `data.*` 根。现在这一步只点名一条能用的通道:`PredicateScopeProvider`(`@object-ui/react`),交给它的 `scope` 的每个键都成为表达式的根;同时写明渲染器自己只补 `record` 与 `page`、没有任何东西发布 `data`、`SchemaRendererProvider` 的 `dataSource` 是对象绑定块取数的适配器而不是表达式根。页面自己的四处示例从 `${data.userRole}` / `${data.metrics.activeUsers}` 改为读宿主已发布的 `userRole` / `metrics`,并用一句话写明「宿主发布了这两个键」。 **为什么改**:照旧文接线的读者,页面不报错但结果是错的:`hidden` 门对所有人都隐藏,`text` 的 `content` 与 `statistic` 的 `value` 把 `${data.metrics.activeUsers}` 这串字符原样打到页面上。这是 objectui#9379(auth-permissions.md,PR objectstack-ai#9669 已修)同一类问题的又一个成员;修法照抄那次的形状,不照抄字句。 **风险与代价(含回滚)**:纯文档改动,不动任何包源码、不发版、不欠 changeset;`check:skill-examples` 对本文件十个标记示例全部通过。与在途 PR objectstack-ai#9592(改同文件第 5 节)区域不相交,先后合并都干净。回滚 = revert 这一个 commit。 **席位意见**:(留空) **你要做的**:`skills/**` 是受管面,本 PR 停在 draft;由 `os-zhuang` / `hotlong` 之一给一条 APPROVED review 后,认领席落地。 --- _Generated by [Claude Code](https://claude.ai/code/session_01W5y9kRg1YtYaMQYExVLRc2)_ Co-authored-by: Claude <noreply@anthropic.com>
Fixes #7945
The published
skills/objectuipack andAGENTS.mdstill taught theeventsactionbag as the action system. The live dialect is
action:button+actionType— thespelling objectui#7898 / PR objectui#7931 landed and objectui#7936 / PR objectui#7949
put into quick-start. This replaces the teaching in place.
What changed (5 sites, 4 files)
skills/objectui/SKILL.mdaction:buttonnode + a⛔ There is no events bagnoteskills/objectui/guides/page-builder.mdaction:buttonnodeskills/objectui/rules/protocol.mdAGENTS.mdevents?member is dropped (the sketch is declared abridged)AGENTS.mdaction:button+ an explicit never-author-eventsclauseLine budget
skills/**net delta: +2 lines (29 added, 27 removed) against the +10 ceiling.Every replacement is in place rather than delete-and-append. Whole published pack:
4604 to 4606 lines across 16 markdown files.
Evidence the channel is dead
and read its
exit 1as "zero read points". That pathspec matches zero trackedfiles (
git ls-files -- 'packages/*/src'prints 0), so the probe searched nothing —a lit control on the same pathspec (
.className, 472 hits elsewhere) also returnedzero, which is what exposed it. Re-run over
'packages/**/src/**' 'apps/**/src/**'the probe returns 17 hits, none of them the SDUI node bag: validation-rule trigger
events(object-validation-engine,HookDefaultInspector,ObjectValidationsPanel,ValidationPreview), audit-log responseevents(AuditPanel,ResourceHistoryPage),TimelineSchema.events, and i18n keys. The conclusion holds; the measurement behindit did not, and now does.
EventableSchemastill has exactly three references — its declaration, one unionmember, one index re-export — with no extender, mirror or reader.
The decisive in-tree statement is the note on
BaseSchemaCoreinpackages/types/src/zod/base.zod.ts, which already names these very surfaces:Gates
Derived by hand from this repo's
package.jsonand.github/workflows/—dispatch-gates.mjsderives objectstack families, not this repo's.check:skill-examples(--self-test, then corpus)check:skills-pathsskills/check:skill-eval-tokenscheck:control-bytescheck:new-line-citationscheck:governed-queue-guard --self-testcheck-changeset-presence--teston all 4 pathsNo changeset: markdown only, no published source of a released package and no
manifest contract moved — the gate says so rather than me.
Scope
⛔ No new gate was built (the card rules that out: a new scanner is a new population).
check:skill-examplesparses JSON fences but does not schema-validate them, andBaseSchemais.passthrough(), so its green was never coverage here.skills/objectui/guides/architecture.mdand the abridged sketch in
skills/objectui/rules/protocol.mdboth still carryan
events?member in aBaseSchemateaching copy.guides/architecture.mdis outside this dispatch's declared file surface, and thetwo are a matched pair that should move together, so neither sketch is edited here.
Instead the renamed rule in
rules/protocol.mdnow states normatively whyeventsappears in that sketch and that nothing reads it — which covers the pair from the
authoritative file without a half-fix. See
## Acceptance notes.Acceptance notes
objectui#9587also editsAGENTS.md(hunks at 172 and 201-209); mine are at 79-107.Disjoint, verified against its diff.
origin/mainis merged into this branch.actor's state on another PR and is left untouched, reported only.
noted, not filed:the card writes the sketch type asActionDef[]; the tree saysActionSchema[]. The card is the stale one —ActionSchemais declared inpackages/types/src/crud.ts, whileActionDefis a different, app-shell-side type.Successor: this PR, which removes the line.
维护者速读(草稿)
改了什么 —— 对外发布的
skills/objectui技能包和AGENTS.md里,有五处仍在教events动作包。本 PR 把这五处换成已经在跑的写法:
action:button节点 +actionType。这是替换,不是扩写:发布包净增 2 行(预算上限 +10)。
为什么改 —— 运行时根本没有人读
events。它不是"要废弃",是已经死了:BaseSchema没有声明这个成员,没有任何渲染器读
schema.events,而节点是.passthrough()的,所以作者写进去的东西会被原样保留、不被校验、也不被执行 —— 没有报错,没有日志,按钮就是不动。
问题在于:技能包才是 AI 模型实际读的那一份。文档已经在 objectui#7936 改干净了,技能包还在
教旧的,等于我们一边发产品一边发一份会让客户写出死代码的说明书。
风险与代价(含回滚) —— 风险低:纯文档,没有代码改动,没有发布契约变化,因此不欠 changeset
(门禁自己判的,不是我说的)。唯一实质判断是
rules/protocol.md那条规则改了标题(
Rule: Action Event Structure→Rule: Actions Are Node Types, Not An Event Bag);已确认全仓没有任何地方引用旧标题锚点。回滚 = revert 这一个 commit,无迁移、无残留。
席位意见 ——
你要做的 —— 一个动作:看一眼 diff,同意就人工合并。本 PR 四个文件全部落在受管面上
(门禁判定
GOVERNED — 4 of 4),所以它停在 draft,不入队、不自动合并,也不会有 agent给它批准 —— 按规矩这条只能由你来落。
🤖 Generated with Claude Code
https://claude.ai/code/session_01XeoGH6X7MtfbjcRDscyXi1
Generated by Claude Code