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
[finding] reference-doc tables render .default()-bearing fields as required (✅) for every output-shape def — authors read "must write" where the schema means "may omit" #8703
Observation-class, found while landing #8586 (PR #8702) — filed, not fixed there (out of scope).
What
packages/spec/scripts/build-schemas.ts emits each def's JSON Schema as the output (post-parse) shape by default, falling back to the input shape only when output emission throws (transforms etc.). In the output shape a .default()-bearing field is required (the parse always produces it), so build-docs.ts renders it with ✅ in the reference table's Required column — but an author may omit it, which is exactly what the reference table's Required column is read as answering.
gen:schema reports Generated: 1589 (125 as input shape) — so ~1464 defs render the output shape, and every .default() field in them carries the same misleading ✅. Only the 125 input-shape defs (flagged x-io: input) show author-time optionality.
Why it matters
The reference tables are the author-facing contract (very often read by an AI author, ADR-0033). "Required" on a field the author may omit teaches over-specification at best; at worst an author treats a wall of ✅ as boilerplate and misses the genuinely-required fields among them. The two emission modes also make sibling pages inconsistent with each other, and a schema refactor can silently flip a page's whole Required column (as #8702's diff shows) without any semantic change to what authors must write.
Possible directions (not adjudicated here)
render doc tables from the input shape uniformly (authors write input), keeping output emission for the JSON-Schema artifacts that validate post-parse data; or
keep output emission but render .default()-bearing members as optional (default: …) in the table.
Relates to: #8586 / PR #8702 (where the flip was observed and explained), #7658 (a different build-docs rendering gap, closed).
Observation-class, found while landing #8586 (PR #8702) — filed, not fixed there (out of scope).
What
packages/spec/scripts/build-schemas.tsemits each def's JSON Schema as the output (post-parse) shape by default, falling back to the input shape only when output emission throws (transforms etc.). In the output shape a.default()-bearing field is required (the parse always produces it), sobuild-docs.tsrenders it with ✅ in the reference table's Required column — but an author may omit it, which is exactly what the reference table's Required column is read as answering.Measured
additionalTypesonMetadataPluginConfigis authorable, documented as THE way a plugin declares a metadata type, and has no reader — a plugin cannot declare a kind at all #8586 retirement flippedkernel/MetadataPluginConfigfrom input-shape fallback to output-shape emission (the oldadditionalTypesvalue schema embeddedActionSchema, whose output emission throws). The regeneratedcontent/docs/references/kernel/metadata-plugin.mdxnow showsenableEvents/validateOnWrite/enableVersioning/cacheMaxItems/bootstrap— all.default()-bearing, all author-omittable — as ✅ required. Before the flip the same fields renderedoptional(input shape).gen:schemareportsGenerated: 1589 (125 as input shape)— so ~1464 defs render the output shape, and every.default()field in them carries the same misleading ✅. Only the 125 input-shape defs (flaggedx-io: input) show author-time optionality.Why it matters
The reference tables are the author-facing contract (very often read by an AI author, ADR-0033). "Required" on a field the author may omit teaches over-specification at best; at worst an author treats a wall of ✅ as boilerplate and misses the genuinely-required fields among them. The two emission modes also make sibling pages inconsistent with each other, and a schema refactor can silently flip a page's whole Required column (as #8702's diff shows) without any semantic change to what authors must write.
Possible directions (not adjudicated here)
.default()-bearing members asoptional (default: …)in the table.Relates to: #8586 / PR #8702 (where the flip was observed and explained), #7658 (a different build-docs rendering gap, closed).
Generated by Claude Code