@wildo-ai/framework-knowledge 1.1.8 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/dist/claude-marketplace/plugins/wildo/.claude-plugin/plugin.json +1 -1
  2. package/dist/claude-marketplace/plugins/wildo/references/composites-and-the-loop.md +9 -2
  3. package/dist/claude-marketplace/plugins/wildo/references/creation-state.md +21 -0
  4. package/dist/claude-marketplace/plugins/wildo/references/derived-artifacts.md +121 -0
  5. package/dist/claude-marketplace/plugins/wildo/references/runs-judges-and-questions.md +29 -5
  6. package/dist/claude-marketplace/plugins/wildo/skills/answer/SKILL.md +29 -2
  7. package/dist/claude-marketplace/plugins/wildo/skills/build/SKILL.md +69 -24
  8. package/dist/claude-marketplace/plugins/wildo/skills/doctor/SKILL.md +10 -0
  9. package/dist/claude-marketplace/plugins/wildo/skills/run/SKILL.md +21 -5
  10. package/dist/claude-marketplace/plugins/wildo/skills/start/SKILL.md +31 -5
  11. package/dist/claude-marketplace/plugins/wildo/skills/status/SKILL.md +2 -0
  12. package/dist/claude-marketplace/plugins/wildo/skills/why/SKILL.md +11 -1
  13. package/dist/esm/framework-knowledge.definitions.d.ts +1 -1
  14. package/dist/esm/framework-knowledge.definitions.d.ts.map +1 -1
  15. package/dist/esm/framework-knowledge.definitions.js +11 -1
  16. package/dist/esm/framework-knowledge.definitions.js.map +1 -1
  17. package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.d.ts +2 -2
  18. package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.js +2 -2
  19. package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.js.map +1 -1
  20. package/dist/esm/playbooks/bottom_up.build/playbook.definition.d.ts +11 -11
  21. package/dist/esm/playbooks/bottom_up.build/playbook.definition.d.ts.map +1 -1
  22. package/dist/esm/playbooks/bottom_up.build/playbook.definition.js +29 -22
  23. package/dist/esm/playbooks/bottom_up.build/playbook.definition.js.map +1 -1
  24. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts +3 -3
  25. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts.map +1 -1
  26. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js +59 -10
  27. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js.map +1 -1
  28. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts +1 -1
  29. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js +3 -3
  30. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js.map +1 -1
  31. package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts +1 -1
  32. package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js +1 -1
  33. package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js.map +1 -1
  34. package/dist/esm/playbooks/bottom_up.conception/playbook.definition.js +1 -1
  35. package/dist/esm/playbooks/bottom_up.conception/playbook.definition.js.map +1 -1
  36. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts +2 -1
  37. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts.map +1 -1
  38. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js +5 -5
  39. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js.map +1 -1
  40. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts +8 -0
  41. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts.map +1 -1
  42. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js +12 -4
  43. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js.map +1 -1
  44. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts +25 -27
  45. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts.map +1 -1
  46. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js +85 -43
  47. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js.map +1 -1
  48. package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.d.ts +40 -0
  49. package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.d.ts.map +1 -0
  50. package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.js +41 -0
  51. package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.js.map +1 -0
  52. package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.d.ts +199 -0
  53. package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.d.ts.map +1 -0
  54. package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.js +201 -0
  55. package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.js.map +1 -0
  56. package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.d.ts +67 -0
  57. package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.d.ts.map +1 -0
  58. package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.js +76 -0
  59. package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.js.map +1 -0
  60. package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts +3 -1
  61. package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts.map +1 -1
  62. package/dist/esm/playbooks/top_down.business-model/playbook.definition.js +27 -18
  63. package/dist/esm/playbooks/top_down.business-model/playbook.definition.js.map +1 -1
  64. package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.d.ts +11 -1
  65. package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.d.ts.map +1 -1
  66. package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.js +11 -11
  67. package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.js.map +1 -1
  68. package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.d.ts +2 -0
  69. package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.d.ts.map +1 -1
  70. package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.js +3 -1
  71. package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.js.map +1 -1
  72. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts +2 -0
  73. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts.map +1 -1
  74. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js +3 -1
  75. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js.map +1 -1
  76. package/dist/esm/playbooks/top_down.definition/playbook.definition.d.ts +5 -2
  77. package/dist/esm/playbooks/top_down.definition/playbook.definition.d.ts.map +1 -1
  78. package/dist/esm/playbooks/top_down.definition/playbook.definition.js +16 -4
  79. package/dist/esm/playbooks/top_down.definition/playbook.definition.js.map +1 -1
  80. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts +7 -3
  81. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts.map +1 -1
  82. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js +36 -2
  83. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js.map +1 -1
  84. package/dist/esm/playbooks/top_down.risk-register/playbook.definition.d.ts +7 -1
  85. package/dist/esm/playbooks/top_down.risk-register/playbook.definition.d.ts.map +1 -1
  86. package/dist/esm/playbooks/top_down.risk-register/playbook.definition.js +4 -2
  87. package/dist/esm/playbooks/top_down.risk-register/playbook.definition.js.map +1 -1
  88. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts +9 -3
  89. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts.map +1 -1
  90. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js +3 -3
  91. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js.map +1 -1
  92. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts +35 -2
  93. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts.map +1 -1
  94. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js +30 -17
  95. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js.map +1 -1
  96. package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/authority-basis.json +1 -1
  97. package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/external-framework-mapping.json +1 -1
  98. package/dist/knowledge/manifest.json +8 -8
  99. package/dist/knowledge/playbooks/bottom_up.assemble-verify/method.md +22 -7
  100. package/dist/knowledge/playbooks/bottom_up.assemble-verify/playbook.json +3 -3
  101. package/dist/knowledge/playbooks/bottom_up.build/method.md +17 -15
  102. package/dist/knowledge/playbooks/bottom_up.build/playbook.json +4 -3
  103. package/dist/knowledge/playbooks/bottom_up.build-decompose/evaluation-protocol.json +1 -1
  104. package/dist/knowledge/playbooks/bottom_up.build-decompose/evaluation-treatment.json +1 -1
  105. package/dist/knowledge/playbooks/bottom_up.build-decompose/method.md +117 -28
  106. package/dist/knowledge/playbooks/bottom_up.build-decompose/playbook.json +4 -4
  107. package/dist/knowledge/playbooks/bottom_up.build-dispatch/method.md +133 -59
  108. package/dist/knowledge/playbooks/bottom_up.build-dispatch/playbook.json +2 -2
  109. package/dist/knowledge/playbooks/bottom_up.build-scale/method.md +169 -276
  110. package/dist/knowledge/playbooks/bottom_up.build-scale/playbook.json +2 -2
  111. package/dist/knowledge/playbooks/bottom_up.capability-composition/method.md +8 -1
  112. package/dist/knowledge/playbooks/bottom_up.capability-composition/playbook.json +1 -1
  113. package/dist/knowledge/playbooks/bottom_up.conception/method.md +3 -2
  114. package/dist/knowledge/playbooks/bottom_up.conception/playbook.json +2 -2
  115. package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-protocol.json +1 -1
  116. package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-treatment.json +1 -1
  117. package/dist/knowledge/playbooks/bottom_up.domain-plan/method.md +22 -6
  118. package/dist/knowledge/playbooks/bottom_up.domain-plan/playbook.json +4 -3
  119. package/dist/knowledge/playbooks/bottom_up.foundation/playbook.json +13 -5
  120. package/dist/knowledge/playbooks/refinement.compliance-document-candidate/method.md +5 -2
  121. package/dist/knowledge/playbooks/refinement.compliance-document-candidate/playbook.json +1 -1
  122. package/dist/knowledge/playbooks/top_down.brand-identity/evaluation-protocol.json +1 -1
  123. package/dist/knowledge/playbooks/top_down.brand-identity/evaluation-treatment.json +1 -1
  124. package/dist/knowledge/playbooks/top_down.brand-identity/method.md +71 -37
  125. package/dist/knowledge/playbooks/top_down.brand-identity/playbook.json +35 -38
  126. package/dist/knowledge/playbooks/top_down.brand-name-research/method.md +105 -0
  127. package/dist/knowledge/playbooks/top_down.brand-name-research/playbook.json +55 -0
  128. package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/evaluation-protocol.json +1 -0
  129. package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/evaluation-treatment.json +1 -0
  130. package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/method.md +78 -0
  131. package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/playbook.json +63 -0
  132. package/dist/knowledge/playbooks/top_down.brand-naming/method.md +56 -0
  133. package/dist/knowledge/playbooks/top_down.brand-naming/playbook.json +65 -0
  134. package/dist/knowledge/playbooks/top_down.business-model/evaluation-protocol.json +1 -1
  135. package/dist/knowledge/playbooks/top_down.business-model/evaluation-treatment.json +1 -1
  136. package/dist/knowledge/playbooks/top_down.business-model/method.md +60 -6
  137. package/dist/knowledge/playbooks/top_down.business-model/playbook.json +15 -10
  138. package/dist/knowledge/playbooks/top_down.compliance-analysis/playbook.json +30 -10
  139. package/dist/knowledge/playbooks/top_down.compliance-conception/playbook.json +3 -1
  140. package/dist/knowledge/playbooks/top_down.compliance-posture/playbook.json +4 -1
  141. package/dist/knowledge/playbooks/top_down.definition/method.md +8 -3
  142. package/dist/knowledge/playbooks/top_down.definition/playbook.json +6 -4
  143. package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-protocol.json +1 -1
  144. package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-treatment.json +1 -1
  145. package/dist/knowledge/playbooks/top_down.phase-gate/playbook.json +11 -1
  146. package/dist/knowledge/playbooks/top_down.risk-register/method.md +21 -0
  147. package/dist/knowledge/playbooks/top_down.risk-register/playbook.json +8 -2
  148. package/dist/knowledge/playbooks/top_down.scope-roadmap/playbook.json +4 -2
  149. package/dist/knowledge/playbooks/top_down.vision-elicitation/method.md +10 -0
  150. package/dist/knowledge/playbooks/top_down.vision-elicitation/playbook.json +40 -17
  151. package/dist/knowledge/references/brand.name-choice.config.md +127 -0
  152. package/dist/knowledge/references/brand.name-screening.config.md +253 -0
  153. package/dist/knowledge/references/build-plan.task-graph.config.md +64 -11
  154. package/dist/knowledge/references/business-model.pricing-plan.config.md +16 -0
  155. package/dist/knowledge/references/business-model.snapshot.config.md +64 -0
  156. package/dist/knowledge/references/business-model.snapshot.validation.md +68 -4
  157. package/dist/knowledge/references/capability-composition.config.md +67 -4
  158. package/dist/knowledge/references/example.data-seeding.minimal.md +29 -1
  159. package/dist/knowledge/references/market.snapshot.validation.md +1 -1
  160. package/dist/knowledge/references/saas.data-seeding.bootstrap-wiring.md +7 -1
  161. package/dist/knowledge/references/saas.data-seeding.definition-input.md +6 -0
  162. package/dist/knowledge/references/saas.models.queue.scheduled-recovery.md +81 -2
  163. package/dist/knowledge/references/saas.specifications.companion-exports.contract.md +10 -0
  164. package/dist/knowledge/references/saas.website.astro.label-loader.md +9 -0
  165. package/dist/knowledge/references/saas.website.factories.define-section.md +4 -0
  166. package/dist/knowledge/references/saas.website.page-manifest.schema.md +12 -3
  167. package/dist/knowledge/references/saas.website.page-sections.component.md +72 -0
  168. package/dist/knowledge/references/saas.website.sections.definition-schema.md +11 -0
  169. package/dist/knowledge/registries/assurance-authority-bases.json +1 -1
  170. package/dist/knowledge/registries/framework-topics.json +38 -1
  171. package/dist/knowledge/registries/playbooks.json +68 -20
  172. package/dist/knowledge/registries/source-tags.json +748 -695
  173. package/dist/knowledge/rules/live-context-door.md +5 -2
  174. package/dist/knowledge/skills/INDEX.md +2 -1
  175. package/dist/knowledge/skills/application-database-migrations/SKILL.md +1 -1
  176. package/dist/knowledge/skills/brand-name-screening/SKILL.md +154 -0
  177. package/dist/knowledge/skills/brand-name-screening/references/framework-brand-name-screening-api.md +394 -0
  178. package/dist/knowledge/skills/brand-name-screening/references/screening-procedure.md +65 -0
  179. package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-privacy-notice.md +5 -2
  180. package/dist/knowledge/skills/config-saas/SKILL.md +31 -4
  181. package/dist/knowledge/skills/config-saas/references/compliance-declarations.md +14 -1
  182. package/dist/knowledge/skills/config-saas/references/framework-background-work-api.md +81 -2
  183. package/dist/knowledge/skills/email-add-template/SKILL.md +1 -1
  184. package/dist/knowledge/skills/i18n-rerun-pipeline/SKILL.md +1 -1
  185. package/dist/knowledge/skills/inbound-channels/SKILL.md +2 -2
  186. package/dist/knowledge/skills/local-environment-bootstrap/SKILL.md +11 -1
  187. package/dist/knowledge/skills/local-environment-bootstrap/references/derived-artifact-currency.md +122 -0
  188. package/dist/knowledge/skills/local-environment-bootstrap/references/framework-upgrade-and-dependency-alignment.md +11 -0
  189. package/dist/knowledge/skills/local-environment-bootstrap/references/wildo-cli-bootstrap-commands.md +9 -2
  190. package/dist/knowledge/skills/market-companion-prompt-enrichment/SKILL.md +11 -1
  191. package/dist/knowledge/skills/market-companion-prompt-enrichment/references/framework-companion-behavior-api.md +11 -1
  192. package/dist/knowledge/skills/market-message-templates-authoring/references/framework-message-template-api.md +1 -1
  193. package/dist/knowledge/skills/market-snapshot-validation/SKILL.md +1 -1
  194. package/dist/knowledge/skills/market-snapshot-validation/references/framework-snapshot-validation-api.md +1 -1
  195. package/dist/knowledge/skills/module-companion-exports/references/companion-exports-by-package.md +10 -0
  196. package/dist/knowledge/skills/module-relationships/SKILL.md +6 -4
  197. package/dist/knowledge/skills/seeding-authoring/SKILL.md +51 -3
  198. package/dist/knowledge/skills/seeding-authoring/references/framework-data-seeding-api.md +6 -0
  199. package/dist/knowledge/skills/seeding-operations/references/framework-data-seeding-operations-api.md +7 -1
  200. package/dist/knowledge/skills/spec-companion-exports/references/framework-companion-exports-contract-api.md +10 -0
  201. package/dist/knowledge/skills/website-factory-advanced/SKILL.md +4 -0
  202. package/dist/knowledge/skills/website-page-authoring/SKILL.md +84 -3
  203. package/dist/knowledge/skills/website-section-contact/SKILL.md +15 -0
  204. package/dist/knowledge/skills/website-section-contact/references/define-website-section-api.md +15 -0
  205. package/dist/knowledge/skills/website-section-cta/SKILL.md +15 -0
  206. package/dist/knowledge/skills/website-section-cta/references/define-website-section-api.md +15 -0
  207. package/dist/knowledge/skills/website-section-faq/SKILL.md +15 -0
  208. package/dist/knowledge/skills/website-section-faq/references/define-website-section-api.md +15 -0
  209. package/dist/knowledge/skills/website-section-feature-benefit-summary/SKILL.md +15 -0
  210. package/dist/knowledge/skills/website-section-feature-benefit-summary/references/define-website-section-api.md +15 -0
  211. package/dist/knowledge/skills/website-section-feature-detail/SKILL.md +15 -0
  212. package/dist/knowledge/skills/website-section-feature-detail/references/define-website-section-api.md +15 -0
  213. package/dist/knowledge/skills/website-section-footer-cta/SKILL.md +15 -0
  214. package/dist/knowledge/skills/website-section-footer-cta/references/define-website-section-api.md +15 -0
  215. package/dist/knowledge/skills/website-section-hero/SKILL.md +27 -9
  216. package/dist/knowledge/skills/website-section-hero/references/define-website-section-api.md +15 -0
  217. package/dist/knowledge/skills/website-section-pricing/SKILL.md +15 -0
  218. package/dist/knowledge/skills/website-section-pricing/references/define-website-section-api.md +15 -0
  219. package/dist/knowledge/skills/website-section-social-proof/SKILL.md +15 -0
  220. package/dist/knowledge/skills/website-section-social-proof/references/define-website-section-api.md +15 -0
  221. package/dist/knowledge/skills/website-seo-aeo-geo/SKILL.md +1 -1
  222. package/dist/knowledge/skills/website-seo-aeo-geo/references/aeo-api.md +11 -0
  223. package/dist/knowledge/topic-index.json +169 -43
  224. package/dist/tsconfig.build.tsbuildinfo +1 -1
  225. package/dist/tsconfig.tsbuildinfo +1 -1
  226. package/package.json +4 -4
@@ -137,6 +137,14 @@ compile-time prop checking.
137
137
  * and is caught by nothing until a reviewer reads the page. The
138
138
  * build and `wildo website audit` check the pack against the
139
139
  * DECLARED keys, so declare every slot the component reads.
140
+ * - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
141
+ * can target it. Belongs to the DEFINITION because a page renders its
142
+ * sections list through `WebsitePageSections`, which places every
143
+ * section itself: an anchor a page author would otherwise write on a
144
+ * hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
145
+ * valid HTML id that is also URL-fragment-safe: a letter, then
146
+ * letters, digits, `-` or `_`. Uniqueness on a page is the author's
147
+ * to keep, like the id attribute it becomes.
140
148
  * - `Component` — the React component that renders the section. Typed
141
149
  * as `ComponentType<unknown>` here because schema-layer cannot lock
142
150
  * the component's prop shape (props vary per section). The factory
@@ -163,6 +171,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
163
171
  sectionRef: WebsiteSectionRefSchema,
164
172
  category: WebsiteSectionCategorySchema,
165
173
  expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
174
+ anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
175
+ error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
176
+ }).optional(),
166
177
  Component: z.unknown(),
167
178
  getStructuredData: z.unknown().optional(),
168
179
  });
@@ -251,6 +262,8 @@ export interface DefineWebsiteSectionInput<TProps> {
251
262
  sectionRef: WebsiteSectionRef | string;
252
263
  category: WebsiteSectionCategory;
253
264
  expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
265
+ /** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
266
+ anchorId?: string;
254
267
  Component: ComponentType<TProps>;
255
268
  /**
256
269
  * See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
@@ -333,6 +346,7 @@ export function defineWebsiteSection<TProps>(
333
346
  sectionRef: input.sectionRef,
334
347
  category: input.category,
335
348
  expectedLabelKeys: input.expectedLabelKeys,
349
+ anchorId: input.anchorId,
336
350
  Component: input.Component,
337
351
  getStructuredData: input.getStructuredData,
338
352
  });
@@ -345,6 +359,7 @@ export function defineWebsiteSection<TProps>(
345
359
  sectionRef: parsed.sectionRef,
346
360
  category: parsed.category,
347
361
  expectedLabelKeys: parsed.expectedLabelKeys,
362
+ ...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
348
363
  Component: input.Component,
349
364
  ...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
350
365
  };
@@ -155,6 +155,14 @@ compile-time prop checking.
155
155
  * and is caught by nothing until a reviewer reads the page. The
156
156
  * build and `wildo website audit` check the pack against the
157
157
  * DECLARED keys, so declare every slot the component reads.
158
+ * - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
159
+ * can target it. Belongs to the DEFINITION because a page renders its
160
+ * sections list through `WebsitePageSections`, which places every
161
+ * section itself: an anchor a page author would otherwise write on a
162
+ * hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
163
+ * valid HTML id that is also URL-fragment-safe: a letter, then
164
+ * letters, digits, `-` or `_`. Uniqueness on a page is the author's
165
+ * to keep, like the id attribute it becomes.
158
166
  * - `Component` — the React component that renders the section. Typed
159
167
  * as `ComponentType<unknown>` here because schema-layer cannot lock
160
168
  * the component's prop shape (props vary per section). The factory
@@ -181,6 +189,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
181
189
  sectionRef: WebsiteSectionRefSchema,
182
190
  category: WebsiteSectionCategorySchema,
183
191
  expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
192
+ anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
193
+ error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
194
+ }).optional(),
184
195
  Component: z.unknown(),
185
196
  getStructuredData: z.unknown().optional(),
186
197
  });
@@ -269,6 +280,8 @@ export interface DefineWebsiteSectionInput<TProps> {
269
280
  sectionRef: WebsiteSectionRef | string;
270
281
  category: WebsiteSectionCategory;
271
282
  expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
283
+ /** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
284
+ anchorId?: string;
272
285
  Component: ComponentType<TProps>;
273
286
  /**
274
287
  * See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
@@ -351,6 +364,7 @@ export function defineWebsiteSection<TProps>(
351
364
  sectionRef: input.sectionRef,
352
365
  category: input.category,
353
366
  expectedLabelKeys: input.expectedLabelKeys,
367
+ anchorId: input.anchorId,
354
368
  Component: input.Component,
355
369
  getStructuredData: input.getStructuredData,
356
370
  });
@@ -363,6 +377,7 @@ export function defineWebsiteSection<TProps>(
363
377
  sectionRef: parsed.sectionRef,
364
378
  category: parsed.category,
365
379
  expectedLabelKeys: parsed.expectedLabelKeys,
380
+ ...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
366
381
  Component: input.Component,
367
382
  ...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
368
383
  };
@@ -137,6 +137,14 @@ compile-time prop checking.
137
137
  * and is caught by nothing until a reviewer reads the page. The
138
138
  * build and `wildo website audit` check the pack against the
139
139
  * DECLARED keys, so declare every slot the component reads.
140
+ * - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
141
+ * can target it. Belongs to the DEFINITION because a page renders its
142
+ * sections list through `WebsitePageSections`, which places every
143
+ * section itself: an anchor a page author would otherwise write on a
144
+ * hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
145
+ * valid HTML id that is also URL-fragment-safe: a letter, then
146
+ * letters, digits, `-` or `_`. Uniqueness on a page is the author's
147
+ * to keep, like the id attribute it becomes.
140
148
  * - `Component` — the React component that renders the section. Typed
141
149
  * as `ComponentType<unknown>` here because schema-layer cannot lock
142
150
  * the component's prop shape (props vary per section). The factory
@@ -163,6 +171,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
163
171
  sectionRef: WebsiteSectionRefSchema,
164
172
  category: WebsiteSectionCategorySchema,
165
173
  expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
174
+ anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
175
+ error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
176
+ }).optional(),
166
177
  Component: z.unknown(),
167
178
  getStructuredData: z.unknown().optional(),
168
179
  });
@@ -251,6 +262,8 @@ export interface DefineWebsiteSectionInput<TProps> {
251
262
  sectionRef: WebsiteSectionRef | string;
252
263
  category: WebsiteSectionCategory;
253
264
  expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
265
+ /** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
266
+ anchorId?: string;
254
267
  Component: ComponentType<TProps>;
255
268
  /**
256
269
  * See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
@@ -333,6 +346,7 @@ export function defineWebsiteSection<TProps>(
333
346
  sectionRef: input.sectionRef,
334
347
  category: input.category,
335
348
  expectedLabelKeys: input.expectedLabelKeys,
349
+ anchorId: input.anchorId,
336
350
  Component: input.Component,
337
351
  getStructuredData: input.getStructuredData,
338
352
  });
@@ -345,6 +359,7 @@ export function defineWebsiteSection<TProps>(
345
359
  sectionRef: parsed.sectionRef,
346
360
  category: parsed.category,
347
361
  expectedLabelKeys: parsed.expectedLabelKeys,
362
+ ...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
348
363
  Component: input.Component,
349
364
  ...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
350
365
  };
@@ -155,6 +155,14 @@ compile-time prop checking.
155
155
  * and is caught by nothing until a reviewer reads the page. The
156
156
  * build and `wildo website audit` check the pack against the
157
157
  * DECLARED keys, so declare every slot the component reads.
158
+ * - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
159
+ * can target it. Belongs to the DEFINITION because a page renders its
160
+ * sections list through `WebsitePageSections`, which places every
161
+ * section itself: an anchor a page author would otherwise write on a
162
+ * hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
163
+ * valid HTML id that is also URL-fragment-safe: a letter, then
164
+ * letters, digits, `-` or `_`. Uniqueness on a page is the author's
165
+ * to keep, like the id attribute it becomes.
158
166
  * - `Component` — the React component that renders the section. Typed
159
167
  * as `ComponentType<unknown>` here because schema-layer cannot lock
160
168
  * the component's prop shape (props vary per section). The factory
@@ -181,6 +189,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
181
189
  sectionRef: WebsiteSectionRefSchema,
182
190
  category: WebsiteSectionCategorySchema,
183
191
  expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
192
+ anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
193
+ error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
194
+ }).optional(),
184
195
  Component: z.unknown(),
185
196
  getStructuredData: z.unknown().optional(),
186
197
  });
@@ -269,6 +280,8 @@ export interface DefineWebsiteSectionInput<TProps> {
269
280
  sectionRef: WebsiteSectionRef | string;
270
281
  category: WebsiteSectionCategory;
271
282
  expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
283
+ /** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
284
+ anchorId?: string;
272
285
  Component: ComponentType<TProps>;
273
286
  /**
274
287
  * See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
@@ -351,6 +364,7 @@ export function defineWebsiteSection<TProps>(
351
364
  sectionRef: input.sectionRef,
352
365
  category: input.category,
353
366
  expectedLabelKeys: input.expectedLabelKeys,
367
+ anchorId: input.anchorId,
354
368
  Component: input.Component,
355
369
  getStructuredData: input.getStructuredData,
356
370
  });
@@ -363,6 +377,7 @@ export function defineWebsiteSection<TProps>(
363
377
  sectionRef: parsed.sectionRef,
364
378
  category: parsed.category,
365
379
  expectedLabelKeys: parsed.expectedLabelKeys,
380
+ ...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
366
381
  Component: input.Component,
367
382
  ...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
368
383
  };
@@ -137,6 +137,14 @@ compile-time prop checking.
137
137
  * and is caught by nothing until a reviewer reads the page. The
138
138
  * build and `wildo website audit` check the pack against the
139
139
  * DECLARED keys, so declare every slot the component reads.
140
+ * - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
141
+ * can target it. Belongs to the DEFINITION because a page renders its
142
+ * sections list through `WebsitePageSections`, which places every
143
+ * section itself: an anchor a page author would otherwise write on a
144
+ * hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
145
+ * valid HTML id that is also URL-fragment-safe: a letter, then
146
+ * letters, digits, `-` or `_`. Uniqueness on a page is the author's
147
+ * to keep, like the id attribute it becomes.
140
148
  * - `Component` — the React component that renders the section. Typed
141
149
  * as `ComponentType<unknown>` here because schema-layer cannot lock
142
150
  * the component's prop shape (props vary per section). The factory
@@ -163,6 +171,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
163
171
  sectionRef: WebsiteSectionRefSchema,
164
172
  category: WebsiteSectionCategorySchema,
165
173
  expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
174
+ anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
175
+ error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
176
+ }).optional(),
166
177
  Component: z.unknown(),
167
178
  getStructuredData: z.unknown().optional(),
168
179
  });
@@ -251,6 +262,8 @@ export interface DefineWebsiteSectionInput<TProps> {
251
262
  sectionRef: WebsiteSectionRef | string;
252
263
  category: WebsiteSectionCategory;
253
264
  expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
265
+ /** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
266
+ anchorId?: string;
254
267
  Component: ComponentType<TProps>;
255
268
  /**
256
269
  * See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
@@ -333,6 +346,7 @@ export function defineWebsiteSection<TProps>(
333
346
  sectionRef: input.sectionRef,
334
347
  category: input.category,
335
348
  expectedLabelKeys: input.expectedLabelKeys,
349
+ anchorId: input.anchorId,
336
350
  Component: input.Component,
337
351
  getStructuredData: input.getStructuredData,
338
352
  });
@@ -345,6 +359,7 @@ export function defineWebsiteSection<TProps>(
345
359
  sectionRef: parsed.sectionRef,
346
360
  category: parsed.category,
347
361
  expectedLabelKeys: parsed.expectedLabelKeys,
362
+ ...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
348
363
  Component: input.Component,
349
364
  ...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
350
365
  };
@@ -155,6 +155,14 @@ compile-time prop checking.
155
155
  * and is caught by nothing until a reviewer reads the page. The
156
156
  * build and `wildo website audit` check the pack against the
157
157
  * DECLARED keys, so declare every slot the component reads.
158
+ * - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
159
+ * can target it. Belongs to the DEFINITION because a page renders its
160
+ * sections list through `WebsitePageSections`, which places every
161
+ * section itself: an anchor a page author would otherwise write on a
162
+ * hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
163
+ * valid HTML id that is also URL-fragment-safe: a letter, then
164
+ * letters, digits, `-` or `_`. Uniqueness on a page is the author's
165
+ * to keep, like the id attribute it becomes.
158
166
  * - `Component` — the React component that renders the section. Typed
159
167
  * as `ComponentType<unknown>` here because schema-layer cannot lock
160
168
  * the component's prop shape (props vary per section). The factory
@@ -181,6 +189,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
181
189
  sectionRef: WebsiteSectionRefSchema,
182
190
  category: WebsiteSectionCategorySchema,
183
191
  expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
192
+ anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
193
+ error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
194
+ }).optional(),
184
195
  Component: z.unknown(),
185
196
  getStructuredData: z.unknown().optional(),
186
197
  });
@@ -269,6 +280,8 @@ export interface DefineWebsiteSectionInput<TProps> {
269
280
  sectionRef: WebsiteSectionRef | string;
270
281
  category: WebsiteSectionCategory;
271
282
  expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
283
+ /** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
284
+ anchorId?: string;
272
285
  Component: ComponentType<TProps>;
273
286
  /**
274
287
  * See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
@@ -351,6 +364,7 @@ export function defineWebsiteSection<TProps>(
351
364
  sectionRef: input.sectionRef,
352
365
  category: input.category,
353
366
  expectedLabelKeys: input.expectedLabelKeys,
367
+ anchorId: input.anchorId,
354
368
  Component: input.Component,
355
369
  getStructuredData: input.getStructuredData,
356
370
  });
@@ -363,6 +377,7 @@ export function defineWebsiteSection<TProps>(
363
377
  sectionRef: parsed.sectionRef,
364
378
  category: parsed.category,
365
379
  expectedLabelKeys: parsed.expectedLabelKeys,
380
+ ...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
366
381
  Component: input.Component,
367
382
  ...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
368
383
  };
@@ -137,6 +137,14 @@ compile-time prop checking.
137
137
  * and is caught by nothing until a reviewer reads the page. The
138
138
  * build and `wildo website audit` check the pack against the
139
139
  * DECLARED keys, so declare every slot the component reads.
140
+ * - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
141
+ * can target it. Belongs to the DEFINITION because a page renders its
142
+ * sections list through `WebsitePageSections`, which places every
143
+ * section itself: an anchor a page author would otherwise write on a
144
+ * hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
145
+ * valid HTML id that is also URL-fragment-safe: a letter, then
146
+ * letters, digits, `-` or `_`. Uniqueness on a page is the author's
147
+ * to keep, like the id attribute it becomes.
140
148
  * - `Component` — the React component that renders the section. Typed
141
149
  * as `ComponentType<unknown>` here because schema-layer cannot lock
142
150
  * the component's prop shape (props vary per section). The factory
@@ -163,6 +171,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
163
171
  sectionRef: WebsiteSectionRefSchema,
164
172
  category: WebsiteSectionCategorySchema,
165
173
  expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
174
+ anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
175
+ error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
176
+ }).optional(),
166
177
  Component: z.unknown(),
167
178
  getStructuredData: z.unknown().optional(),
168
179
  });
@@ -251,6 +262,8 @@ export interface DefineWebsiteSectionInput<TProps> {
251
262
  sectionRef: WebsiteSectionRef | string;
252
263
  category: WebsiteSectionCategory;
253
264
  expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
265
+ /** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
266
+ anchorId?: string;
254
267
  Component: ComponentType<TProps>;
255
268
  /**
256
269
  * See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
@@ -333,6 +346,7 @@ export function defineWebsiteSection<TProps>(
333
346
  sectionRef: input.sectionRef,
334
347
  category: input.category,
335
348
  expectedLabelKeys: input.expectedLabelKeys,
349
+ anchorId: input.anchorId,
336
350
  Component: input.Component,
337
351
  getStructuredData: input.getStructuredData,
338
352
  });
@@ -345,6 +359,7 @@ export function defineWebsiteSection<TProps>(
345
359
  sectionRef: parsed.sectionRef,
346
360
  category: parsed.category,
347
361
  expectedLabelKeys: parsed.expectedLabelKeys,
362
+ ...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
348
363
  Component: input.Component,
349
364
  ...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
350
365
  };
@@ -155,6 +155,14 @@ compile-time prop checking.
155
155
  * and is caught by nothing until a reviewer reads the page. The
156
156
  * build and `wildo website audit` check the pack against the
157
157
  * DECLARED keys, so declare every slot the component reads.
158
+ * - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
159
+ * can target it. Belongs to the DEFINITION because a page renders its
160
+ * sections list through `WebsitePageSections`, which places every
161
+ * section itself: an anchor a page author would otherwise write on a
162
+ * hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
163
+ * valid HTML id that is also URL-fragment-safe: a letter, then
164
+ * letters, digits, `-` or `_`. Uniqueness on a page is the author's
165
+ * to keep, like the id attribute it becomes.
158
166
  * - `Component` — the React component that renders the section. Typed
159
167
  * as `ComponentType<unknown>` here because schema-layer cannot lock
160
168
  * the component's prop shape (props vary per section). The factory
@@ -181,6 +189,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
181
189
  sectionRef: WebsiteSectionRefSchema,
182
190
  category: WebsiteSectionCategorySchema,
183
191
  expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
192
+ anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
193
+ error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
194
+ }).optional(),
184
195
  Component: z.unknown(),
185
196
  getStructuredData: z.unknown().optional(),
186
197
  });
@@ -269,6 +280,8 @@ export interface DefineWebsiteSectionInput<TProps> {
269
280
  sectionRef: WebsiteSectionRef | string;
270
281
  category: WebsiteSectionCategory;
271
282
  expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
283
+ /** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
284
+ anchorId?: string;
272
285
  Component: ComponentType<TProps>;
273
286
  /**
274
287
  * See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
@@ -351,6 +364,7 @@ export function defineWebsiteSection<TProps>(
351
364
  sectionRef: input.sectionRef,
352
365
  category: input.category,
353
366
  expectedLabelKeys: input.expectedLabelKeys,
367
+ anchorId: input.anchorId,
354
368
  Component: input.Component,
355
369
  getStructuredData: input.getStructuredData,
356
370
  });
@@ -363,6 +377,7 @@ export function defineWebsiteSection<TProps>(
363
377
  sectionRef: parsed.sectionRef,
364
378
  category: parsed.category,
365
379
  expectedLabelKeys: parsed.expectedLabelKeys,
380
+ ...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
366
381
  Component: input.Component,
367
382
  ...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
368
383
  };
@@ -708,12 +723,15 @@ catalog, and the page route renders it through
708
723
 
709
724
  ### Step 5: Compose into a page
710
725
 
711
- Import the exported `HERO_SECTION` definition into the page module,
712
- and render it inside the page component as
713
- `<WebsiteSection sectionRef={HERO_SECTION.sectionRef}
714
- category={HERO_SECTION.category}><HERO_SECTION.Component {...heroProps}/></WebsiteSection>`.
715
- Register the section in the page manifest's `sections: […]` array so
716
- the label-pack validator can audit it.
726
+ Add the exported `HERO_SECTION` to the page's sections list
727
+ (`<PAGE>_SECTIONS` in `website/src/sections/<page>.sections.tsx`) at its
728
+ reading-order position, normally first. The page renders that list through
729
+ `<WebsitePageSections>`, which wraps each section in its `WebsiteSection` and
730
+ renders `Component` with NO props, and the manifest's `sectionRefs` derive from
731
+ the same list, so the label-pack validator audits it with no further edit.
732
+ A hero with a layout variant therefore binds the variant in its definition
733
+ (`Component: () => <HeroBody variant={HeroVariant.CENTERED} />`), never in the
734
+ page JSX.
717
735
 
718
736
  **Finish** after the hero compiles and renders without TypeScript errors,
719
737
  the page manifest includes the exported `HERO_SECTION`, and the homepage
@@ -929,9 +947,9 @@ a single block (last-wins).
929
947
  `WebSite` / `Organization` (or omitted entirely).
930
948
  - [ ] Layout / variant choices live on the component's prop interface,
931
949
  NOT on the `WebsiteSectionDefinition`.
932
- - [ ] The exported `HERO_SECTION` is registered in the page manifest's
933
- `sections: […]` array and its `sectionRef` matches the
934
- `<WebsiteSection sectionRef=…>` wrapper used in the page JSX.
950
+ - [ ] The exported `HERO_SECTION` is an entry of the page's `<PAGE>_SECTIONS`
951
+ list, and the page renders that list through `<WebsitePageSections>`
952
+ rather than placing the hero in its JSX by hand.
935
953
 
936
954
  ### Grep invariants
937
955
 
@@ -141,6 +141,14 @@ compile-time prop checking.
141
141
  * and is caught by nothing until a reviewer reads the page. The
142
142
  * build and `wildo website audit` check the pack against the
143
143
  * DECLARED keys, so declare every slot the component reads.
144
+ * - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
145
+ * can target it. Belongs to the DEFINITION because a page renders its
146
+ * sections list through `WebsitePageSections`, which places every
147
+ * section itself: an anchor a page author would otherwise write on a
148
+ * hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
149
+ * valid HTML id that is also URL-fragment-safe: a letter, then
150
+ * letters, digits, `-` or `_`. Uniqueness on a page is the author's
151
+ * to keep, like the id attribute it becomes.
144
152
  * - `Component` — the React component that renders the section. Typed
145
153
  * as `ComponentType<unknown>` here because schema-layer cannot lock
146
154
  * the component's prop shape (props vary per section). The factory
@@ -167,6 +175,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
167
175
  sectionRef: WebsiteSectionRefSchema,
168
176
  category: WebsiteSectionCategorySchema,
169
177
  expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
178
+ anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
179
+ error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
180
+ }).optional(),
170
181
  Component: z.unknown(),
171
182
  getStructuredData: z.unknown().optional(),
172
183
  });
@@ -255,6 +266,8 @@ export interface DefineWebsiteSectionInput<TProps> {
255
266
  sectionRef: WebsiteSectionRef | string;
256
267
  category: WebsiteSectionCategory;
257
268
  expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
269
+ /** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
270
+ anchorId?: string;
258
271
  Component: ComponentType<TProps>;
259
272
  /**
260
273
  * See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
@@ -337,6 +350,7 @@ export function defineWebsiteSection<TProps>(
337
350
  sectionRef: input.sectionRef,
338
351
  category: input.category,
339
352
  expectedLabelKeys: input.expectedLabelKeys,
353
+ anchorId: input.anchorId,
340
354
  Component: input.Component,
341
355
  getStructuredData: input.getStructuredData,
342
356
  });
@@ -349,6 +363,7 @@ export function defineWebsiteSection<TProps>(
349
363
  sectionRef: parsed.sectionRef,
350
364
  category: parsed.category,
351
365
  expectedLabelKeys: parsed.expectedLabelKeys,
366
+ ...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
352
367
  Component: input.Component,
353
368
  ...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
354
369
  };
@@ -155,6 +155,14 @@ compile-time prop checking.
155
155
  * and is caught by nothing until a reviewer reads the page. The
156
156
  * build and `wildo website audit` check the pack against the
157
157
  * DECLARED keys, so declare every slot the component reads.
158
+ * - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
159
+ * can target it. Belongs to the DEFINITION because a page renders its
160
+ * sections list through `WebsitePageSections`, which places every
161
+ * section itself: an anchor a page author would otherwise write on a
162
+ * hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
163
+ * valid HTML id that is also URL-fragment-safe: a letter, then
164
+ * letters, digits, `-` or `_`. Uniqueness on a page is the author's
165
+ * to keep, like the id attribute it becomes.
158
166
  * - `Component` — the React component that renders the section. Typed
159
167
  * as `ComponentType<unknown>` here because schema-layer cannot lock
160
168
  * the component's prop shape (props vary per section). The factory
@@ -181,6 +189,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
181
189
  sectionRef: WebsiteSectionRefSchema,
182
190
  category: WebsiteSectionCategorySchema,
183
191
  expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
192
+ anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
193
+ error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
194
+ }).optional(),
184
195
  Component: z.unknown(),
185
196
  getStructuredData: z.unknown().optional(),
186
197
  });
@@ -269,6 +280,8 @@ export interface DefineWebsiteSectionInput<TProps> {
269
280
  sectionRef: WebsiteSectionRef | string;
270
281
  category: WebsiteSectionCategory;
271
282
  expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
283
+ /** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
284
+ anchorId?: string;
272
285
  Component: ComponentType<TProps>;
273
286
  /**
274
287
  * See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
@@ -351,6 +364,7 @@ export function defineWebsiteSection<TProps>(
351
364
  sectionRef: input.sectionRef,
352
365
  category: input.category,
353
366
  expectedLabelKeys: input.expectedLabelKeys,
367
+ anchorId: input.anchorId,
354
368
  Component: input.Component,
355
369
  getStructuredData: input.getStructuredData,
356
370
  });
@@ -363,6 +377,7 @@ export function defineWebsiteSection<TProps>(
363
377
  sectionRef: parsed.sectionRef,
364
378
  category: parsed.category,
365
379
  expectedLabelKeys: parsed.expectedLabelKeys,
380
+ ...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
366
381
  Component: input.Component,
367
382
  ...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
368
383
  };
@@ -137,6 +137,14 @@ compile-time prop checking.
137
137
  * and is caught by nothing until a reviewer reads the page. The
138
138
  * build and `wildo website audit` check the pack against the
139
139
  * DECLARED keys, so declare every slot the component reads.
140
+ * - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
141
+ * can target it. Belongs to the DEFINITION because a page renders its
142
+ * sections list through `WebsitePageSections`, which places every
143
+ * section itself: an anchor a page author would otherwise write on a
144
+ * hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
145
+ * valid HTML id that is also URL-fragment-safe: a letter, then
146
+ * letters, digits, `-` or `_`. Uniqueness on a page is the author's
147
+ * to keep, like the id attribute it becomes.
140
148
  * - `Component` — the React component that renders the section. Typed
141
149
  * as `ComponentType<unknown>` here because schema-layer cannot lock
142
150
  * the component's prop shape (props vary per section). The factory
@@ -163,6 +171,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
163
171
  sectionRef: WebsiteSectionRefSchema,
164
172
  category: WebsiteSectionCategorySchema,
165
173
  expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
174
+ anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
175
+ error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
176
+ }).optional(),
166
177
  Component: z.unknown(),
167
178
  getStructuredData: z.unknown().optional(),
168
179
  });
@@ -251,6 +262,8 @@ export interface DefineWebsiteSectionInput<TProps> {
251
262
  sectionRef: WebsiteSectionRef | string;
252
263
  category: WebsiteSectionCategory;
253
264
  expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
265
+ /** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
266
+ anchorId?: string;
254
267
  Component: ComponentType<TProps>;
255
268
  /**
256
269
  * See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
@@ -333,6 +346,7 @@ export function defineWebsiteSection<TProps>(
333
346
  sectionRef: input.sectionRef,
334
347
  category: input.category,
335
348
  expectedLabelKeys: input.expectedLabelKeys,
349
+ anchorId: input.anchorId,
336
350
  Component: input.Component,
337
351
  getStructuredData: input.getStructuredData,
338
352
  });
@@ -345,6 +359,7 @@ export function defineWebsiteSection<TProps>(
345
359
  sectionRef: parsed.sectionRef,
346
360
  category: parsed.category,
347
361
  expectedLabelKeys: parsed.expectedLabelKeys,
362
+ ...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
348
363
  Component: input.Component,
349
364
  ...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
350
365
  };
@@ -155,6 +155,14 @@ compile-time prop checking.
155
155
  * and is caught by nothing until a reviewer reads the page. The
156
156
  * build and `wildo website audit` check the pack against the
157
157
  * DECLARED keys, so declare every slot the component reads.
158
+ * - `anchorId?` — the section's DOM id, so a link (`<a href="#tiers">`)
159
+ * can target it. Belongs to the DEFINITION because a page renders its
160
+ * sections list through `WebsitePageSections`, which places every
161
+ * section itself: an anchor a page author would otherwise write on a
162
+ * hand-placed `<WebsiteSection id=…>` has nowhere else to live. A
163
+ * valid HTML id that is also URL-fragment-safe: a letter, then
164
+ * letters, digits, `-` or `_`. Uniqueness on a page is the author's
165
+ * to keep, like the id attribute it becomes.
158
166
  * - `Component` — the React component that renders the section. Typed
159
167
  * as `ComponentType<unknown>` here because schema-layer cannot lock
160
168
  * the component's prop shape (props vary per section). The factory
@@ -181,6 +189,9 @@ const _WebsiteSectionDefinitionSchema = z.object({
181
189
  sectionRef: WebsiteSectionRefSchema,
182
190
  category: WebsiteSectionCategorySchema,
183
191
  expectedLabelKeys: z.array(WebsiteLabelKeySchema).readonly(),
192
+ anchorId: z.string().regex(/^[A-Za-z][A-Za-z0-9_-]*$/, {
193
+ error: 'A section anchorId must start with a letter and contain only letters, digits, "-" or "_"',
194
+ }).optional(),
184
195
  Component: z.unknown(),
185
196
  getStructuredData: z.unknown().optional(),
186
197
  });
@@ -269,6 +280,8 @@ export interface DefineWebsiteSectionInput<TProps> {
269
280
  sectionRef: WebsiteSectionRef | string;
270
281
  category: WebsiteSectionCategory;
271
282
  expectedLabelKeys: readonly (WebsiteLabelKey | string)[];
283
+ /** The section's DOM id, so a link can target it (`<a href="#tiers">`). See `WebsiteSectionDefinition.anchorId`. */
284
+ anchorId?: string;
272
285
  Component: ComponentType<TProps>;
273
286
  /**
274
287
  * See `WebsiteSectionDefinition.getStructuredData?` JSDoc for the
@@ -351,6 +364,7 @@ export function defineWebsiteSection<TProps>(
351
364
  sectionRef: input.sectionRef,
352
365
  category: input.category,
353
366
  expectedLabelKeys: input.expectedLabelKeys,
367
+ anchorId: input.anchorId,
354
368
  Component: input.Component,
355
369
  getStructuredData: input.getStructuredData,
356
370
  });
@@ -363,6 +377,7 @@ export function defineWebsiteSection<TProps>(
363
377
  sectionRef: parsed.sectionRef,
364
378
  category: parsed.category,
365
379
  expectedLabelKeys: parsed.expectedLabelKeys,
380
+ ...(parsed.anchorId !== undefined ? { anchorId: parsed.anchorId } : {}),
366
381
  Component: input.Component,
367
382
  ...(input.getStructuredData ? { getStructuredData: input.getStructuredData } : {}),
368
383
  };