Repository navigation
Commit 1ebd82c
feat(gates): shipped metadata examples must load under the strict registry (#337)
Three times a doc or an agent-context skill taught vocabulary the loader had
already retired, so metadata written by following our own instructions failed to
load — and an adopter found it every time. #337 described @Verifiedby as live
after FR-038 retired it; #342 gave @fields together with @expr as a worked
example, the exact spelling that release made a load error; #343 taught
@Verifiedby and the pre-0.24.0 @status enum a full release after both went. Each
was fixed by hand in a different file, so the family recurred rather than
converging.
check-doc-examples.ts loads every fenced JSON example under docs/ and the
agent-context skills against the strict registry, in the gates lane.
The hard part is telling a real drift from a deliberately partial illustration,
and the rule is the KIND of error rather than a marker anyone has to remember:
fail on errors about vocabulary the block USES (an attribute that no longer
exists, a value outside its enum, an illegal combination — wrong at any size);
allow errors about what it OMITS or REFERENCES (an elided required attribute, an
extends target in the next block — that IS fragment-ness). Fragments are wrapped
in a synthetic host and the fields their @fields names are synthesised with it,
so the scaffolding cannot manufacture a finding the document never committed. An
unclassified error code stops the gate instead of defaulting either way: one
default widens the blind spot silently, the other floods every fragment. That
fired immediately on ERR_ENUM_INT_VALUE_MAP_ARRAY, which is not in the main
error ledger.
docs/superpowers/ and docs/features/migrations/ are out of scope because they
are records, not instructions — a migration guide's purpose is to show the
retired spelling beside its replacement, and editing it to satisfy a gate would
falsify it. One narrow opt-out marker covers the provider-extension recipes,
counted in the summary so a blind spot cannot grow unseen.
test-doc-examples.ts replays all three incidents and asserts the gate rejects
each, and that a fragment, an unresolved reference and a config block stay quiet.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DhpswkF1NvwxhFWMmdAT151 parent d215568 commit 1ebd82c
5 files changed
Lines changed: 604 additions & 0 deletions
File tree
- docs/recipes
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
287 | 327 | | |
288 | 328 | | |
289 | 329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
| |||
0 commit comments