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

docs(agents): name the component node BaseSchema in AGENTS.md section 4 - #8090

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-7434-agents-md-baseschema
Sep 7, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/issue-7434-agents-md-baseschema

Conversation

@os-steve

@os-steve os-steve commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Fixes #7434

PR B of triage prescription 5556499148 — the domain:skills half. PR A (the domain:devx half, PR #8064) landed 2026-09-06T14:22Z. Under maintainer ruling 5556352576 (option 1), the documented name for "a component node" — the object half a renderer receives — is BaseSchema.

Root AGENTS.md section 4 was the last authored surface still teaching UIComponent. Three in-place renames, line-neutral: 558 lines before, 558 after; no new lines, no new section, no other file.

改前 → 改后

line 改前 改后
73 interface UIComponent { interface BaseSchema {
82 children?: UIComponent[]; children?: BaseSchema[];
124 ({ schema }: { schema: UIComponent }) ({ schema }: { schema: BaseSchema })

Line 82's trailing comment column is preserved: the // starts at column 41 on every row of that fence, before and after (measured, not eyeballed).

Why BaseSchema and not the other two

  • UIComponent is not exported by @object-ui/types. Measured on this branch: 0 files under packages/types/src name it, against 101 for BaseSchema — a live control, so that zero is a real zero and not a dead grep. A reader following this file reached for an identifier they could not import or type-check. Ruling option 2 (minting the export) was declined: a public-surface widening for a word.
  • SchemaNode is not written anywhere in this diff, deliberately. It is BaseSchema widened with string | number | boolean | null | undefined, and a node-slot position does not admit those — renderers narrow with a typeof object guard before reading keys and drop the primitives on the floor. Flattening that distinction is the regression the card, both triage comments and the ruling each warn against; this is the fourth restatement.
  • The topology table at line 51 already said BaseSchema. Section 4 now agrees with it.

Verification

Every exit code captured by redirecting first, then reading $? — never through a pipe.

gate exit verdict line
node scripts/check-governed-queue-guard.mjs --test AGENTS.md 3 ⛔ GOVERNED — 1 of 1 path(s) are on a governed surface: AGENTS.md x1 — the repo-root agent instruction file. This is the expected answer, and it is why this PR is a draft.
pnpm check:doc-fences 0 every TypeScript block in 227 document(s) is fenced ts/tsx/typescript…
pnpm check:control-bytes 0 OK (scanned 6473 tracked text file(s); skipped 85 binary)
node scripts/check-changeset-presence.mjs 0 1 file(s) changed, 0 of them published source… no changeset is owed
node scripts/check-doc-links.mjs 0 Links are valid across 17 scan roots (AGENTS.md is in its list under the disk rule)
pnpm lint (whole repo) 0 Tasks: 47 successful, 47 total; 0 errors, warnings all pre-existing and none in this diff
pnpm lint:root 0 32 problems (0 errors, 32 warnings) — pre-existing
pnpm exec vitest run scripts/__tests__ 0 Test Files 112 passed (112) · Tests 3341 passed (3341)

The vocabulary pin PR A added was confirmed collected by name, not inferred from a green total: scripts/__tests__/component-node-vocabulary-7434.test.ts, all four assertions green under --reporter=verbose, alongside check-governed-queue-guard.test.ts (19 tests over the two files). Manual control-byte scan of AGENTS.md: 0 hits, with a positive control that fires.

No ablation was run, and the reason is itself the finding below: no gate reads AGENTS.md's vocabulary today, so there is no nail to turn red. check-doc-fence-languages.mjs sets ROOT_PAGES = ['README.md'], and check-doc-snippet-types.mjs's own coverage ledger lists the root pages that are not README.md — AGENTS.md among them — as read by no doc gate at all. Reporting that plainly beats staging a green ablation that measured nothing.

Measured: could PR A's pin cover this file?

Ruling item 4 asked. Answer: yes, and cheaply — but only after this PR merges. Probe run on both revisions of the file:

revision banned UIComponent banned ComponentSchema live control BaseSchema
origin/main (pre-edit) 3 (lines 73, 82, 124) 0 1
this branch (post-edit) 0 0 4

The pin's regexes catch all three residue sites unmodified, and its live-control requirement — a must-hit word firing on the surface — is already satisfied on this file in both revisions, so the control is not vacuous. Extending the corpus is one line in scanSurface() plus one control assertion. The ordering is load-bearing and is why this PR does not do it: PR A's pin excludes AGENTS.md with the reason written into the file — adding it before this governed, human-merged PR lands would red the pin on main. That follow-up is filed rather than ridden here.

维护者速读(草稿)

这次改的是什么。 仓库根 AGENTS.md 第 4 节「The JSON Protocol」把「一个组件节点」这个概念叫作 UIComponent,而代码里根本没有这个导出。三处改名之后,这份指令文件用的词和 @object-ui/types 真正导出的名字一致了。业务上的意义只有一句:这是每个 agent 和每个新人写第一行 schema 之前会读的那份文件,它教的名字必须是能 import、能被类型检查的那个。

为什么值得单独走一趟。 这个词汇缺口已经复发过两次(#7082 更正九行、PR #7432 顺手修八处),而且代价不是「文档不好看」:其中一次把 check-doc-snippet-types 门禁自己的正对照打掉了,那一轮门禁以「HARNESS CONTROL FAILED」退出,对任何文档都没给出结论。一个没有约定的名字,能让一道质量门整轮失效 —— 这是把它当缺陷而不是当洁癖来处理的理由。

为什么是 BaseSchema。 三个候选里,只有它已经是真实导出(实测 101 个文件在用),而且是前两次独立修复各自落到的那个名字。选它零代码、零新公共面、不动发版。另一个候选 UIComponent 要先新增一个公共导出才配被写进文档 —— 为一个词加宽公共表面,踩人工底线,维护者已裁决不走。第三个候选 SchemaNode 是错的:它比节点槽位宽,会把原始值放进只接受对象的位置。

风险面。 改动是三行原地替换,行数不变(558 → 558),不含代码、不含发版、不欠 changeset(门禁自己判定「no changeset is owed」)。整仓 lint 与 scripts/__tests__ 全套均绿。唯一的行为性影响是文档语义:今后照这份文件抄的人拿到一个真实存在的类型名。

合并方式。 AGENTS.md 在受管面册上(守卫以 exit 3 明确判定),所以这个 PR 停在 draft,等人类合并 —— 席位不翻 ready、不入队、不挂 auto-merge、不 approve。这是本卡最后一个未完成的半边,合并后 #7434 可以关闭。

席位意见:

Out of scope — reported, not repaired

  1. The fenced interface in section 4 does not match the real BaseSchema, and ruling item 3 asked for the measurement. The fence is illustrative prose, so it was not expanded — only the name changed. Measured against packages/types/src/base.ts on this branch:

    • Absent from the real interface: props and events. The fence's events value type also names ActionDef, which @object-ui/types does not export either (ActionSchema is the exported one).
    • Present but declared differently: hidden and disabled are expression-or-boolean wire types on the real interface, not plain strings; children is the wider SchemaNode shape there, not an array of the object half.
    • On the real interface but absent from the fence: name, label, description, placeholder, style, data, body, visible, visibleWhen, visibleOn, hiddenOn, disabledOn, testId, ariaLabel.

    Whether an illustrative fence in an instruction file should track the real interface is a judgment call for the maintainer, not a mechanical repair, which is why it is here and not in the diff.

  2. The published skills/objectui tree teaches the same unexported name in five places, already filed by PR A's dev as objectui#8065 (finding, unassigned). It is a third governed surface that neither PR A nor this PR covers. Noted here only so this PR is not read as having emptied the class.

  3. Extending PR A's pin to AGENTS.md — measured above, one line plus a control, and it must land after this PR merges. Filed as a follow-up rather than ridden here.


Session: session_019RfFHiRCSs3JXLK4cwcfox (written as prose so it survives a body edit).

Generated by Claude Code


Generated by Claude Code

…ol section

AGENTS.md section 4 illustrated the protocol node as `interface UIComponent`,
its `children` slot as `UIComponent[]`, and the renderer-loop signature as
`{ schema: UIComponent }`. `UIComponent` is not exported by `@object-ui/types`
(0 files under `packages/types/src`, against 101 for `BaseSchema`), so a reader
following this file reached for an identifier they could not import or
type-check. The topology table three sections up already named `BaseSchema`.

Three in-place renames, line-neutral, no other change. `SchemaNode` is not
written here: the wider union admits `string | number | boolean`, which a
node-slot position does not.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox

os-steve commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

Follow-up card numbers for the two items in this PR's "Out of scope" section, posted as a comment rather than a body edit — a PATCH of a pull request body is documented in this repo's AGENTS.md to downgrade the session-URL attribution to bare form and append a second footer block, and the platform already appended one at creation. A comment costs neither.

  • Item 1 (the fenced interface's member list versus the real BaseSchema) — filed as objectui#8092, finding only, unassigned. Carries the full measurement table and three options; ⛔ this seat did not choose among them.
  • Item 3 (extending PR docs(types,api): name the component node BaseSchema and pin the vocabulary #8064's vocabulary pin to the two governed surfaces) — filed as objectui#8093, finding only, unassigned, with a Blocked-by: line naming this PR and objectui#8065. The ordering is mechanical: extending the pin before both governed repairs land would red it on main from the moment it arrives.
  • Item 2 was already filed by PR A's dev as objectui#8065 and needed nothing from this seat.

Both new cards were read back byte-for-byte after filing: 0 delta, attribution intact, no tag-shaped fragments eaten.

All 28 check runs on head b9d97f06 are complete — 25 success, 3 skipped, 0 failures — plus the Vercel commit status green. Governed Surface Queue Guard is success, which is its pull_request leg exiting 0 by design; the local --test AGENTS.md verdict is exit 3, GOVERNED. ⛔ This PR stays a draft: no ready flip, no queue, no auto-merge, no approval from this seat.

Generated by Claude Code


Generated by Claude Code

@claude

claude Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

ACCEPT — governed in-seat review of PR #8090, head b9d97f06 (skills seat, 2026-09-06T15:2xZ).

Implemented-by: claude/issue-7434-agents-md-baseschema (os-dev subagent, opus — no dispatch-gates.mjs in this repo; an instruction file, no contract move)
Reviewed-by: session_019RfFHiRCSs3JXLK4cwcfox (skills seat)

Verified in a detached compare worktree at the PR head, not from the report:

  • One file, root AGENTS.md, +3/−3, 558 lines before and after. The three sites the triage prescription named are the whole diff: §4's fenced interface UIComponent { → interface BaseSchema {, its children?: UIComponent[]; → children?: BaseSchema[]; (the trailing-comment column kept), and the renderer-loop signature ({ schema }: { schema: UIComponent }) → { schema: BaseSchema }. UIComponent now occurs 0 times in the file; SchemaNode is written nowhere in the diff — the node-slot / union distinction the triage restated three times is kept. The fence was renamed, not expanded, as ruled.
  • Gates at the head: check-governed-queue-guard --test AGENTS.md exit 3 (GOVERNED — the repo-root agent instruction file); check-doc-fence-languages exit 0; check-changeset-presence exit 0 ("no changeset is owed" — objectui has no skip-changeset label and needs none here). The dev's report adds check-doc-links green, whole-repo pnpm lint through the shared verify lock (exit 0, 47/47 tasks), and vitest run scripts/__tests__ 112 files / 3341 tests green with PR A's vocabulary pin collected by name (four pin assertions + fifteen guard assertions printed individually). No ablation was run, and the seat agrees with the reason: no gate reads AGENTS.md's vocabulary today, so there was nothing to turn red — the measurement offered instead (PR A's own regexes: UIComponent 3 → 0, live control BaseSchema 1 → 4) is the right instrument. PR checks on b9d97f06: 25 success, 3 skipped, 0 failed (28 runs, converged).
  • Report hygiene: os-dev-report on finding(docs,types): the repo has no documented name for "a component node" — AGENTS.md says UIComponent (not exported), the docs said ComponentSchema (a narrow block-family kind, now retired), and the real object half is BaseSchema #7434, JSON closes; PR body opens Fixes #7434 — this is the card's last open half (PR A docs(types,api): name the component node BaseSchema and pin the vocabulary #8064 landed 14:22Z); a ## 维护者速读(草稿) present; no model identifier; no label or assignee written by the dev; eight MCP calls declared (two issue_write create among them — that path drops the attribution footer; both cards repaired by the seat through REST in this stroke).

Out-of-scope findings: #8092 (the fence's member list diverges from the real BaseSchema — two members that do not exist, one unexported element type, three declared differently) is this lane's (AGENTS.md), graded domain:skills p3 and queued serial behind this PR on the same file; #8093 (extend PR A's vocabulary pin to the two governed surfaces once both repairs land) is a scripts/__tests__ change and goes to triage for its lane, footer restored. Neither is repaired here — ruling item 3 asked for the measurement, and the dev delivered it.

Landing regime: governed (root AGENTS.md) ⇒ the PR stays a draft; reviewers os-zhuang + hotlong requested in this same act, needs-user-decision added, the final 维护者速读 posted as the next comment; human merge. On the merge #7434 closes by Fixes.


Generated by Claude Code

@claude
claude Bot requested review from hotlong and os-zhuang September 6, 2026 15:24
@claude

claude Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

维护者速读

事情:objectui 仓库根的 AGENTS.md 第 4 节把「一个组件节点」叫作 UIComponent,而代码里没有这个导出。这是每个 agent 写第一行 schema 之前会读的文件,它教的名字必须是能 import、能被类型检查的那个。您已裁定用 BaseSchema(真实导出,101 个文件在用,零代码、零新公共面)。

改了什么:三处原地改名——接口声明、children 槽位、渲染循环签名。行数不变(558 → 558),不含代码,不欠 changeset。SchemaNode 一处都没写:节点槽位用 BaseSchema,只有联合确实正确的地方才用 SchemaNode,这条区分保住了。

为什么值得单独一趟:这个词汇缺口已复发两次,其中一次把 check-doc-snippet-types 门禁自己的正对照打掉,整轮门禁无结论。文档与 README 那一半(PR #8064)今天 14:22Z 已合,本 PR 是这张卡最后的半边。

要请您留意的:dev 顺手量了那段示意接口与真实 BaseSchema 的差距——两个成员不存在(props、events)、一个元素类型未导出(ActionDef)、三个成员声明不同。改名让这段的「宣称」更强了,而成员表还是旧的。已立卡 #8092 由本席排在本 PR 之后处理,不在这里扩写。

席位意见:建议合并。受管面(仓库根 AGENTS.md),人工合并;合并后 #7434 关闭。


Generated by Claude Code

@os-zhuang
os-zhuang marked this pull request as ready for review September 7, 2026 03:26
@os-zhuang
os-zhuang added this pull request to the merge queue Sep 7, 2026
Merged via the queue into main with commit 8e02c92 Sep 7, 2026
30 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-7434-agents-md-baseschema branch September 7, 2026 03:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Improvements or additions to documentation needs-user-decision

Projects

None yet

3 participants