Repository navigation
docs(skills): give the protocol rule’s CORRECT data-table fence the required data (objectui#12135) - #12138
Conversation
…equired `data` (objectui#12135)
The "CORRECT" `data-table` example under "Rule: No Schema Property Invention"
in `skills/objectui/rules/protocol.md` carried `columns` only. `DataTableSchema`
declares `data: z.array(z.any())` as required, so both authoring faces refused
the node the skill tells an agent to copy ("data: Invalid input: expected
array, received undefined"). The fence gains a one-row inline `data`, the same
shape the file's own "Provider rows into a data-table" table teaches as the
supported route.
Re-derived over every json/jsonc fence under skills/objectui/** with the strict
and tolerant faces from the built @object-ui/types dist: 70 fences, 48 node
documents, 9 refused by the strict face at base, 8 of them deliberate
counter-examples; this fence was the only "CORRECT"-labelled one. After the
edit: 8 refused, all counter-examples.
The os:check markers on json/jsonc fences stay: scripts/check-skill-examples.mjs
reads them (JSON_FENCE_LANGUAGES) and holds the marked json population under a
shrink-only MARKED_FLOOR of 70, so removing any would red that gate.
Empty-frontmatter changeset: skills/** ships through `npx skills add` and sits in
no package's files[].
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u73oxZ5X95qrARPTeoU6v
Contract reviewServed-tier: Reviewed by the skills seat 2 in seat ( ① Derived judgments
② Semver levelNo package releases: ③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
维护者速读(终稿)· PR #12138 · #12135席位 2( 改了什么:对外发布的 为什么改:这个示例缺了必填的 风险与代价(含回滚):极低——一行教学文本,无代码、无发布包。回滚 = revert 这一个 commit。 席位意见:ACCEPT。一处更正要当众认:派发令(以及卡片正文、分诊评论)说「没有程序读 json fence 上的 你要做的:同意即给一个 APPROVED review;落地由席位走队列。 Generated by Claude Code |
Contract reviewServed-tier: Reviewed by the skills seat 2 in seat ( ① Derived judgments
② Semver levelNo package releases: ③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #12135
Clause-②: no
Landing repo objectui · surface
skills/**(governed, Tier H: this PR stays draft until an authorized approver's review is on it, and the dispatching seat lands it). Dispatched by the skills seat of PM sessionsession_011u73oxZ5X95qrARPTeoU6v; the claim comment on the card names this branch.What changed
skills/objectui/rules/protocol.md, "Rule: No Schema Property Invention", the fence labelled "✅ CORRECT": thedata-tablenode gains a one-row inlinedataarray.DataTableSchema(packages/types/src/zod/data-display.zod.ts) declaresdata: z.array(z.any())as required, so at base both authoring faces refused the very node the skill tells an agent to copy, withdata: Invalid input: expected array, received undefined. The row uses the person the bundle's otherdata-tableexamples already use. The paragraph still teaches "no keys the spec does not declare"; the example now shows the two declared keys the node needs. Net +1 line..changeset/12135-protocol-correct-fence-data.md: an empty-frontmatter declaration.skills/**ships throughnpx skills addand sits in no package'sfiles[](git grep -n '"skills' -- 'packages/*/package.json'answers nothing), so no package releases.Nothing else moved: no checker, no gate, no marker line.
D3 — every json/jsonc fence under
skills/objectui/**, re-derived with both facesPredicate: the one
scripts/check-doc-json-fences.mjs(objectui#12127, merged) judgescontent/docswith — its exportedscanJsonFences/classifyFence/nodeTypesOf, plusStrictAnyComponentSchema.safeParseandAnyComponentSchema.safeParsefrom the BUILTpackages/types/dist/zod/index.zod.js— pointed atskills/objectui/**by a throwaway probe (not committed). The gate's two controls held on every run (the undeclared-key control refused, the plain-button control accepted).Population at base
9b75509: 70 fences · 48 node documents · 18 with notypekey · 3 not an object · 1 unresolvedtype(module, a package.json excerpt) · 0 unparseable. Refused: 9 by the strict face, 6 by the tolerant face. At headd2619ba: 8 and 5. The one row that moved is the last one below. Fences are cited by their lead-in text, not by line address (AGENTS.md commandment 11: a PR body has no same file).// Evaluated, then dropped -- renders an empty card// value is RETIRED from text -- refused by name; write contentvalueis no longer part of TextSchema; writecontent// ❌ Renders two EMPTY li. children is not a templatelistreads NEITHER content channel// ❌ Refused by name — value is RETIRED from text; write content(under "Expression shows as literal text")// ❌ Worse — evaluated inside the envelope, then discarded// ❌ Object literals not supported(stylecarried as a string)fields+customProp)The defect class — a fence labelled correct that the strict face refuses — has exactly one instance in the bundle, so no other file is touched.
D4 — the
os:checkHTML-comment marker on json/jsonc fences: kept, because the dispatch's mechanism assumption did not survive measurementThe dispatch's default was to take that marker off every json/jsonc fence, on the reading that nothing judges it. Measured on
9b75509, the reading is false:grep -rn "os:check" scripts/ .github/workflows/ packages/*/scriptshits exactly one program,scripts/check-skill-examples.mjs(itsMARKERconstant), plus that script's own test. The script declaresJSON_FENCE_LANGUAGES = new Set(['json', 'jsonc'])three lines under theTS_FENCE_LANGUAGESthe card quotes; it parses every MARKED json fence (jsoncwith comments and trailing commas stripped), reports a marker that opts nothing in as an orphan, and holds the marked population underMARKED_FLOOR, whose row['json', 70]carries the comment "39 to 70 (objectui#7474)" and is ⛔ SHRINK-ONLY. The workflowskill-examples.yml(check name "Skill Example Check") runs it on every PR.scripts/ablation-replace.mjs, WRAP mode, nothing committed): deleting exactly the marker line above the "✅ CORRECT" fence — anchor hit 1 then 0, blobffd2a860then5138310f, 12 then 11 marker lines in the file — makes the gate exit 1 with "json: 69 marked fence(s), floor 70 — 1 short" and the script's own remedy text, "⛔ Deleting a marker is not a way to make a red example pass". Restore proven: blob back toffd2a860, equal to HEAD;git diff HEADempty; 12 marker lines.So the marker is a parse claim that IS enforced, not a check nothing performs. What nothing judges on this surface is strict-face validity — the widening the skills seat deferred, and it is not folded in here. Counts for the record: marker lines directly above json/jsonc fences under
skills/objectui/**— before 70 (41 json + 29 jsonc), after 70; above ts/tsx/typescript fences — 18, unchanged. The dispatch's own stop threshold (more than 25 json/jsonc markers) is met as well. Removing the markers would needMARKED_FLOORlowered inside the checker, which this PR may not touch; that decision goes back to the seat in the report.Verification (all at head
d2619ba; exit codes captured by redirect-then-read, never through a pipe)objectui has no
dispatch-gates.mjs, so this list is hand-derived frompackage.json'scheck:*scripts and therun:lines of the 41 workflow files onorigin/main, keeping every gate whose scan surface namesskills/**, markdown at large, or.changeset/**.node scripts/check-skills-paths.mjsnode scripts/check-skill-examples.mjs --self-testnode scripts/check-skill-examples.mjs, afterpnpm exec turbo run buildover the gate's own--build-filter(29 tasks, under the shared verify lock, VERDICT command-exit 0)node scripts/check-skill-eval-tokens.mjs --self-test, then plainnode scripts/check-control-bytes.mjsnode scripts/check-shell-escape-residue.mjsnode scripts/check-new-cross-file-line-citations.mjsnode scripts/check-changeset-presence.mjscheck-changeset-no-major.mjs,check-changeset-overwrite.mjs,check-changeset-fixed.mjs,check-pending-changeset-literals.mjsmajor· no pre-existing changeset modified · every package classified · no test names a pending changesetnode scripts/check-doc-json-fences.mjsprotocol.mdpnpm exec vitest run packages/components/src/__tests__/skill-guide-data-table-binding.test.tsx packages/components/src/__tests__/skill-guide-provider-envelope.test.tsx scripts/__tests__/check-skill-examples.test.ts(under the lock)Not owed, not run: the root
pnpm test/pnpm lint/type-checkfarm (no code changed; the required set — Lint · Type Check · Test shards · Build & E2E · Build Docs · Changeset Declaration — runs on the PR in CI);check-doc-links.mjs(itsSCAN_ROOTShas noskillsrow);check-doc-fence-languages.mjs,check-doc-component-types.mjs,check-doc-snippet-types.mjs(content/docsand READMEs only). No ablation of a new guard: this PR adds none; the mutation leg above tests the dispatch's mechanism assumption, not a guard of mine.Line budget, the two readings the dispatch asks for:
skills/objectui/rules/protocol.md375 to 376; the bundle (skills/objectui/**/*.md, 16 files) 4816 to 4817;skills/objectui/SKILL.md142 to 142. The dispatch expected a net bundle reduction from the marker removal; with the markers kept the bundle is net +1. objectui defines no skill token-count gate, so there is no token reading to report.Acceptance notes
data, withcolumnsand the undeclaredfields/customProplisted after it. The fence is a deliberate counter-example and is refused on every one of those reasons, so nothing is owed.TS_FENCE_LANGUAGES) and missedJSON_FENCE_LANGUAGESthree lines below it. The card's core premise — the fence lacksdata, both faces refuse it — held, and is repaired here.维护者速读(草稿)
改了什么
对外发布的
skills/objectui技能包里,rules/protocol.md「不得发明 spec 之外属性」那条规则下标着「✅ CORRECT」的data-table示例,补上了DataTableSchema要求的data行内数组(一行、一条记录)。另加一个空 frontmatter 的 changeset,声明「不发版」。没有改任何脚本、门禁或标记行。为什么改
这个示例缺了必填的
data,objectui validate(严格面)和宽容面都拒绝它;agent 照抄技能里标「正确」的示例,写出的却是校验器拒收的节点,反而学到「校验器错了」。用两张 face 重新跑遍技能包全部 70 个 json/jsonc fence:被拒的 9 个里 8 个是刻意写的反例,只有这一个标着「正确」;改后被拒的 8 个全是反例。风险与代价(含回滚)
风险极低:一行教学文本,无代码、无发布包。派发令原本还要摘掉 json/jsonc fence 上的
os:check注释标记;实测这个标记被scripts/check-skill-examples.mjs读取,并有「只减不增」的 70 条下限,摘掉任何一个该门禁就红(已实测:摘一个 → 69/70 → exit 1),所以本 PR 没有摘,留给席位重新裁定。回滚:revert 这一个 commit 即可。席位意见
(留空,席位定稿)
你要做的
skills/**是受管面:审阅后留一条 APPROVED review,由派发席翻 ready 并入队;本 PR 不自行入队。顺带裁一个问题:json/jsonc fence 上的os:check标记是保留(它是一个真实生效的「可解析」声明),还是另开一张卡让check-skill-examples.mjs用严格面判 json fence 并声明反例 —— 两者都不在本 PR 内。Generated by Claude Code