Repository navigation
tooling(skills): check-doc-json-fences gains a skills/objectui/** leg — the strict authoring face judges the published guides, 8 deliberate counter-examples declared (objectui#12204) - #12221
Conversation
…, and the 8 deliberate counter-examples carry its declaration (objectui#12204) The strict authoring face now judges the json/jsonc node documents of the published skill bundle: a fourth SCAN_SURFACE leg walks every .md page under skills/objectui/ (anchor rules/protocol.md). Every such fence carries check-skill-examples' opt-in line directly above it, and that gate requires it exactly there, so this gate's declaration lookup steps over exactly that one line (declaration, opt-in line, fence — three contiguous lines at one quote depth; anything else leaves the declaration dangling). The opt-in spelling is spelled in this gate and pinned equal to the sibling's in the test file, never imported. Measured on the tree before the rule: the three-line shape did not attach. With the leg added and no declaration: 8 refused, all deliberate counter-examples (6 in guides/schema-expressions.md, 2 in rules/protocol.md). Each now carries one doc-json: fragment line whose reason says what the example deliberately shows; green after, 14 declared, 0 refused. check-skill-examples unchanged at 18 ts / 70 json marked, 0 failed. No fence content, os:check marker or check-skill-examples rule changes. skills/objectui line budget: +8 exactly (bundle 4815 -> 4823). Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CinRQcE6T8SvMbhH8D3NhS
Contract reviewServed-tier: Scope: the governed rule-text face — ① Derived judgments
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
维护者速读(终稿)· PR objectui#12221 · objectui#12204席位 1( 改了什么: 为什么改:你今天点名的 B2。上周那条标 ✅ 却被校验器拒收的示例是靠人碰巧发现的;schema 一收紧,示例就会静默过期——现在是门禁在每个 PR 上替你盯着。 风险与代价(含回滚):零运行时影响,只多一条门禁腿与 8 行声明。一个必须先解的机制冲突已实测解决:技能包里每个围栏上方本就紧贴着 席位意见:ACCEPT。契约复核(达档、在席)PASS 已贴本 PR;消融实验证明越过规则是承重的(关掉它 → 4 条测试红、门禁 16 条发现)。CI 复核时 25 绿 / 3 跳过 / 13 在跑、0 红;base 已前移,落地前席位先合一次 main。 你要做的:同意即给一个 APPROVED review;落地由席位先合 main 再走队列。这是你今天三条裁决里最后一张。 Generated by Claude Code |
…the markdown-test-inputs ledger `Test (shard 1/8)` on PR objectui#12221 (head 8ebcd56) failed one test, `scripts/__tests__/markdown-test-inputs.test.ts > the derived class > every candidate the scanner finds has been adjudicated, and every entry exists`: `auditTree` returned two `unadjudicated-document` findings for `scripts/__tests__/check-doc-json-fences.test.ts` -- "resolves `skills/objectui/SKILL.md`" and "resolves `skills/objectui/rules/protocol.md`", each "in neither `reads` nor `notRead`". That PR taught check-doc-json-fences a fourth SCAN_SURFACE leg (every `.md` under `skills/objectui/`, anchor `rules/protocol.md`) while the ledger entry for the gate's agreement test still described three legs. The entry's `reads` gains `skills/objectui/**` in the ledger's own tree spelling (`matchesEntry` matches any markdown under the prefix, as the `content/docs/**` and `packages/**` legs already do), and the entry's comment names the change that added it. No `notRead`: the test's real-corpus walk reads the tree, and the two pages the scanner resolves by name are inside it. Measured on this worktree with `pnpm exec vitest run scripts/__tests__/markdown-test-inputs.test.ts`: at 8ebcd56 exit 1 (1 failed | 24 passed, the two findings above); with this commit exit 0 (25 passed). Also green: check-doc-json-fences.test.ts (45 passed), check-pending-changeset-literals.test.ts (15 passed, it imports the ledger), `pnpm type-check:scripts` exit 0. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CinRQcE6T8SvMbhH8D3NhS
Contract reviewServed-tier: Scope: the same governed rule-text face as the record on ① Derived judgments
② Semver levelUnchanged: ③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #12204
Clause-②: no
What this PR does
scripts/check-doc-json-fences.mjsgains a fourthSCAN_SURFACEleg: every.mdpage underskills/objectui/(16 pages, 70 json/jsonc fences on this branch), anchorskills/objectui/rules/protocol.md. The strict authoring face (StrictAnyComponentSchema, read from the built@object-ui/types./zodentry — the faceobjectui validateuses) now judges the node documents a customer's agent copies from the published guides. The maintainer's ruling: 「B2:扩 doc-json 门禁一条腿(推荐)」 — option B of objectui#12135's 速读终稿.Untouched, as ruled:
scripts/check-skill-examples.mjs, itsMARKER(os:check), itsMARKED_FLOOR(70 json), everyos:checkmarker line, the three existing legs, the RESOLUTION / REFUSES / ACCEPTS controls, the face resolution, every fence's content. No new gate; no workflow change —doc-snippet-types.ymlalready runscheck:doc-jsonon pull requests after the filtered build (read; the existing wiring test pins it).The adjacency conflict, measured, and the one rule added
Every json/jsonc fence under
skills/objectui/carries theos:checkHTML-comment line DIRECTLY above it (census on BASE54159d3: 70 of 70 fences, none inside a blockquote), andcheck-skill-examples.mjsrequires exactly that adjacency (its header: 「Marker ADJACENCY is strict, and an orphan is a failure」). This gate's declaration must also be the nearest line above the fence. Only one line can be directly above.Measured on BASE with
scanJsonFencesover a fixture — declaration line, then theos:checkline, then the fence:attached=false consumed=[false]. The declaration dangled and the fence stayed undeclared; a page could not carry both gates' lines above one fence.The rule added, inside this gate only: when the line directly above a json/jsonc fence is the
os:checkopt-in line at the fence's quote depth, the attachment walk steps over that ONE line and reads the line directly above it — three contiguous lines at one depth. Nothing else is stepped over on that path: a blank line, prose, a second opt-in line, an opt-in line that is not itself directly above the fence, or a declaration at another quote depth all leave the declaration dangling (and the fence refused). The opt-in spelling lives in this gate asSKILL_OPT_IN_LINE, spelled rather than imported — an import would couple this gate's attachment rule to the sibling's module and itstypescriptimport; the test file pins it equal tocheck-skill-examples.mjs'sMARKER, so a drift is a red test rather than a silent detachment of every declaration under the bundle.check-skill-examples.mjsis not touched.Same fixture after the rule: the trio attaches (
attached=true consumed=[true], also inside a blockquote at one depth); every other separation still readsattached=false consumed=[false].The deliberate counter-examples — the gate's own output decided
Leg added, no declaration yet —
pnpm check:doc-jsonexit 1:The same 8 the card predicted, all deliberate. The leg's own buckets — 70 fences, 48 node documents, 18 without
type, 3 not an object, 1 unresolvedtype(module, inguides/plugin-development.md) — equal PR objectui#12138's measurement. The keyword staysfragment: the gate's header already names 「a deliberately refused example that shows the error」 as a kind of fragment, so no sibling keyword was minted — one keyword, the reason says the kind.Each gets one declaration line in the gate's existing HTML-comment spelling, directly above the
os:checkline. Sample,rules/protocol.md, the WRONG card:**❌ WRONG — renders an empty card:**, theos:checkHTML-comment line, then the fence.doc-json: fragment — deliberate counter-example: a title parked under props never reaches the card renderer, and props is no declared key; theos:checkline; then the fence.(HTML-comment lines are spelled in words in this body because the sanitizer eats tag-shaped text.) Every reason says what the example deliberately shows; none claims a check (the gate applies
VERIFICATION_CLAIM; the shortest reason is 108 characters against the 12 minimum); none cites an issue number, the bundle's rule.After the eight declarations —
pnpm check:doc-jsonexit 0:Baseline on BASE (three legs): 224 pages, 252 fences, 204 judged, 198 accepted, 6 declared, 0 refused, exit 0.
Sibling gate, unchanged
node scripts/check-skill-examples.mjson BASE and after:Semantic phase: 18 of 18 ts fence(s) judged, 0 failed.·JSON phase: 70 fence(s) parsed, 0 failed.·Every marked skill example holds up against the built types.Its--self-test: 60 cases pass, before and after.Line budget —
skills/objectui/**, the PM's ceiling of +8skills/objectui/guides/schema-expressions.mdskills/objectui/rules/protocol.md.mdunderskills/objectui/+8 exactly: the eight declaration lines and nothing else.
Tests and gates — final commit
8ebcd56pnpm exec vitest run scripts/__tests__/check-doc-json-fences.test.ts scripts/__tests__/check-skill-examples.test.ts, under the shared verify lock:Test Files 2 passed (2) · Tests 158 passed (158). New pins: the scanner's three-line step-over in both directions (attached; dangling for a blank line, prose, a second opt-in line, a displaced opt-in line, another depth, a non-json fence); the opt-in spelling equal to the sibling'sMARKER; RED for an undeclared refused fence underskills/objectui/, named at its line; GREEN for a declared one through the opt-in line; dangling plus refused for every other separation; stale through the opt-in line; the leg walks.mdunderskills/objectui/only, last, in sorted order, and no other skills tree; the skills anchor is on the leg and owed; the real bundle's declared pages orphan none of the sibling's opt-in lines (scanSkillFences). The existing CLI-door parity pin (validateAuthoredDocument) now runs over the corpus with the leg, and theit.each(SURFACE_ANCHORS)pin covers the skills anchor.scripts/ablation-replace.mjs(anchor hit 1→0 and marker 0→1 on disk, restored to the HEAD blob withgit diff HEADempty): with the one-line step-over disabled, the test file reds 4 of 45 — the step-over pin, the GREEN declaration-through-opt-in pin, the stale-through-opt-in pin, and the real-bundle orphan pin's non-vacuity guard — andcheck:doc-jsonexits 1 with 16 findings: 8 dangling declarations plus the same 8 refused.pnpm type-check:scriptsexit 0;--listFilesincludes the test file.node scripts/check-skills-paths.mjs✅ 89/90 resolve, 1 baselined ·node scripts/check-skill-eval-tokens.mjsexit 0 ·node scripts/check-control-bytes.mjs✅ 8459 tracked files ·node scripts/check-shell-escape-residue.mjs✅ ·node scripts/check-new-cross-file-line-citations.mjs0 new ·node scripts/check-changeset-presence.mjs✅ no changeset owed · changeset guards (claims / fixed / no-major / overwrite) ✅.pnpm lintand the rest of the farm: CI's run, not measured here.Also touched
content/docs/guide/ci-cd-pipeline.md— the page that inventories the gates said 「Three legs」 and listedskills/**as not read; it now says four and names the declaration shape. Not governed and published by no package; the existing wiring test pins only the script name and path there.Acceptance notes
skills/objectui/guides/plugin-development.mdcarries one jsonc fence whosetypeismodule, which no node schema declares; the gate counts it in the unresolved bucket and judges nothing — it is a plugin-manifest example, not a node document. Observation only, no card..changeset/12204-doc-json-skills-leg.mdis an empty-frontmatter changeset:skills/**,scripts/andcontent/docs/sit in no package'sfiles[]. objectui has noskip-changesetlabel; none was minted.维护者速读(草稿)
改了什么。 门禁
check-doc-json-fences(pnpm check:doc-json)多扫一条腿:skills/objectui/下全部.md页面里的 json/jsonc 节点文档,用objectui validate同一张严格面判定。这些示例是客户的 agent 通过npx skills add装进自己仓库后照抄的样板。为了与既有的os:check标记共存,门禁学会越过紧贴围栏上方的那一行os:check、往上再读一行声明;八个故意写错的反例各加一行声明,写明它故意展示什么。围栏内容、os:check标记、check-skill-examples门禁本身一字未动。为什么改。 维护者 2026-10-12 点名「B2:扩 doc-json 门禁一条腿(推荐)」。此前这 70 个围栏只被要求「能解析」,不被要求「合法」:客户 agent 照抄一个不合规的键,
objectui validate会拒,而发布面上没有任何东西提前拦住。现在同一张严格面在发布前就判。风险与代价(含回滚)。 代价是
skills/objectui/**净增 8 行(4815 → 4823),全是渲染为空的 HTML 注释,读者看不见。风险:今后在这两份指南里新增一个故意写错的例子,门禁会红,作者需要加一行声明 —— 这正是门禁的用途;门禁对每条声明逐次重判,例子一旦变合法,声明即报过期,只减不增。回滚 = revert 本 PR 的一个 commit;不涉及发版、不动任何包。席位意见。 (留空,席位定稿)
你要做的。 本 PR 命中受管面
skills/**,停在 draft 等一条获授权的 APPROVED review;批准后由认领席翻 ready、入队。你只需判断:八行声明的措辞是否准确描述了各反例故意展示的错误(见上方 sample 与 diff)。Generated by Claude Code