Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

docs(skills,AGENTS): teach action:button + actionType, retire the events bag - #9592

Merged
os-zhuang merged 2 commits into
mainfrom
claude/issue-7945-events-bag-retirement
Sep 20, 2026
Merged

os-zhuang merged 2 commits into
mainfrom
claude/issue-7945-events-bag-retirement

Conversation

@os-justin

Copy link
Copy Markdown
Collaborator

Fixes #7945

The published skills/objectui pack and AGENTS.md still taught the events action
bag as the action system. The live dialect is action:button + actionType — the
spelling 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)

file site after
skills/objectui/SKILL.md "4. The action system (interactivity)" action:button node + a ⛔ There is no events bag note
skills/objectui/guides/page-builder.md "5. Use action data, not inline callback spaghetti" action:button node
skills/objectui/rules/protocol.md "Rule: Action Event Structure" renamed to "Rule: Actions Are Node Types, Not An Event Bag", still normative
AGENTS.md §4 protocol sketch the events? member is dropped (the sketch is declared abridged)
AGENTS.md §5 Commandment #4 action:button + an explicit never-author-events clause

Line 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

⚠️ The card's own probe was vacuous and is corrected here. The card ran

git grep -nE '\??\.events\b' -- 'packages/*/src' 'apps/*/src'

and read its exit 1 as "zero read points". That pathspec matches zero tracked
files
(git ls-files -- 'packages/*/src' prints 0), so the probe searched nothing —
a lit control on the same pathspec (.className, 472 hits elsewhere) also returned
zero, 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 response events (AuditPanel, ResourceHistoryPage),
TimelineSchema.events, and i18n keys. The conclusion holds; the measurement behind
it did not, and now does.

EventableSchema still has exactly three references — its declaration, one union
member, one index re-export — with no extender, mirror or reader.

The decisive in-tree statement is the note on BaseSchemaCore in
packages/types/src/zod/base.zod.ts, which already names these very surfaces:

⚠️ BaseSchema declares NO events key ... AGENTS.md's abridged protocol sketch
shows [an events? member] and its action-system commandment authors one, but
BaseSchemaCore declares no such member and nothing reads schema.events:
whatever a document writes under that key, no renderer runs it. BaseSchemaCore
is .passthrough(), so such a node is KEPT, judged by nothing and run by nothing.
⛔ Do not send an author there.

Gates

Derived by hand from this repo's package.json and .github/workflows/ —
dispatch-gates.mjs derives objectstack families, not this repo's.

gate exit
check:skill-examples (--self-test, then corpus) see below
check:skills-paths 0 — 28/28 stated paths resolve across skills/
check:skill-eval-tokens 0
check:control-bytes 0
check:new-line-citations 0 new cross-file citations
check:governed-queue-guard --self-test 0
check-changeset-presence 0 — saw 4 changed files, 0 published source ⇒ none owed
governed classifier --test on all 4 paths 3 — GOVERNED, 4 of 4

No 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-examples parses JSON fences but does not schema-validate them, and
BaseSchema is .passthrough(), so its green was never coverage here.

⚠️ Two more sites exist than the card's five — skills/objectui/guides/architecture.md
and the abridged sketch in skills/objectui/rules/protocol.md both still carry
an events? member in a BaseSchema teaching copy.
guides/architecture.md is outside this dispatch's declared file surface, and the
two are a matched pair that should move together, so neither sketch is edited here.
Instead the renamed rule in rules/protocol.md now states normatively why events
appears 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#9587 also edits AGENTS.md (hunks at 172 and 201-209); mine are at 79-107.
    Disjoint, verified against its diff. origin/main is merged into this branch.
    ⚠️ That PR is currently not draft although it is governed-surface; that is another
    actor's state on another PR and is left untouched, reported only.
  • noted, not filed: the card writes the sketch type as ActionDef[]; the tree says
    ActionSchema[]. The card is the stale one — ActionSchema is declared in
    packages/types/src/crud.ts, while ActionDef is 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

…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
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Sep 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 8 pending changeset(s) describe a file this change touches

Their bodies publish verbatim into the CHANGELOG at the next release, so this is a request to re-read them against your diff — addressed here because you are the one seat that can answer it without re-deriving anything.

⛔ Nothing here blocks, and nothing here is a verdict on your change. This gate exits 0, is not a required context, and judges name resolution, never meaning: it asked whether a pending body names a file you touched. "Is this sentence still true?" is the one question it will not answer, and the one you are being asked to answer.

.changeset/4795-bindable-text-keys.md

  • names skills/objectui/rules/protocol.md → skills/objectui/rules/protocol.md — edited by this change

    Published authoring guidance updated to match: skills/objectui/rules/protocol.md (new "Bindable Text Keys" rule), plus the page-builder, schema-expressions and data-integration guides, which taught the now-retired "never evaluated" statement and its host-pre-resolution workaround.

.changeset/6357-basechema-bind-declaration.md

  • names AGENTS.md → AGENTS.md — edited by this change

    bind was read by ten production sites and declared by no schema shape. It resolved as any through BaseSchema's index signature and rode .passthrough() on the validator, while three separate documents taught it as an authorable key of every node: this repo's own AGENTS.md §4 ("Every node in the UI tree follows this shape (@object-ui/types)"), the published agent-facing skills/objectui/rules/protocol.md ("Every UI component node MUST follow this shape"), and content/docs/fields/grid.mdx. So the agent-facing protocol told authors to write a key the published types did not know existed.

  • names skills/objectui/rules/protocol.md → skills/objectui/rules/protocol.md — edited by this change

    bind was read by ten production sites and declared by no schema shape. It resolved as any through BaseSchema's index signature and rode .passthrough() on the validator, while three separate documents taught it as an authorable key of every node: this repo's own AGENTS.md §4 ("Every node in the UI tree follows this shape (@object-ui/types)"), the published agent-facing skills/objectui/rules/protocol.md ("Every UI component node MUST follow this shape"), and content/docs/fields/grid.mdx. So the agent-facing protocol told authors to write a key the published types did not know existed.

.changeset/6475-gantt-block-face-declared.md

  • names skills/objectui/guides/page-builder.md → skills/objectui/guides/page-builder.md — edited by this change

    Maintainer ruling, objectui#6475 (2026-08-27), Option A — enforce as-is, immediately, no warning window (the startup-stage no-gradualism rule, objectstack#12668: transitions do not get phased windows without named external-user evidence, and none exists here). A census of every gantt block reachable through ObjectGanttSchema in this repository — the examples/schema-catalog fixtures, content/docs/plugins/plugin-gantt.mdx, and the published skills/objectui/guides/page-builder.md guide — found zero blocks missing the trio.

.changeset/6505-predicate-valued-gate-rules.md

  • names AGENTS.md → AGENTS.md — edited by this change

    The accept set widens to what the protocol already declares and the runtime already accepts, not beyond it. AGENTS.md §4 declares both keys as expressions, SchemaRenderer evaluates them through hasDeclaredPredicate + evaluateCondition, @objectstack/spec normalizes every authored predicate into a { dialect, source } envelope, and the objectui#3862 / objectui#3955 rulings are entirely about which expression spellings count as declared. This table was the one place in the repo that disagreed, so this restores declared = enforced rather than changing a contract.

.changeset/6575-data-table-bind-diagnostic.md

  • names skills/objectui/rules/protocol.md → skills/objectui/rules/protocol.md — edited by this change

    The platform was already paying for this in teaching rather than in diagnostics: skills/objectui/rules/protocol.md documents the pothole verbatim and a pin test locks the behaviour. The warning now also reaches the console, where the author who did not read the docs is standing:

.changeset/6665-data-table-non-array-data-diagnostic.md

  • names skills/objectui/rules/protocol.md → skills/objectui/rules/protocol.md — edited by this change

    The spelling that opened the card is a ${...} expression string, and it is a defect rather than a design because the SAME expression is evaluated one key over. Re-measured on merge-base 5967be095 through the real SchemaRenderer (the table was previously quoted from skills/objectui/rules/protocol.md as a measurement on f1c27f037 and had not been re-run); all four legs reproduced, and they are now pinned as tests rather than prose:

.changeset/7122-spec-17-3-0-parity-reconciliation.md

  • names AGENTS.md → AGENTS.md — edited by this change

    Two breaking consequences for a consumer that names the type directly. (1) It no longer declares editMode; the key is now carried by the spec's ServiceObject, so ObjectSchemaMetadata still has it, but code written against the extension type ALONE loses it. (2) interface → type alias also ends declaration merging: a consumer that reopened declare module '@object-ui/types' { interface ObjectSchemaClientExtensions { … } } to add its own client-side member no longer compiles, because an alias cannot be reopened. minor rather than major per AGENTS.md's version-alignment rule — objectui's own breaking changes are graded minor with the semantics stated in the body, since any major in the fixed group would push all 39 packages off @objectstack's major.

.changeset/7714-lookup-draft-stays-client-side.md

  • names AGENTS.md → AGENTS.md — edited by this change

    minor rather than major per AGENTS.md: objectui's major tracks @objectstack's, so objectui's own breaking changes ship as minor with the breaking semantics stated.

Read the paragraph, not the line: both false halves of the objectui#8617 claim sat in one paragraph, and correcting either alone would have left it asserting the same wrong thing.

If a claim did go false, correct the body. That is precedented and prose-only, frontmatter untouched; check-changeset-overwrite.mjs will report the correction as its own case 2 ("correcting a declaration on purpose … legitimate"), which is the intended shape — one gate asks for the read, the other records the write.

Not covered, stated so nobody reads this as more: a claim that was born false (a changeset this change adds is excluded by construction), a claim spelled as a symbol or a package rather than a backticked file name, and a file named ambiguously.

Compared the checked-out tree with 544ecba84 (merge-base with origin/main): 4 file(s) changed outside .changeset/, read against 1097 pending declaration(s) that publish a body (1598 pending in total). · run

@os-zhuang
os-zhuang marked this pull request as ready for review September 20, 2026 13:57
@os-zhuang
os-zhuang added this pull request to the merge queue Sep 20, 2026
Merged via the queue into main with commit 7550728 Sep 20, 2026
34 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-7945-events-bag-retirement branch September 20, 2026 14:22
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 28, 2026
…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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants