docs(skills): split multi-document JSON fences, drop the two elisions, opt every parsing fence in - #7608
Merged
Conversation
…ns, mark every parsing fence The 8 multi-document listings under `skills/objectui/` become one fence per document, retagged by content (`json` when strict, `jsonc` when a comment stays), and the two `...` elisions in `rules/protocol.md` become the real `columns` value the surrounding prose is about. Every fence that parses now carries the `os:check` marker, so the enforced JSON population moves from 39 to 70 of 70 fences and `MARKED_FLOOR`'s json row is raised to the new count. Census under the repository's own `parseJsonFence`, `skills/objectui/`: before 56 fences (40 json / 16 jsonc), 46 parsing, 39 marked; after 70 fences (41 json / 29 jsonc), 70 parsing, 70 marked. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
This was referenced Sep 4, 2026
os-zhuang
approved these changes
Sep 4, 2026
os-zhuang
marked this pull request as ready for review
September 4, 2026 10:44
os-steve
pushed a commit
that referenced
this pull request
Sep 4, 2026
`parseJsonFence`'s docblock said "There are zero `jsonc` fences in the corpus today" as the reason the dialect is recognised. That stopped being true at PR #7473 (16 comment-carrying fences retagged `jsonc`) and PR #7608 moved it further (41 `json` / 29 `jsonc` today, confirmed with `node scripts/check-skill-examples.mjs --measure`). The sentence read as "this branch has never run in anger" — the opposite of the truth, and a risk that a reader deletes or weakens the branch as dead code. Rewritten to a count-free statement, in the same convention the file's own header uses for its other counts ("Re-derive it with `--measure`"): the branch is exercised by fences already in the corpus, not merely reserved for a hypothetical one. No behaviour change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7474
After the
jsoncretag (PR #7473), ten JSON blocks underskills/objectui/parsed under no dialect — eight multi-document listings and two[...]elisions — and seven retaggedjsoncfences parsed but carried no opt-in marker, socheck-skill-examplesreached none of them. This splits each listing into one fence per document, replaces both elisions with the real value the surrounding prose is about, and opts every parsing fence in. The enforced JSON population moves 39 -> 70 of 70.Marker spelling. The opt-in marker is an HTML comment, so it is deliberately NOT written literally anywhere in this body: this repository has measured GitHub's body sanitizer eating tag-shaped fragments even inside backticks. Its exact bytes are the
MARKERconstant inscripts/check-skill-examples.mjs; the diff is the authority.Verification head:
2ba20df(git rev-parse --short HEAD). Every gate below ran on that tree, with the worktree clean.Census, re-measured at this branch's base
24e027ewith the repository's ownparseJsonFenceskills/objectui/json/ 16jsonc)json/ 29jsonc)jsonjsoncThe site list at the base is exactly the one the card filed at
ec67429— nothing moved in between. The card's title says 11 becauseguides/schema-expressions.mdline 206 is counted twice there (once as a listing, once as the keptjson); the card's own table states the block count as 10, and 10 is what the base measures.The gate's own lines, before and after
Before (the three guides and the script reverted to the base inside the worktree, measured, then restored —
git diff HEADempty afterwards and all four blob hashes equal to HEAD's):After:
Both runs exit 0, and that is the point: before this change the ten unparseable blocks were UNMARKED, so the gate never read them. The green was silence, not coverage.
Per site
Splits — one fence per document, retagged by content (
jsonwhen the document is strict,jsoncwhen a comment stays):guides/schema-expressions.md32jsoncfence, 4 documentsjsoncfences, each keeping its own//lineguides/schema-expressions.md170jsoncfence, 3 documents (one per line)jsoncfencesguides/schema-expressions.md206jsonfence, 2 documents (one per line)jsonfences — no comment in either, so both stay strictjsonguides/schema-expressions.md447jsoncfence, 3 documentsjsoncfencesguides/schema-expressions.md463jsoncfence, 2 documentsjsoncfencesguides/schema-expressions.md479jsoncfence, 3 documentsjsoncfencesguides/schema-expressions.md492jsoncfence, 2 documentsjsoncfencesrules/protocol.md177jsoncfence, 3 documents (one per line)jsoncfencesWhere a listing put several documents on consecutive lines with their comments column-aligned, the alignment run collapses to a single space once each document owns a fence — the padding only ever aligned them against each other.
Elisions —
...is legal under no dialect, and the value it stood for is the one the rule is about, so both become real:rules/protocol.md157"fields": [...], // spec uses "columns""fields": [{ "header": "Name", "accessorKey": "name" }], // spec uses "columns"rules/protocol.md166"columns": [...] // declared by DataTableSchema"columns": [{ "header": "Name", "accessorKey": "name" }] // declared by DataTableSchemaMarkers added to fences that already parsed:
guides/schema-expressions.md328, 355, 365, 374, 391;rules/protocol.md187;rules/styling.md170. Markers added to every fence the splits and the elision fixes made parseable: the other 24. 31 marker lines in total, which is the whole of the 39 -> 70 move.Why one fence per document rather than one array
The four axes of the dispatch frame all point the same way for this corpus. A reader copies ONE node — no author ever writes an array of contrasting cases, so an array serves no measured use. Contract-first, one fence is one document is exactly what the gate's parser assumes, so the shape matches the check rather than working around it. Most of these listings are pass/fail pairs (a wrong spelling beside the right one); wrapping them in one array puts a deliberately-wrong document inside a copyable structure, which is the failure mode this repository keeps closing — an AI copies the whole block. And it adds no machinery: the edit is re-fencing existing text, not new prose. No listing in this set is read by its prose as a set of documents, so the array route is not taken anywhere here.
MARKED_FLOORscripts/check-skill-examples.mjsis touched for its json row only: 39 -> 70, with the measurement written beside it. That is the ADD direction the ratchet's own docblock names ("raise the number here in the pull request that adds the markers"); the row's shrink-only property is untouched, andthe committed floors are MET by the corpus in this checkout(its suite's own pin) holds at 70 of 70.Line and byte arithmetic
skills/objectui/guides/schema-expressions.mdskills/objectui/rules/protocol.mdskills/objectui/rules/styling.md.mdunderskills/SKILL.mdunderskills/The +64 lines are fence scaffolding and nothing else: 31 marker lines plus the opener/closer/blank of 14 new fences. No sentence of prose was added; the only new CONTENT bytes are the two real
columnsvalues that replaced the elisions. There is no token or line ratchet overskills/**in this repository — confirmed here by enumerating thecheck:*scripts:check-skill-eval-tokens.mjsgrades evalmust_containtokens against the guides, not guide size, and no other gate reads a size of this surface.Gates (exit captured before any pipe; each line below is the gate's own verdict)
pnpm check:skill-examplesJSON phase: 70 fence(s) parsed, 0 failed./Every marked skill example holds up against the built types.node scripts/check-skill-examples.mjs --self-testcheck-skill-examples self-test: 52 cases pass (marker adjacency both directions, orphans, nested illustration, json/jsonc, ...)pnpm exec vitest run scripts/__tests__/check-skill-examples.test.ts scripts/__tests__/check-skill-eval-tokens.test.tsTest Files 2 passed (2)/Tests 120 passed (120)pnpm check:skills-pathscheck-skills-paths: OK (88/89 stated path(s) resolve across 20 guide file(s); 1 baselined).pnpm check:skill-eval-tokensEvery must_contain token is taught by its own skill bundle.pnpm check:doc-fencescheck:doc-fences - every TypeScript block in 227 document(s) is fenced ts/tsx/typescript, except 80 declared file(s) ...pnpm check:control-bytescheck-control-bytes: OK (scanned 6227 tracked text file(s); skipped 85 binary).node scripts/check-changeset-presence.mjsNo source or published contract of a released package changed in this range, so no changeset is owed.pnpm lintTasks: 47 successful, 47 total(0 errors; the warning counts are pre-existing)pnpm check:shell-escape-residuecheck-shell-escape-residue: OK (5/5 root(s) resolved ... 206 file(s) and 1307 fenced block(s) examined ...)pnpm check:doc-typesEvery documented component type is registered.pnpm check:doc-snippetsEvery covered documentation snippet compiles against the built types.pnpm check:governed-queue-guardOK check-governed-queue-guard self-test: 132 cases pass ...node scripts/check-governed-queue-guard.mjs --testover the four changed pathsGOVERNED - 3 of 4 path(s) are on a governed surfacecheck:doc-snippetsfirst exited 2 (PRECONDITION NOT MET— five packages unbuilt, which is "could not run", not a verdict); the run above is after building what its own--build-filternames.Changeset: none owed, per the verdict quoted above. This repository has no
skip-changesetmechanism, so no label is applied.Governed surface
skills/objectui/**is governed, and the guard confirms it over this exact file list. This PR stays a DRAFT: not flipped ready, no auto-merge, no merge queue, no reviewers requested from here — the seat requestsos-zhuangandhotlongat the contract tier, and a human merge is the review record.Session for durable attribution:
https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfoxGenerated by Claude Code