Filed unassigned while converging build-skill-references.ts on the shared module-docblock selector (#12094). Out of that card's scope — that one fixes which doc block is published; this is about what the fallback publishes when there is no module doc block at all. #12094 explicitly left the fallback chain in place and named the follow-up question, so this records the measurement rather than pre-judging it.
What
When a .zod.ts has no module doc block, extractDescription() in packages/spec/scripts/build-skill-references.ts falls through to an export list:
constre=/export\s+const\s+(\w+Schema|\w+)\s*(?:[:=])/g;// …if(exports.length>0)return`Exports: ${exports.slice(0,5).join(', ')}`;Two properties combine badly on a customer-facing surface:
- Rank is source order, not importance —
slice(0, 5) keeps whichever five happen to be declared first. - The regex has no notion of public authorable surface — any
export const qualifies, including constants whose own names say they are not for authoring.
Measured
After #12094 lands, these rows are what skills/** publishes (measured on main at 22c42c9 plus that change):
skills/objectstack-automation/references/_index.md
- `…/src/automation/approval.zod.ts` — Exports: ApproverType, DEPRECATED_APPROVER_TYPES, NON_AUTHORABLE_APPROVER_TYPES, ORG_MEMBERSHIP_LEVELS, APPROVER_EXPRESSION_ROOTS
Two of the five named constants are explicitly deprecated or explicitly non-authorable.
skills/objectstack-i18n/references/_index.md
- `…/src/system/translation.zod.ts` — Exports: LocaleSchema, FieldTranslationSchema, ActionResultDialogTranslationSchema, ObjectTranslationDataSchema, LEGACY_OBJECT_FIRST_KEYS
Why it is worth a card
The line is true — it is an accurate list of what the module exports, which is why #12094 kept it (an honest export list beats a confidently wrong prose sentence). It is the ranking that is the hazard, and only on this surface: skills/** is loaded whole into a customer agent's context window, and its job is to teach that agent what it may author. A row that headlines DEPRECATED_APPROVER_TYPES and NON_AUTHORABLE_APPROVER_TYPES is pointing an authoring agent at exactly the vocabulary it must not use, with nothing on the line marking them as such.
This is the "make AI-written metadata hard to get wrong" axis rather than a correctness bug — nothing is broken, and no gate is wrong today.
Options (not pre-judging)
The middle option interacts with the third: the population that reaches the fallback at all is the same ~9 files, so authoring their module doc blocks removes the symptom without any generator change.
Filed unassigned while converging
build-skill-references.tson the shared module-docblock selector (#12094). Out of that card's scope — that one fixes which doc block is published; this is about what the fallback publishes when there is no module doc block at all. #12094 explicitly left the fallback chain in place and named the follow-up question, so this records the measurement rather than pre-judging it.What
When a
.zod.tshas no module doc block,extractDescription()inpackages/spec/scripts/build-skill-references.tsfalls through to an export list:Two properties combine badly on a customer-facing surface:
slice(0, 5)keeps whichever five happen to be declared first.export constqualifies, including constants whose own names say they are not for authoring.Measured
After #12094 lands, these rows are what
skills/**publishes (measured onmainat 22c42c9 plus that change):skills/objectstack-automation/references/_index.mdTwo of the five named constants are explicitly deprecated or explicitly non-authorable.
skills/objectstack-i18n/references/_index.mdWhy it is worth a card
The line is true — it is an accurate list of what the module exports, which is why #12094 kept it (an honest export list beats a confidently wrong prose sentence). It is the ranking that is the hazard, and only on this surface:
skills/**is loaded whole into a customer agent's context window, and its job is to teach that agent what it may author. A row that headlinesDEPRECATED_APPROVER_TYPESandNON_AUTHORABLE_APPROVER_TYPESis pointing an authoring agent at exactly the vocabulary it must not use, with nothing on the line marking them as such.This is the "make AI-written metadata hard to get wrong" axis rather than a correctness bug — nothing is broken, and no gate is wrong today.
Options (not pre-judging)
*Schemaexports, or skipSCREAMING_SNAKEconstants, which are machine constants rather than authorable metadata..zod.tsreachable fromSKILL_MAPand drop the fallback (the loud-refusal answerbuild-skill-references.tsstill picks the first JSDoc block anywhere in the file — the defectbuild-docs.tsfixed, publishing a private constant's comment to customers #12094 declined to take for that card, since it would make "write a module docblock" an implicit prerequisite and red the gate on ~9 files).The middle option interacts with the third: the population that reaches the fallback at all is the same ~9 files, so authoring their module doc blocks removes the symptom without any generator change.