You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(spec): extend the example type-check gate from skills/ to content/docs
check:skill-examples compiles the TypeScript in `skills/` against the built spec.
It works — it caught the broken `defineTool` example when
tool.requiresConfirmation was removed (#3715). But it only ever walked `skills/`:
skills/ 9 files with ts blocks, 9 compiled
content/docs/ 124 files with ts blocks, 0 compiled
So the identical break in a docs page ships. Docs examples are copied verbatim by
humans and AI exactly like skill examples; a gate covering a fraction of the
surface it appears to cover reads as coverage.
Generalises the walker to a SOURCE_ROOTS list and opts in the first batch:
164 docs blocks across 63 pages, taking the gate from 32 to 196 checked examples.
content/docs/references/ is excluded — build-docs.ts regenerates it from the
schemas, so it cannot drift independently.
MARKER IS NOW PER-FORMAT. MDX has no HTML comments: `<!-- os:check -->` in a .mdx
fails the fumadocs build outright ("Unexpected character `!`… to create a comment
in MDX, use `{/* text */}`"). Verified by building the docs site — the first
attempt failed on 60+ pages. skills/*.md keeps `<!-- os:check -->`; content/docs
uses `{/* os:check */}`. Both spellings are recognised for ORPHAN detection, so a
wrong-format marker fails loudly instead of silently checking nothing.
Batch selection was measured, not guessed: marking all 780 docs blocks and
compiling showed which are self-contained. Note a subtlety — blocks that "pass"
in a 780-file program can be leaning on globals declared by OTHER blocks (a file
with no import/export is a global script), so the set was converged by
recompiling and dropping newly-failing blocks until green. 164 stand alone.
The remaining ~600 are mostly fragments (a `columns: [...]` subtree), which the
gate's opt-in design already anticipates; whether any are genuine rot is worth a
follow-up pass now that the machinery reaches them.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ajwvrmd1hDC9RBofYBhGuR
0 commit comments