Repository navigation
docs(agents): name the component node BaseSchema in AGENTS.md section 4 - #8090
Conversation
…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
|
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
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 Generated by Claude Code Generated by Claude Code |
|
ACCEPT — governed in-seat review of PR #8090, head Implemented-by: Verified in a detached compare worktree at the PR head, not from the report:
Out-of-scope findings: #8092 (the fence's member list diverges from the real Landing regime: governed (root Generated by Claude Code |
维护者速读事情:objectui 仓库根的 改了什么:三处原地改名——接口声明、 为什么值得单独一趟:这个词汇缺口已复发两次,其中一次把 要请您留意的:dev 顺手量了那段示意接口与真实 席位意见:建议合并。受管面(仓库根 AGENTS.md),人工合并;合并后 #7434 关闭。 Generated by Claude Code |
Fixes #7434
PR B of triage prescription 5556499148 — the
domain:skillshalf. PR A (thedomain:devxhalf, 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 — isBaseSchema.Root
AGENTS.mdsection 4 was the last authored surface still teachingUIComponent. Three in-place renames, line-neutral: 558 lines before, 558 after; no new lines, no new section, no other file.改前 → 改后
interface UIComponent {interface BaseSchema {children?: UIComponent[];children?: BaseSchema[];({ 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
BaseSchemaand not the other twoUIComponentis not exported by@object-ui/types. Measured on this branch: 0 files underpackages/types/srcname it, against 101 forBaseSchema— 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.SchemaNodeis not written anywhere in this diff, deliberately. It isBaseSchemawidened withstring | number | boolean | null | undefined, and a node-slot position does not admit those — renderers narrow with atypeofobject 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.BaseSchema. Section 4 now agrees with it.Verification
Every exit code captured by redirecting first, then reading
$?— never through a pipe.node scripts/check-governed-queue-guard.mjs --test AGENTS.md⛔ 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-fencesevery TypeScript block in 227 document(s) is fenced ts/tsx/typescript…pnpm check:control-bytesOK (scanned 6473 tracked text file(s); skipped 85 binary)node scripts/check-changeset-presence.mjs1 file(s) changed, 0 of them published source… no changeset is owednode scripts/check-doc-links.mjsLinks are valid across 17 scan roots(AGENTS.mdis in its list under thediskrule)pnpm lint(whole repo)Tasks: 47 successful, 47 total; 0 errors, warnings all pre-existing and none in this diffpnpm lint:root32 problems (0 errors, 32 warnings)— pre-existingpnpm exec vitest run scripts/__tests__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, alongsidecheck-governed-queue-guard.test.ts(19 tests over the two files). Manual control-byte scan ofAGENTS.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.mjssetsROOT_PAGES = ['README.md'], andcheck-doc-snippet-types.mjs's own coverage ledger lists the root pages that are notREADME.md—AGENTS.mdamong 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:
UIComponentComponentSchemaBaseSchemaorigin/main(pre-edit)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 excludesAGENTS.mdwith the reason written into the file — adding it before this governed, human-merged PR lands would red the pin onmain. 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
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 againstpackages/types/src/base.tson this branch:propsandevents. The fence'seventsvalue type also namesActionDef, which@object-ui/typesdoes not export either (ActionSchemais the exported one).hiddenanddisabledare expression-or-boolean wire types on the real interface, not plain strings;childrenis the widerSchemaNodeshape there, not an array of the object half.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.
The published
skills/objectuitree 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.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