@wildo-ai/framework-knowledge 1.1.0

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 (922) hide show
  1. package/LICENSE +34 -0
  2. package/dist/esm/.builder.pid +9 -0
  3. package/dist/esm/framework-knowledge.definitions.d.ts +51 -0
  4. package/dist/esm/framework-knowledge.definitions.d.ts.map +1 -0
  5. package/dist/esm/framework-knowledge.definitions.js +1571 -0
  6. package/dist/esm/framework-knowledge.definitions.js.map +1 -0
  7. package/dist/esm/framework-knowledge.loader.d.ts +72 -0
  8. package/dist/esm/framework-knowledge.loader.d.ts.map +1 -0
  9. package/dist/esm/framework-knowledge.loader.js +258 -0
  10. package/dist/esm/framework-knowledge.loader.js.map +1 -0
  11. package/dist/esm/framework-knowledge.schemas.d.ts +236 -0
  12. package/dist/esm/framework-knowledge.schemas.d.ts.map +1 -0
  13. package/dist/esm/framework-knowledge.schemas.js +23 -0
  14. package/dist/esm/framework-knowledge.schemas.js.map +1 -0
  15. package/dist/esm/index.d.ts +4 -0
  16. package/dist/esm/index.d.ts.map +1 -0
  17. package/dist/esm/index.js +4 -0
  18. package/dist/esm/index.js.map +1 -0
  19. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts +53 -0
  20. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts.map +1 -0
  21. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js +56 -0
  22. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js.map +1 -0
  23. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts +200 -0
  24. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts.map +1 -0
  25. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js +228 -0
  26. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js.map +1 -0
  27. package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts +39 -0
  28. package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts.map +1 -0
  29. package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js +39 -0
  30. package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js.map +1 -0
  31. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts +261 -0
  32. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts.map +1 -0
  33. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js +412 -0
  34. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js.map +1 -0
  35. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts +61 -0
  36. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts.map +1 -0
  37. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js +65 -0
  38. package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js.map +1 -0
  39. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts +53 -0
  40. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts.map +1 -0
  41. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js +54 -0
  42. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js.map +1 -0
  43. package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts +43 -0
  44. package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts.map +1 -0
  45. package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js +73 -0
  46. package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js.map +1 -0
  47. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts +53 -0
  48. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts.map +1 -0
  49. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js +114 -0
  50. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js.map +1 -0
  51. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts +95 -0
  52. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts.map +1 -0
  53. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js +102 -0
  54. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js.map +1 -0
  55. package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts +258 -0
  56. package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts.map +1 -0
  57. package/dist/esm/playbooks/top_down.business-model/playbook.definition.js +241 -0
  58. package/dist/esm/playbooks/top_down.business-model/playbook.definition.js.map +1 -0
  59. package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts +241 -0
  60. package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts.map +1 -0
  61. package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js +202 -0
  62. package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js.map +1 -0
  63. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts +82 -0
  64. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts.map +1 -0
  65. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js +89 -0
  66. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js.map +1 -0
  67. package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts +56 -0
  68. package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts.map +1 -0
  69. package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.js +76 -0
  70. package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.js.map +1 -0
  71. package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.d.ts +30 -0
  72. package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.d.ts.map +1 -0
  73. package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.js +27 -0
  74. package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.js.map +1 -0
  75. package/dist/esm/playbooks/top_down.market-research/playbook.definition.d.ts +31 -0
  76. package/dist/esm/playbooks/top_down.market-research/playbook.definition.d.ts.map +1 -0
  77. package/dist/esm/playbooks/top_down.market-research/playbook.definition.js +26 -0
  78. package/dist/esm/playbooks/top_down.market-research/playbook.definition.js.map +1 -0
  79. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts +254 -0
  80. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts.map +1 -0
  81. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js +219 -0
  82. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js.map +1 -0
  83. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts +180 -0
  84. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts.map +1 -0
  85. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js +302 -0
  86. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js.map +1 -0
  87. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts +249 -0
  88. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts.map +1 -0
  89. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js +286 -0
  90. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js.map +1 -0
  91. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts +248 -0
  92. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts.map +1 -0
  93. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js +227 -0
  94. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js.map +1 -0
  95. package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts +45 -0
  96. package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts.map +1 -0
  97. package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js +48 -0
  98. package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js.map +1 -0
  99. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts +250 -0
  100. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts.map +1 -0
  101. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js +218 -0
  102. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js.map +1 -0
  103. package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/authority-basis.json +1 -0
  104. package/dist/knowledge/manifest.json +45 -0
  105. package/dist/knowledge/playbooks/bottom_up.build-decompose/method.md +407 -0
  106. package/dist/knowledge/playbooks/bottom_up.build-decompose/playbook.json +69 -0
  107. package/dist/knowledge/playbooks/bottom_up.build-dispatch/evaluation-protocol.json +1 -0
  108. package/dist/knowledge/playbooks/bottom_up.build-dispatch/evaluation-treatment.json +1 -0
  109. package/dist/knowledge/playbooks/bottom_up.build-dispatch/method.md +556 -0
  110. package/dist/knowledge/playbooks/bottom_up.build-dispatch/playbook.json +47 -0
  111. package/dist/knowledge/playbooks/bottom_up.build-scale/method.md +344 -0
  112. package/dist/knowledge/playbooks/bottom_up.build-scale/playbook.json +43 -0
  113. package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-protocol.json +1 -0
  114. package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-treatment.json +1 -0
  115. package/dist/knowledge/playbooks/bottom_up.domain-plan/method.md +259 -0
  116. package/dist/knowledge/playbooks/bottom_up.domain-plan/playbook.json +83 -0
  117. package/dist/knowledge/playbooks/bottom_up.domain-plan/structured-artifact-action.json +1 -0
  118. package/dist/knowledge/playbooks/bottom_up.foundation/method.md +321 -0
  119. package/dist/knowledge/playbooks/bottom_up.foundation/playbook.json +79 -0
  120. package/dist/knowledge/playbooks/bottom_up.placement-plan/method.md +185 -0
  121. package/dist/knowledge/playbooks/bottom_up.placement-plan/playbook.json +66 -0
  122. package/dist/knowledge/playbooks/refinement.compliance-document-candidate/method.md +737 -0
  123. package/dist/knowledge/playbooks/refinement.compliance-document-candidate/playbook.json +44 -0
  124. package/dist/knowledge/playbooks/refinement.document-facts/method.md +261 -0
  125. package/dist/knowledge/playbooks/refinement.document-facts/playbook.json +57 -0
  126. package/dist/knowledge/playbooks/top_down.brand-identity/method.md +151 -0
  127. package/dist/knowledge/playbooks/top_down.brand-identity/playbook.json +124 -0
  128. package/dist/knowledge/playbooks/top_down.business-model/evaluation-protocol.json +1 -0
  129. package/dist/knowledge/playbooks/top_down.business-model/evaluation-treatment.json +1 -0
  130. package/dist/knowledge/playbooks/top_down.business-model/method.md +128 -0
  131. package/dist/knowledge/playbooks/top_down.business-model/playbook.json +102 -0
  132. package/dist/knowledge/playbooks/top_down.business-model/structured-artifact-action.json +1 -0
  133. package/dist/knowledge/playbooks/top_down.capability-map/evaluation-protocol.json +1 -0
  134. package/dist/knowledge/playbooks/top_down.capability-map/evaluation-treatment.json +1 -0
  135. package/dist/knowledge/playbooks/top_down.capability-map/method.md +239 -0
  136. package/dist/knowledge/playbooks/top_down.capability-map/playbook.json +73 -0
  137. package/dist/knowledge/playbooks/top_down.capability-map/structured-artifact-action.json +1 -0
  138. package/dist/knowledge/playbooks/top_down.compliance-posture/method.md +177 -0
  139. package/dist/knowledge/playbooks/top_down.compliance-posture/playbook.json +95 -0
  140. package/dist/knowledge/playbooks/top_down.market-analysis/method.md +64 -0
  141. package/dist/knowledge/playbooks/top_down.market-analysis/playbook.json +49 -0
  142. package/dist/knowledge/playbooks/top_down.market-evidence-adequacy/method.md +56 -0
  143. package/dist/knowledge/playbooks/top_down.market-evidence-adequacy/playbook.json +40 -0
  144. package/dist/knowledge/playbooks/top_down.market-research/method.md +68 -0
  145. package/dist/knowledge/playbooks/top_down.market-research/playbook.json +42 -0
  146. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-protocol.json +1 -0
  147. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-treatment.json +1 -0
  148. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/method.md +239 -0
  149. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/playbook.json +69 -0
  150. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/structured-artifact-action.json +1 -0
  151. package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-protocol.json +1 -0
  152. package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-treatment.json +1 -0
  153. package/dist/knowledge/playbooks/top_down.phase-gate/method.md +96 -0
  154. package/dist/knowledge/playbooks/top_down.phase-gate/playbook.json +77 -0
  155. package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-protocol.json +1 -0
  156. package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-treatment.json +1 -0
  157. package/dist/knowledge/playbooks/top_down.requirements-definition/method.md +53 -0
  158. package/dist/knowledge/playbooks/top_down.requirements-definition/playbook.json +61 -0
  159. package/dist/knowledge/playbooks/top_down.requirements-definition/structured-artifact-action.json +1 -0
  160. package/dist/knowledge/playbooks/top_down.scope-roadmap/evaluation-protocol.json +1 -0
  161. package/dist/knowledge/playbooks/top_down.scope-roadmap/evaluation-treatment.json +1 -0
  162. package/dist/knowledge/playbooks/top_down.scope-roadmap/method.md +280 -0
  163. package/dist/knowledge/playbooks/top_down.scope-roadmap/playbook.json +87 -0
  164. package/dist/knowledge/playbooks/top_down.scope-roadmap/structured-artifact-action.json +1 -0
  165. package/dist/knowledge/playbooks/top_down.value-proposition/method.md +204 -0
  166. package/dist/knowledge/playbooks/top_down.value-proposition/playbook.json +54 -0
  167. package/dist/knowledge/playbooks/top_down.vision-elicitation/evaluation-protocol.json +1 -0
  168. package/dist/knowledge/playbooks/top_down.vision-elicitation/evaluation-treatment.json +1 -0
  169. package/dist/knowledge/playbooks/top_down.vision-elicitation/method.md +146 -0
  170. package/dist/knowledge/playbooks/top_down.vision-elicitation/playbook.json +120 -0
  171. package/dist/knowledge/playbooks/top_down.vision-elicitation/structured-artifact-action.json +1 -0
  172. package/dist/knowledge/references/application.database.migration-change-risk.md +28 -0
  173. package/dist/knowledge/references/assertions.authored-metadata.config.md +90 -0
  174. package/dist/knowledge/references/assertions.behaviors.wire-contracts.md +223 -0
  175. package/dist/knowledge/references/assertions.references.conventions.md +92 -0
  176. package/dist/knowledge/references/assertions.snapshot.validation.md +317 -0
  177. package/dist/knowledge/references/assertions.specification.config.md +287 -0
  178. package/dist/knowledge/references/brand.asset.config.md +167 -0
  179. package/dist/knowledge/references/brand.authored-metadata.config.md +51 -0
  180. package/dist/knowledge/references/brand.logo-direction.config.md +88 -0
  181. package/dist/knowledge/references/brand.name.config.md +46 -0
  182. package/dist/knowledge/references/brand.snapshot.config.md +76 -0
  183. package/dist/knowledge/references/brand.snapshot.validation.md +446 -0
  184. package/dist/knowledge/references/brand.visual-tone.config.md +56 -0
  185. package/dist/knowledge/references/build-plan.task-graph.config.md +198 -0
  186. package/dist/knowledge/references/business-model.authored-metadata.config.md +65 -0
  187. package/dist/knowledge/references/business-model.pricing-plan.config.md +122 -0
  188. package/dist/knowledge/references/business-model.references.conventions.md +99 -0
  189. package/dist/knowledge/references/business-model.snapshot.config.md +121 -0
  190. package/dist/knowledge/references/business-model.snapshot.validation.md +325 -0
  191. package/dist/knowledge/references/cli.market.generate-command.md +230 -0
  192. package/dist/knowledge/references/cli.market.utils.md +147 -0
  193. package/dist/knowledge/references/companion.introspection.behaviors.market.md +90 -0
  194. package/dist/knowledge/references/companion.introspection.handlers.market.md +42 -0
  195. package/dist/knowledge/references/companion.market.generation-service.md +270 -0
  196. package/dist/knowledge/references/companion.market.prompt-renderer.md +244 -0
  197. package/dist/knowledge/references/companion.technical-doc.service.md +809 -0
  198. package/dist/knowledge/references/engine.client-bundle.allow-list.md +125 -0
  199. package/dist/knowledge/references/engine.client-bundle.discipline.md +130 -0
  200. package/dist/knowledge/references/engine.client-bundle.external-connectors-public.discipline.md +55 -0
  201. package/dist/knowledge/references/engine.saas-technical-doc.config.md +215 -0
  202. package/dist/knowledge/references/engine.saas-website.config.md +331 -0
  203. package/dist/knowledge/references/example.authorization.unit-narrowing.declaration.md +24 -0
  204. package/dist/knowledge/references/example.backend.addon-wiring.module.md +55 -0
  205. package/dist/knowledge/references/example.backend.custom-operation.create-postfix.md +35 -0
  206. package/dist/knowledge/references/example.backend.operation.error-throw.md +17 -0
  207. package/dist/knowledge/references/example.config.app-shell.command-menu-items.md +63 -0
  208. package/dist/knowledge/references/example.config.app-shell.full.md +147 -0
  209. package/dist/knowledge/references/example.config.app-shell.hosted-components.md +45 -0
  210. package/dist/knowledge/references/example.config.app-shell.quick-switcher-fields.md +37 -0
  211. package/dist/knowledge/references/example.config.backend.billing-enable.md +20 -0
  212. package/dist/knowledge/references/example.config.backend.required-floors.md +46 -0
  213. package/dist/knowledge/references/example.config.design-system.full.md +162 -0
  214. package/dist/knowledge/references/example.config.navigation.full.md +71 -0
  215. package/dist/knowledge/references/example.config.provider.backend-scope-billing.md +27 -0
  216. package/dist/knowledge/references/example.data-seeding.minimal.md +114 -0
  217. package/dist/knowledge/references/example.email.template.minimal.md +54 -0
  218. package/dist/knowledge/references/example.engine.component-registration.lazy-load.md +16 -0
  219. package/dist/knowledge/references/example.engine.product-definitions.feature-and-profiles.md +146 -0
  220. package/dist/knowledge/references/example.flows-actors.chat-assistant.md +196 -0
  221. package/dist/knowledge/references/example.flows-actors.llm-agent-one-shot.md +174 -0
  222. package/dist/knowledge/references/example.i18n.label-generation.engine-barrel.md +15 -0
  223. package/dist/knowledge/references/example.infra.cdn.cloudflare.md +23 -0
  224. package/dist/knowledge/references/example.infra.cdn.generic.md +17 -0
  225. package/dist/knowledge/references/example.infra.environment-config.local.md +250 -0
  226. package/dist/knowledge/references/example.market.alternative.in-house-build.md +49 -0
  227. package/dist/knowledge/references/example.market.authored-metadata.md +32 -0
  228. package/dist/knowledge/references/example.market.buying-journey.core-icp.md +140 -0
  229. package/dist/knowledge/references/example.market.category.config.md +71 -0
  230. package/dist/knowledge/references/example.market.channel.community.md +39 -0
  231. package/dist/knowledge/references/example.market.feature-benefit.kano-threshold.md +67 -0
  232. package/dist/knowledge/references/example.market.feature-benefit.pain-reliever.md +65 -0
  233. package/dist/knowledge/references/example.market.icp.anti-target.md +47 -0
  234. package/dist/knowledge/references/example.market.icp.individual.md +82 -0
  235. package/dist/knowledge/references/example.market.icp.legal-entity-with-geographies.md +95 -0
  236. package/dist/knowledge/references/example.market.is-benefit-available.composition.md +40 -0
  237. package/dist/knowledge/references/example.market.job.emotional.md +27 -0
  238. package/dist/knowledge/references/example.market.job.functional.md +28 -0
  239. package/dist/knowledge/references/example.market.message-template.seeds.md +106 -0
  240. package/dist/knowledge/references/example.market.objection.pricing.md +39 -0
  241. package/dist/knowledge/references/example.market.persona.dmu-with-inheritance.md +62 -0
  242. package/dist/knowledge/references/example.market.persona.individual-self.md +51 -0
  243. package/dist/knowledge/references/example.market.positioning.per-icp.md +103 -0
  244. package/dist/knowledge/references/example.market.proof.metric.md +39 -0
  245. package/dist/knowledge/references/example.market.scoring.golden-case.md +46 -0
  246. package/dist/knowledge/references/example.market.scoring.no-coverage-zero.md +40 -0
  247. package/dist/knowledge/references/example.market.snapshot-validation.duplicate-journey-stage.md +36 -0
  248. package/dist/knowledge/references/example.market.snapshot-validation.errors-by-kind.md +55 -0
  249. package/dist/knowledge/references/example.market.snapshot-validation.objection-proof-benefit-mismatch.md +74 -0
  250. package/dist/knowledge/references/example.market.snapshot-validation.proof-without-support.md +32 -0
  251. package/dist/knowledge/references/example.market.snapshot-validation.threshold-without-job.md +44 -0
  252. package/dist/knowledge/references/example.market.snapshot.assembled.md +49 -0
  253. package/dist/knowledge/references/example.market.tone-of-voice.config.md +41 -0
  254. package/dist/knowledge/references/example.market.trigger.growth-milestone.md +43 -0
  255. package/dist/knowledge/references/example.module.companion-exports.full.md +142 -0
  256. package/dist/knowledge/references/example.module.registration.shared.md +16 -0
  257. package/dist/knowledge/references/example.module.relationships.actor-edge-back-to-scope-owner.md +47 -0
  258. package/dist/knowledge/references/example.module.relationships.discriminator.md +25 -0
  259. package/dist/knowledge/references/example.module.relationships.scope-membership-junction.md +25 -0
  260. package/dist/knowledge/references/example.provider.backend-module-shape.md +110 -0
  261. package/dist/knowledge/references/example.provider.contribution.backend-billing.md +12 -0
  262. package/dist/knowledge/references/example.provider.frontend-file-picker.contribution.md +30 -0
  263. package/dist/knowledge/references/example.provider.frontend-file-picker.module.md +21 -0
  264. package/dist/knowledge/references/example.rag.source-fields.declaration.md +83 -0
  265. package/dist/knowledge/references/example.rate-limit.custom-controller-surface.md +25 -0
  266. package/dist/knowledge/references/example.rate-limit.resource-operation-surface.md +24 -0
  267. package/dist/knowledge/references/example.resource.add-field.priority-enum.md +19 -0
  268. package/dist/knowledge/references/example.resource.add-resource.module-factory-map.md +21 -0
  269. package/dist/knowledge/references/example.resource.config-wiring.fk-relationship.md +33 -0
  270. package/dist/knowledge/references/example.resource.custom-view.read-host.md +28 -0
  271. package/dist/knowledge/references/example.resource.mcp-exposure.md +65 -0
  272. package/dist/knowledge/references/example.resource.reference-constraints.role-constrained.md +27 -0
  273. package/dist/knowledge/references/example.resource.ui-behavior.enum-badge.md +22 -0
  274. package/dist/knowledge/references/example.resource.ui-behavior.operation-icon.md +43 -0
  275. package/dist/knowledge/references/example.spec.composite-view.workspace.md +72 -0
  276. package/dist/knowledge/references/example.spec.feature.flag-with-codehandling.md +64 -0
  277. package/dist/knowledge/references/example.spec.frontend-component.prop-vocabulary.md +88 -0
  278. package/dist/knowledge/references/example.spec.resource.semantic-field.md +23 -0
  279. package/dist/knowledge/references/example.views.app-level.composite-views-config.md +19 -0
  280. package/dist/knowledge/references/example.views.chart-view.resource-owned.md +69 -0
  281. package/dist/knowledge/references/example.views.composite-view.host-embeds.md +31 -0
  282. package/dist/knowledge/references/example.views.composite-view.workspace.md +65 -0
  283. package/dist/knowledge/references/example.views.custom-view.execution-host.md +41 -0
  284. package/dist/knowledge/references/example.views.execution-view.resource-owned.md +25 -0
  285. package/dist/knowledge/references/external-connectors.app.frontend-provider-module.md +42 -0
  286. package/dist/knowledge/references/market.alternative.config.md +68 -0
  287. package/dist/knowledge/references/market.alternative.kind.md +32 -0
  288. package/dist/knowledge/references/market.authored-metadata.config.md +64 -0
  289. package/dist/knowledge/references/market.buying-journey.config.md +43 -0
  290. package/dist/knowledge/references/market.buying-journey.stage.md +33 -0
  291. package/dist/knowledge/references/market.category.config.md +63 -0
  292. package/dist/knowledge/references/market.channel.config.md +59 -0
  293. package/dist/knowledge/references/market.channel.kind.md +49 -0
  294. package/dist/knowledge/references/market.context-block.builder.md +544 -0
  295. package/dist/knowledge/references/market.context-block.response.md +57 -0
  296. package/dist/knowledge/references/market.feature-benefit.config.md +84 -0
  297. package/dist/knowledge/references/market.feature-benefit.kano.md +41 -0
  298. package/dist/knowledge/references/market.gain.config.md +50 -0
  299. package/dist/knowledge/references/market.generation.response.md +108 -0
  300. package/dist/knowledge/references/market.icp.config.md +162 -0
  301. package/dist/knowledge/references/market.icp.geographic-targeting.md +57 -0
  302. package/dist/knowledge/references/market.inherit-from.md +74 -0
  303. package/dist/knowledge/references/market.is-benefit-available.md +58 -0
  304. package/dist/knowledge/references/market.job.config.md +48 -0
  305. package/dist/knowledge/references/market.message-template.config.md +86 -0
  306. package/dist/knowledge/references/market.objection.config.md +56 -0
  307. package/dist/knowledge/references/market.objection.kind.md +34 -0
  308. package/dist/knowledge/references/market.pain.config.md +50 -0
  309. package/dist/knowledge/references/market.persona.config.md +64 -0
  310. package/dist/knowledge/references/market.positioning.config.md +84 -0
  311. package/dist/knowledge/references/market.proof.config.md +48 -0
  312. package/dist/knowledge/references/market.proof.kind.md +34 -0
  313. package/dist/knowledge/references/market.references.weighted-edges.md +105 -0
  314. package/dist/knowledge/references/market.scoring.fit.md +215 -0
  315. package/dist/knowledge/references/market.snapshot.config.md +34 -0
  316. package/dist/knowledge/references/market.snapshot.validation.md +1171 -0
  317. package/dist/knowledge/references/market.tone-of-voice.config.md +80 -0
  318. package/dist/knowledge/references/market.trigger.config.md +45 -0
  319. package/dist/knowledge/references/market.trigger.kind.md +35 -0
  320. package/dist/knowledge/references/placement-plan.config.md +330 -0
  321. package/dist/knowledge/references/platform.config.application-database.md +74 -0
  322. package/dist/knowledge/references/platform.config.application-modules.md +30 -0
  323. package/dist/knowledge/references/platform.config.backing-services.md +266 -0
  324. package/dist/knowledge/references/platform.config.cdn.md +167 -0
  325. package/dist/knowledge/references/platform.config.environment.deployment.md +263 -0
  326. package/dist/knowledge/references/platform.config.saas.md +405 -0
  327. package/dist/knowledge/references/presets.models.design-system.configuration.md +59 -0
  328. package/dist/knowledge/references/presets.models.design-system.source-config.md +72 -0
  329. package/dist/knowledge/references/presets.models.labelling.sections.md +64 -0
  330. package/dist/knowledge/references/presets.models.material.profile-contract.md +192 -0
  331. package/dist/knowledge/references/presets.models.material.runtime-policy.md +60 -0
  332. package/dist/knowledge/references/presets.models.surface-policy.defaults.md +613 -0
  333. package/dist/knowledge/references/presets.models.surface-policy.md +534 -0
  334. package/dist/knowledge/references/presets.models.surface-variant.md +56 -0
  335. package/dist/knowledge/references/requirements.authored-metadata.config.md +64 -0
  336. package/dist/knowledge/references/requirements.functional-requirement.config.md +68 -0
  337. package/dist/knowledge/references/requirements.non-functional-requirement.config.md +100 -0
  338. package/dist/knowledge/references/requirements.references.conventions.md +125 -0
  339. package/dist/knowledge/references/requirements.snapshot.config.md +73 -0
  340. package/dist/knowledge/references/requirements.snapshot.validation.md +333 -0
  341. package/dist/knowledge/references/roadmap.authored-metadata.config.md +64 -0
  342. package/dist/knowledge/references/roadmap.phase.config.md +149 -0
  343. package/dist/knowledge/references/roadmap.references.conventions.md +89 -0
  344. package/dist/knowledge/references/roadmap.snapshot.config.md +65 -0
  345. package/dist/knowledge/references/roadmap.snapshot.validation.md +325 -0
  346. package/dist/knowledge/references/saas.backend.app-config.backend-authored.md +32 -0
  347. package/dist/knowledge/references/saas.backend.application-initialization.assembly.md +38 -0
  348. package/dist/knowledge/references/saas.backend.billing.resolution-failure-reasons.md +45 -0
  349. package/dist/knowledge/references/saas.backend.custom-operation.authoritative-fields.md +53 -0
  350. package/dist/knowledge/references/saas.backend.custom-operation.transactional-core.md +120 -0
  351. package/dist/knowledge/references/saas.backend.domain-module.md +237 -0
  352. package/dist/knowledge/references/saas.backend.email-template.definition.md +69 -0
  353. package/dist/knowledge/references/saas.backend.flows-actors.a2a-agent-card.md +89 -0
  354. package/dist/knowledge/references/saas.backend.flows-actors.a2a-task-surface.md +118 -0
  355. package/dist/knowledge/references/saas.backend.flows-actors.function-tool.md +82 -0
  356. package/dist/knowledge/references/saas.backend.flows-actors.invoke-agent.md +48 -0
  357. package/dist/knowledge/references/saas.backend.flows-actors.resource-read-tool.md +39 -0
  358. package/dist/knowledge/references/saas.backend.flows-actors.resource-write-tool.md +67 -0
  359. package/dist/knowledge/references/saas.backend.pdf-template.bindings.md +52 -0
  360. package/dist/knowledge/references/saas.backend.pdf-template.definition.md +113 -0
  361. package/dist/knowledge/references/saas.backend.rate-limit-service.check-policy.md +75 -0
  362. package/dist/knowledge/references/saas.backend.system-access-service.md +994 -0
  363. package/dist/knowledge/references/saas.data-seeding.admin-endpoints.md +59 -0
  364. package/dist/knowledge/references/saas.data-seeding.bootstrap-wiring.md +184 -0
  365. package/dist/knowledge/references/saas.data-seeding.definition-input.md +95 -0
  366. package/dist/knowledge/references/saas.data-seeding.modes.md +72 -0
  367. package/dist/knowledge/references/saas.data-seeding.run-ledger.md +198 -0
  368. package/dist/knowledge/references/saas.data-seeding.run-status.md +35 -0
  369. package/dist/knowledge/references/saas.data-seeding.schedule.md +91 -0
  370. package/dist/knowledge/references/saas.data-seeding.scope-iteration-strategy.md +46 -0
  371. package/dist/knowledge/references/saas.external-providers.backend-provider-registry.runtime-filter.md +55 -0
  372. package/dist/knowledge/references/saas.external-providers.document-extraction.applicability.md +26 -0
  373. package/dist/knowledge/references/saas.external-providers.embeddings.applicability.md +30 -0
  374. package/dist/knowledge/references/saas.external-providers.llm.model-configuration.md +124 -0
  375. package/dist/knowledge/references/saas.external-providers.llm.operation-key.md +49 -0
  376. package/dist/knowledge/references/saas.frontend.app-level-component.configuration.md +265 -0
  377. package/dist/knowledge/references/saas.frontend.app-level-component.vocabulary.md +148 -0
  378. package/dist/knowledge/references/saas.frontend.app-shell.hosted-components.md +145 -0
  379. package/dist/knowledge/references/saas.frontend.chart-view.inserted-declaration.md +80 -0
  380. package/dist/knowledge/references/saas.frontend.command-menu.omnibox.md +88 -0
  381. package/dist/knowledge/references/saas.frontend.command-menu.search-resource.md +109 -0
  382. package/dist/knowledge/references/saas.frontend.component-registration.entry.md +21 -0
  383. package/dist/knowledge/references/saas.frontend.composite-view.authoring.md +102 -0
  384. package/dist/knowledge/references/saas.frontend.composite-view.define-helper.md +31 -0
  385. package/dist/knowledge/references/saas.frontend.domain-module.md +31 -0
  386. package/dist/knowledge/references/saas.frontend.embedded-resource-descent.md +37 -0
  387. package/dist/knowledge/references/saas.frontend.execution-view.action-status-contract.md +172 -0
  388. package/dist/knowledge/references/saas.frontend.execution-view.action-status-contract.per-action-retry-loop.md +115 -0
  389. package/dist/knowledge/references/saas.frontend.execution-view.definition.md +172 -0
  390. package/dist/knowledge/references/saas.frontend.execution-view.dirty-bridge-contract.local-pane.md +109 -0
  391. package/dist/knowledge/references/saas.frontend.execution-view.dirty-bridge-contract.md +55 -0
  392. package/dist/knowledge/references/saas.frontend.execution-view.dirty-state-contract.md +151 -0
  393. package/dist/knowledge/references/saas.frontend.execution-view.failure-handling-contract.md +302 -0
  394. package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.md +89 -0
  395. package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.participation-prefetch.md +231 -0
  396. package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.participation-prefetch.shell-data-hydrator.md +174 -0
  397. package/dist/knowledge/references/saas.frontend.execution-view.navigation-handling-and-embedding.md +96 -0
  398. package/dist/knowledge/references/saas.frontend.execution-view.navigation-handling-and-embedding.resolution.md +45 -0
  399. package/dist/knowledge/references/saas.frontend.execution-view.outcome-emission-contract.md +71 -0
  400. package/dist/knowledge/references/saas.frontend.execution-view.participation-and-anchor.md +80 -0
  401. package/dist/knowledge/references/saas.frontend.execution-view.three-zone-contract.md +147 -0
  402. package/dist/knowledge/references/saas.frontend.flows-actors-view.md +40 -0
  403. package/dist/knowledge/references/saas.frontend.form-fields.file-provider-constraints.md +80 -0
  404. package/dist/knowledge/references/saas.frontend.full-custom-view.definition.md +64 -0
  405. package/dist/knowledge/references/saas.frontend.inserted-view.identity-bindings-descriptor.md +149 -0
  406. package/dist/knowledge/references/saas.frontend.operation-key-and-resource-config-like.md +63 -0
  407. package/dist/knowledge/references/saas.frontend.quick-switcher.scope-field.md +102 -0
  408. package/dist/knowledge/references/saas.frontend.related-resource-embeds.md +86 -0
  409. package/dist/knowledge/references/saas.frontend.related-resource-preview.md +23 -0
  410. package/dist/knowledge/references/saas.frontend.related-resource-sections.md +28 -0
  411. package/dist/knowledge/references/saas.frontend.resource-header-title.md +43 -0
  412. package/dist/knowledge/references/saas.frontend.resource-layout-templates.md +215 -0
  413. package/dist/knowledge/references/saas.frontend.resource-operation-frontend-config.md +531 -0
  414. package/dist/knowledge/references/saas.frontend.resource-ui-behavior-config.md +210 -0
  415. package/dist/knowledge/references/saas.frontend.resource-ui-behavior-preset-map.md +39 -0
  416. package/dist/knowledge/references/saas.frontend.settings-hub.engine-destinations.md +58 -0
  417. package/dist/knowledge/references/saas.frontend.settings-hub.placement.md +118 -0
  418. package/dist/knowledge/references/saas.frontend.view-definition-scope.md +42 -0
  419. package/dist/knowledge/references/saas.market.generation-agent.md +104 -0
  420. package/dist/knowledge/references/saas.models.core-resource-operation.md +86 -0
  421. package/dist/knowledge/references/saas.models.data-mode-read-list.md +395 -0
  422. package/dist/knowledge/references/saas.models.engine-capabilities.md +114 -0
  423. package/dist/knowledge/references/saas.models.error-type.md +45 -0
  424. package/dist/knowledge/references/saas.models.external-data-pipeline.md +162 -0
  425. package/dist/knowledge/references/saas.models.feature-limit-semantic.md +51 -0
  426. package/dist/knowledge/references/saas.models.flows-actors.agent-configuration.md +127 -0
  427. package/dist/knowledge/references/saas.models.flows-actors.agent-definition.md +115 -0
  428. package/dist/knowledge/references/saas.models.flows-actors.agent-invocation.md +52 -0
  429. package/dist/knowledge/references/saas.models.flows-actors.agent-prompt-spec.md +188 -0
  430. package/dist/knowledge/references/saas.models.http-api-binding.md +237 -0
  431. package/dist/knowledge/references/saas.models.navigation.layout.md +149 -0
  432. package/dist/knowledge/references/saas.models.organization-unit-narrowing-containment.md +22 -0
  433. package/dist/knowledge/references/saas.models.organization-unit-narrowing-declaration.md +42 -0
  434. package/dist/knowledge/references/saas.models.polymorphism.optout-business-key.md +62 -0
  435. package/dist/knowledge/references/saas.models.polymorphism.variant-definition.md +74 -0
  436. package/dist/knowledge/references/saas.models.provider-capabilities.md +97 -0
  437. package/dist/knowledge/references/saas.models.rate-limit-configuration.md +67 -0
  438. package/dist/knowledge/references/saas.models.relationship-handling-contract.md +30 -0
  439. package/dist/knowledge/references/saas.models.relationship-handling-settings.md +62 -0
  440. package/dist/knowledge/references/saas.models.relationship-nature-and-models.md +112 -0
  441. package/dist/knowledge/references/saas.models.resource-config.builder-parameters.md +431 -0
  442. package/dist/knowledge/references/saas.models.resource-config.forwarded-label.md +88 -0
  443. package/dist/knowledge/references/saas.models.resource-config.operation-api-call.md +89 -0
  444. package/dist/knowledge/references/saas.models.resource-config.operation-base.md +79 -0
  445. package/dist/knowledge/references/saas.models.resource-config.operation-mcp-exposure.md +49 -0
  446. package/dist/knowledge/references/saas.models.resource-config.operation-path.md +27 -0
  447. package/dist/knowledge/references/saas.models.resource-config.operation-union.md +26 -0
  448. package/dist/knowledge/references/saas.models.resource-config.operation-variant-for-key.md +62 -0
  449. package/dist/knowledge/references/saas.models.resource-config.resource-configuration.md +124 -0
  450. package/dist/knowledge/references/saas.models.resource-config.resource-relationships-buckets.md +38 -0
  451. package/dist/knowledge/references/saas.models.resource-config.resources-registry.md +69 -0
  452. package/dist/knowledge/references/saas.models.resource-config.searchable-relation.md +89 -0
  453. package/dist/knowledge/references/saas.models.resource-config.system-access-policy.md +121 -0
  454. package/dist/knowledge/references/saas.models.resource-config.token-generation.md +145 -0
  455. package/dist/knowledge/references/saas.models.resource-field-identifier.md +25 -0
  456. package/dist/knowledge/references/saas.models.resource-operation-display-risk.md +77 -0
  457. package/dist/knowledge/references/saas.models.resource-operation-variant-runtime.md +58 -0
  458. package/dist/knowledge/references/saas.models.resource-primary-scope.md +36 -0
  459. package/dist/knowledge/references/saas.models.resource-relationship-access-scope.md +26 -0
  460. package/dist/knowledge/references/saas.models.resource-relationship-builder-parameters.md +100 -0
  461. package/dist/knowledge/references/saas.models.resource-relationship-cardinality.md +57 -0
  462. package/dist/knowledge/references/saas.models.resource-relationship-declaration.md +69 -0
  463. package/dist/knowledge/references/saas.models.resource-relationship-resolved-semantics.md +60 -0
  464. package/dist/knowledge/references/saas.models.resource-relationship-schema.md +172 -0
  465. package/dist/knowledge/references/saas.models.resource-server-instance.md +109 -0
  466. package/dist/knowledge/references/saas.models.resource-type.md +24 -0
  467. package/dist/knowledge/references/saas.models.schema-family-builder.md +242 -0
  468. package/dist/knowledge/references/saas.models.scope-membership.md +143 -0
  469. package/dist/knowledge/references/saas.models.shared-domain-module.md +36 -0
  470. package/dist/knowledge/references/saas.models.shared-saas-module.md +36 -0
  471. package/dist/knowledge/references/saas.public-runtime.contract.md +229 -0
  472. package/dist/knowledge/references/saas.rag.retrieval-bounds.md +106 -0
  473. package/dist/knowledge/references/saas.rag.retrieval-refusals.md +89 -0
  474. package/dist/knowledge/references/saas.rag.retrieval-request.md +130 -0
  475. package/dist/knowledge/references/saas.rag.retrieval-result.md +147 -0
  476. package/dist/knowledge/references/saas.rag.retrieval-scores.md +54 -0
  477. package/dist/knowledge/references/saas.specifications.application-document-fact-specification.contract.md +59 -0
  478. package/dist/knowledge/references/saas.specifications.application-document-publication.contract.md +74 -0
  479. package/dist/knowledge/references/saas.specifications.assurance-document-blueprint.contract.md +1158 -0
  480. package/dist/knowledge/references/saas.specifications.assurance-program.contract.md +2602 -0
  481. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.catalog-spec-shared.md +180 -0
  482. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.discriminated-union.md +138 -0
  483. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-aggregate-offer.md +46 -0
  484. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-aggregate-rating.md +47 -0
  485. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-article.md +49 -0
  486. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-blog-posting.md +62 -0
  487. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-breadcrumb-list.md +46 -0
  488. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-faq-page.md +51 -0
  489. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-offer.md +46 -0
  490. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-organization.md +48 -0
  491. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-product.md +59 -0
  492. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-review.md +46 -0
  493. package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-website.md +46 -0
  494. package/dist/knowledge/references/saas.specifications.companion-exports.contract.md +530 -0
  495. package/dist/knowledge/references/saas.specifications.composite-view-specification.md +49 -0
  496. package/dist/knowledge/references/saas.specifications.error-message-specification.md +92 -0
  497. package/dist/knowledge/references/saas.specifications.family-specifications.md +109 -0
  498. package/dist/knowledge/references/saas.specifications.feature-specification.md +93 -0
  499. package/dist/knowledge/references/saas.specifications.frontend-component-spec-factory.md +113 -0
  500. package/dist/knowledge/references/saas.specifications.frontend-component-spec-model.md +366 -0
  501. package/dist/knowledge/references/saas.specifications.resource-frontend-configuration-aspect.md +41 -0
  502. package/dist/knowledge/references/saas.specifications.resource-operation-spec.md +1978 -0
  503. package/dist/knowledge/references/saas.specifications.resource-pdf-template-spec.md +58 -0
  504. package/dist/knowledge/references/saas.specifications.resource-spec-code-handling.md +49 -0
  505. package/dist/knowledge/references/saas.specifications.resource-spec-config.md +156 -0
  506. package/dist/knowledge/references/saas.specifications.resource-spec-factory.md +171 -0
  507. package/dist/knowledge/references/saas.specifications.resource-spec-frontend-config-type.md +54 -0
  508. package/dist/knowledge/references/saas.specifications.resource-spec-frontend-prose.md +171 -0
  509. package/dist/knowledge/references/saas.website.astro.bridge.md +262 -0
  510. package/dist/knowledge/references/saas.website.astro.head-renderer.md +271 -0
  511. package/dist/knowledge/references/saas.website.astro.headers-renderer.md +41 -0
  512. package/dist/knowledge/references/saas.website.astro.i18n-helper.md +121 -0
  513. package/dist/knowledge/references/saas.website.astro.label-key-collector.md +117 -0
  514. package/dist/knowledge/references/saas.website.astro.label-loader.md +377 -0
  515. package/dist/knowledge/references/saas.website.astro.llms-txt-server.md +46 -0
  516. package/dist/knowledge/references/saas.website.astro.pick-labels-for-page.md +90 -0
  517. package/dist/knowledge/references/saas.website.astro.robots-renderer.md +174 -0
  518. package/dist/knowledge/references/saas.website.astro.runtime-helper.md +187 -0
  519. package/dist/knowledge/references/saas.website.astro.site-context.md +141 -0
  520. package/dist/knowledge/references/saas.website.astro.sitemap-coverage.md +188 -0
  521. package/dist/knowledge/references/saas.website.astro.structured-data-renderer.md +174 -0
  522. package/dist/knowledge/references/saas.website.blog.bridge.md +396 -0
  523. package/dist/knowledge/references/saas.website.blog.collection-config.md +180 -0
  524. package/dist/knowledge/references/saas.website.blog.frontmatter.md +116 -0
  525. package/dist/knowledge/references/saas.website.blog.head-renderer.md +292 -0
  526. package/dist/knowledge/references/saas.website.blog.mdx-provider.md +100 -0
  527. package/dist/knowledge/references/saas.website.blog.post-renderer.md +291 -0
  528. package/dist/knowledge/references/saas.website.design-tokens.bundle.md +29 -0
  529. package/dist/knowledge/references/saas.website.design-tokens.colors.md +64 -0
  530. package/dist/knowledge/references/saas.website.design-tokens.radius.md +38 -0
  531. package/dist/knowledge/references/saas.website.factories.define-page-manifest.md +98 -0
  532. package/dist/knowledge/references/saas.website.factories.define-section.md +128 -0
  533. package/dist/knowledge/references/saas.website.label-keys.compose-helper.md +36 -0
  534. package/dist/knowledge/references/saas.website.label-keys.format.md +67 -0
  535. package/dist/knowledge/references/saas.website.label-pack.validator.md +206 -0
  536. package/dist/knowledge/references/saas.website.page-layout.component.md +217 -0
  537. package/dist/knowledge/references/saas.website.page-manifest.meta-label-keys.md +47 -0
  538. package/dist/knowledge/references/saas.website.page-manifest.route-path.md +49 -0
  539. package/dist/knowledge/references/saas.website.page-manifest.schema.md +186 -0
  540. package/dist/knowledge/references/saas.website.page-manifest.seo.md +46 -0
  541. package/dist/knowledge/references/saas.website.page.context.md +57 -0
  542. package/dist/knowledge/references/saas.website.primitives.button.md +123 -0
  543. package/dist/knowledge/references/saas.website.primitives.heading.md +103 -0
  544. package/dist/knowledge/references/saas.website.primitives.image.md +103 -0
  545. package/dist/knowledge/references/saas.website.primitives.internal-button.md +151 -0
  546. package/dist/knowledge/references/saas.website.primitives.internal-link.md +193 -0
  547. package/dist/knowledge/references/saas.website.primitives.link.md +78 -0
  548. package/dist/knowledge/references/saas.website.primitives.text.md +82 -0
  549. package/dist/knowledge/references/saas.website.refs.page.md +56 -0
  550. package/dist/knowledge/references/saas.website.refs.section.md +57 -0
  551. package/dist/knowledge/references/saas.website.root-config.navigation.md +37 -0
  552. package/dist/knowledge/references/saas.website.root-config.schema.md +192 -0
  553. package/dist/knowledge/references/saas.website.root-config.seo.md +98 -0
  554. package/dist/knowledge/references/saas.website.routing.localized-path.md +84 -0
  555. package/dist/knowledge/references/saas.website.runtime.context.md +174 -0
  556. package/dist/knowledge/references/saas.website.section.component.md +138 -0
  557. package/dist/knowledge/references/saas.website.section.context.md +63 -0
  558. package/dist/knowledge/references/saas.website.sections.category-enum.md +72 -0
  559. package/dist/knowledge/references/saas.website.sections.definition-schema.md +121 -0
  560. package/dist/knowledge/references/saas.website.seo.llms-txt-config.md +37 -0
  561. package/dist/knowledge/references/saas.website.seo.robots-config.md +106 -0
  562. package/dist/knowledge/references/saas.website.seo.sitemap-config.md +73 -0
  563. package/dist/knowledge/references/saas.website.structured-data.payload-shape.md +71 -0
  564. package/dist/knowledge/references/saas.website.use-label-by-key.hook.md +45 -0
  565. package/dist/knowledge/references/saas.website.use-label.hook.md +82 -0
  566. package/dist/knowledge/references/saas.website.use-page.hook.md +30 -0
  567. package/dist/knowledge/references/saas.website.use-runtime.hook.md +36 -0
  568. package/dist/knowledge/references/saas.website.use-section.hook.md +30 -0
  569. package/dist/knowledge/references/saas.website.use-tokens.hook.md +32 -0
  570. package/dist/knowledge/references/vision.authored-metadata.config.md +64 -0
  571. package/dist/knowledge/references/vision.constraint.config.md +66 -0
  572. package/dist/knowledge/references/vision.idea.config.md +45 -0
  573. package/dist/knowledge/references/vision.mission.config.md +46 -0
  574. package/dist/knowledge/references/vision.problem.config.md +51 -0
  575. package/dist/knowledge/references/vision.references.conventions.md +115 -0
  576. package/dist/knowledge/references/vision.snapshot.config.md +85 -0
  577. package/dist/knowledge/references/vision.snapshot.validation.md +226 -0
  578. package/dist/knowledge/references/vision.success-criterion.config.md +60 -0
  579. package/dist/knowledge/references/zod.decorators.chainable-runtime.md +550 -0
  580. package/dist/knowledge/references/zod.decorators.conditional-visibility.md +104 -0
  581. package/dist/knowledge/references/zod.decorators.data-categories.md +197 -0
  582. package/dist/knowledge/references/zod.decorators.decorator-vocabulary.md +436 -0
  583. package/dist/knowledge/references/zod.decorators.display-edit-modes.md +174 -0
  584. package/dist/knowledge/references/zod.decorators.enums.frontend-handling.md +101 -0
  585. package/dist/knowledge/references/zod.decorators.field-spec-params.md +317 -0
  586. package/dist/knowledge/references/zod.decorators.file-generation.md +36 -0
  587. package/dist/knowledge/references/zod.decorators.file-rag-source.md +56 -0
  588. package/dist/knowledge/references/zod.decorators.file-schema.md +319 -0
  589. package/dist/knowledge/references/zod.decorators.foreign-key-display-mode.md +83 -0
  590. package/dist/knowledge/references/zod.decorators.per-primitive-ui.md +459 -0
  591. package/dist/knowledge/references/zod.decorators.primitive-ui.md +123 -0
  592. package/dist/knowledge/references/zod.decorators.rag-source.md +164 -0
  593. package/dist/knowledge/references/zod.decorators.schema-metadata.md +122 -0
  594. package/dist/knowledge/references/zod.decorators.shared-structural-methods.md +152 -0
  595. package/dist/knowledge/references/zod.decorators.shared-structural-params.md +314 -0
  596. package/dist/knowledge/references/zod.decorators.structural-lifecycle-params.md +529 -0
  597. package/dist/knowledge/references/zod.factories.bigdecimal.md +155 -0
  598. package/dist/knowledge/references/zod.factories.code.md +127 -0
  599. package/dist/knowledge/references/zod.factories.duration.md +246 -0
  600. package/dist/knowledge/references/zod.factories.money.md +166 -0
  601. package/dist/knowledge/references/zod.factories.phone.md +88 -0
  602. package/dist/knowledge/references/zod.factories.range.md +174 -0
  603. package/dist/knowledge/registries/assurance-authority-bases.json +15 -0
  604. package/dist/knowledge/registries/framework-topics.json +5212 -0
  605. package/dist/knowledge/registries/playbooks.json +488 -0
  606. package/dist/knowledge/registries/source-tags.json +7664 -0
  607. package/dist/knowledge/rules/resource-schema-awareness.md +77 -0
  608. package/dist/knowledge/skills/INDEX.md +349 -0
  609. package/dist/knowledge/skills/application-consumer-documentation-authoring/SKILL.md +415 -0
  610. package/dist/knowledge/skills/application-consumer-documentation-authoring/examples/domain-use-case-and-admin-task.example.md +49 -0
  611. package/dist/knowledge/skills/application-consumer-documentation-authoring/references/source-and-ownership-routing.md +52 -0
  612. package/dist/knowledge/skills/application-database-migrations/SKILL.md +218 -0
  613. package/dist/knowledge/skills/application-database-migrations/references/framework-application-database-api.md +84 -0
  614. package/dist/knowledge/skills/application-database-migrations/references/framework-migration-change-risk-api.md +37 -0
  615. package/dist/knowledge/skills/application-database-migrations/references/migration-refusals.md +64 -0
  616. package/dist/knowledge/skills/application-database-migrations/references/postgresql-vs-mongodb-obligations.md +34 -0
  617. package/dist/knowledge/skills/authorization-unit-narrowing/SKILL.md +323 -0
  618. package/dist/knowledge/skills/authorization-unit-narrowing/references/framework-unit-narrowing-declaration-api.md +84 -0
  619. package/dist/knowledge/skills/backend-addon-wiring/SKILL.md +324 -0
  620. package/dist/knowledge/skills/backend-addon-wiring/references/backend-di-routing.md +7 -0
  621. package/dist/knowledge/skills/backend-addon-wiring/references/framework-backend-bootstrap-api.md +276 -0
  622. package/dist/knowledge/skills/backend-custom-operation/SKILL.md +374 -0
  623. package/dist/knowledge/skills/backend-custom-operation/references/framework-error-handling-api.md +118 -0
  624. package/dist/knowledge/skills/backend-custom-operation/references/framework-operation-base-and-path-api.md +107 -0
  625. package/dist/knowledge/skills/backend-custom-operation/references/framework-transactional-core-api.md +134 -0
  626. package/dist/knowledge/skills/backend-custom-operation/references/operation-file-conventions.md +10 -0
  627. package/dist/knowledge/skills/brand-logo-authoring/SKILL.md +192 -0
  628. package/dist/knowledge/skills/brand-logo-authoring/references/brand-authoring-decisions.md +55 -0
  629. package/dist/knowledge/skills/brand-logo-authoring/references/framework-brand-asset-api.md +184 -0
  630. package/dist/knowledge/skills/brand-logo-authoring/references/framework-brand-snapshot-api.md +279 -0
  631. package/dist/knowledge/skills/compliance-document-authoring/SKILL.md +346 -0
  632. package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-governance.md +160 -0
  633. package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-privacy-notice.md +518 -0
  634. package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-service-terms.md +158 -0
  635. package/dist/knowledge/skills/compliance-document-authoring/references/framework-application-document-fact-specification-contract.md +95 -0
  636. package/dist/knowledge/skills/compliance-document-authoring/references/framework-application-document-publication-contract.md +100 -0
  637. package/dist/knowledge/skills/compliance-document-authoring/references/framework-assurance-document-blueprint-contract.md +1210 -0
  638. package/dist/knowledge/skills/compliance-document-authoring/references/framework-governed-document-after-drafting.md +40 -0
  639. package/dist/knowledge/skills/config-app-shell/SKILL.md +698 -0
  640. package/dist/knowledge/skills/config-app-shell/references/app-shell-surfaces.md +5 -0
  641. package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-api.md +415 -0
  642. package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-hosted-components-api.md +170 -0
  643. package/dist/knowledge/skills/config-app-shell/references/framework-command-menu-omnibox-api.md +212 -0
  644. package/dist/knowledge/skills/config-app-shell/references/framework-quick-switcher-scope-field-api.md +178 -0
  645. package/dist/knowledge/skills/config-design-system/SKILL.md +424 -0
  646. package/dist/knowledge/skills/config-design-system/references/design-system-file.md +10 -0
  647. package/dist/knowledge/skills/config-design-system/references/framework-design-system-configuration-api.md +77 -0
  648. package/dist/knowledge/skills/config-design-system/references/framework-material-profile-api.md +200 -0
  649. package/dist/knowledge/skills/config-design-system/references/framework-material-runtime-policy-api.md +68 -0
  650. package/dist/knowledge/skills/config-design-system/references/framework-surface-policy-api.md +1212 -0
  651. package/dist/knowledge/skills/config-design-system/references/surface-policy-authoring.md +92 -0
  652. package/dist/knowledge/skills/config-navigation/SKILL.md +249 -0
  653. package/dist/knowledge/skills/config-navigation/references/framework-navigation-layout-api.md +152 -0
  654. package/dist/knowledge/skills/config-navigation/references/navigation-zones.md +5 -0
  655. package/dist/knowledge/skills/config-saas/SKILL.md +209 -0
  656. package/dist/knowledge/skills/config-saas/references/framework-provider-capabilities-api.md +221 -0
  657. package/dist/knowledge/skills/config-saas/references/framework-wildo-saas-config-api.md +408 -0
  658. package/dist/knowledge/skills/config-saas/references/saas-config-scope.md +9 -0
  659. package/dist/knowledge/skills/config-saas-backend/SKILL.md +183 -0
  660. package/dist/knowledge/skills/config-saas-backend/references/framework-backend-authored-config-api.md +40 -0
  661. package/dist/knowledge/skills/configure-billing/SKILL.md +261 -0
  662. package/dist/knowledge/skills/configure-billing/references/config-chain-and-failure-map.md +90 -0
  663. package/dist/knowledge/skills/configure-billing/references/example-backend-provider-module-shape.md +122 -0
  664. package/dist/knowledge/skills/configure-billing/references/example-provider-contribution-and-backend-config.md +48 -0
  665. package/dist/knowledge/skills/configure-billing/references/framework-backend-provider-reachability-api.md +69 -0
  666. package/dist/knowledge/skills/configure-billing/references/framework-billing-resolution-failure-api.md +57 -0
  667. package/dist/knowledge/skills/email-add-template/SKILL.md +439 -0
  668. package/dist/knowledge/skills/email-add-template/references/email-artifact-paths.md +9 -0
  669. package/dist/knowledge/skills/email-add-template/references/framework-email-template-api.md +72 -0
  670. package/dist/knowledge/skills/email-definition-wiring/SKILL.md +62 -0
  671. package/dist/knowledge/skills/email-labels-authoring/SKILL.md +64 -0
  672. package/dist/knowledge/skills/email-template-authoring/SKILL.md +62 -0
  673. package/dist/knowledge/skills/engine-component-registration/SKILL.md +257 -0
  674. package/dist/knowledge/skills/engine-component-registration/references/component-registration-file.md +7 -0
  675. package/dist/knowledge/skills/engine-component-registration/references/framework-component-registration-api.md +24 -0
  676. package/dist/knowledge/skills/engine-product-definitions/SKILL.md +429 -0
  677. package/dist/knowledge/skills/engine-product-definitions/references/framework-engine-product-definitions-api.md +287 -0
  678. package/dist/knowledge/skills/engine-product-definitions/references/product-registry-scope.md +5 -0
  679. package/dist/knowledge/skills/flows-actors-a2a-exposure/SKILL.md +491 -0
  680. package/dist/knowledge/skills/flows-actors-a2a-exposure/references/framework-flows-actors-a2a-contract.md +227 -0
  681. package/dist/knowledge/skills/flows-actors-a2a-exposure/references/framework-named-a2a-agents-contract.md +143 -0
  682. package/dist/knowledge/skills/flows-actors-chat-assistant/SKILL.md +368 -0
  683. package/dist/knowledge/skills/flows-actors-chat-assistant/examples/todo-assistant.example.md +226 -0
  684. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-flows-actors-tool-api.md +208 -0
  685. package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-flows-actors-view-api.md +286 -0
  686. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/SKILL.md +376 -0
  687. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-definition-api.md +262 -0
  688. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-invocation-api.md +130 -0
  689. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-prompt-spec-api.md +214 -0
  690. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-operation-and-model-api.md +195 -0
  691. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/operation-key-selection.md +60 -0
  692. package/dist/knowledge/skills/frontend-cdn-publish/SKILL.md +237 -0
  693. package/dist/knowledge/skills/frontend-cdn-publish/references/cloudflare-and-operator-setup.md +56 -0
  694. package/dist/knowledge/skills/frontend-cdn-publish/references/framework-cdn-config-api.md +176 -0
  695. package/dist/knowledge/skills/i18n-label-generation/SKILL.md +261 -0
  696. package/dist/knowledge/skills/i18n-label-generation/references/framework-labelling-sections-api.md +67 -0
  697. package/dist/knowledge/skills/i18n-label-generation/references/label-placement.md +7 -0
  698. package/dist/knowledge/skills/i18n-rerun-pipeline/SKILL.md +269 -0
  699. package/dist/knowledge/skills/i18n-rerun-pipeline/references/framework-labelling-sections-api.md +67 -0
  700. package/dist/knowledge/skills/i18n-rerun-pipeline/references/i18n-routing.md +9 -0
  701. package/dist/knowledge/skills/i18n-translation-rerun/SKILL.md +245 -0
  702. package/dist/knowledge/skills/i18n-translation-rerun/references/framework-labelling-sections-api.md +67 -0
  703. package/dist/knowledge/skills/i18n-translation-rerun/references/translation-workflow.md +17 -0
  704. package/dist/knowledge/skills/infra-environment-config/SKILL.md +646 -0
  705. package/dist/knowledge/skills/infra-environment-config/references/framework-application-database-api.md +77 -0
  706. package/dist/knowledge/skills/infra-environment-config/references/framework-backing-services-api.md +282 -0
  707. package/dist/knowledge/skills/infra-environment-config/references/framework-environment-deployment-api.md +265 -0
  708. package/dist/knowledge/skills/infra-environment-config/references/infra-config-files.md +7 -0
  709. package/dist/knowledge/skills/journey-approve/SKILL.md +43 -0
  710. package/dist/knowledge/skills/journey-bootstrap-scope/SKILL.md +42 -0
  711. package/dist/knowledge/skills/journey-next/SKILL.md +42 -0
  712. package/dist/knowledge/skills/journey-report/SKILL.md +43 -0
  713. package/dist/knowledge/skills/journey-run/SKILL.md +55 -0
  714. package/dist/knowledge/skills/journey-status/SKILL.md +50 -0
  715. package/dist/knowledge/skills/local-environment-bootstrap/SKILL.md +370 -0
  716. package/dist/knowledge/skills/local-environment-bootstrap/references/initialization-recovery-recipe.md +50 -0
  717. package/dist/knowledge/skills/local-environment-bootstrap/references/local-environment-troubleshooting.md +409 -0
  718. package/dist/knowledge/skills/local-environment-bootstrap/references/wildo-cli-bootstrap-commands.md +247 -0
  719. package/dist/knowledge/skills/market-add-feature-benefit/SKILL.md +474 -0
  720. package/dist/knowledge/skills/market-add-feature-benefit/references/framework-feature-benefit-api.md +139 -0
  721. package/dist/knowledge/skills/market-alternatives/SKILL.md +543 -0
  722. package/dist/knowledge/skills/market-authoring-overview/SKILL.md +354 -0
  723. package/dist/knowledge/skills/market-authoring-overview/references/framework-market-references-api.md +138 -0
  724. package/dist/knowledge/skills/market-authoring-overview/references/framework-market-snapshot-api.md +129 -0
  725. package/dist/knowledge/skills/market-category/SKILL.md +290 -0
  726. package/dist/knowledge/skills/market-channels/SKILL.md +361 -0
  727. package/dist/knowledge/skills/market-companion-prompt-enrichment/SKILL.md +2752 -0
  728. package/dist/knowledge/skills/market-companion-prompt-enrichment/references/framework-companion-behavior-api.md +2443 -0
  729. package/dist/knowledge/skills/market-generation-cli/SKILL.md +1484 -0
  730. package/dist/knowledge/skills/market-generation-cli/references/framework-market-generation-cli.md +1230 -0
  731. package/dist/knowledge/skills/market-icp/SKILL.md +625 -0
  732. package/dist/knowledge/skills/market-jobs-pains-gains/SKILL.md +352 -0
  733. package/dist/knowledge/skills/market-message-templates-authoring/SKILL.md +415 -0
  734. package/dist/knowledge/skills/market-message-templates-authoring/references/framework-message-template-api.md +1439 -0
  735. package/dist/knowledge/skills/market-persona/SKILL.md +407 -0
  736. package/dist/knowledge/skills/market-positioning-authoring/SKILL.md +392 -0
  737. package/dist/knowledge/skills/market-positioning-authoring/references/framework-positioning-api.md +97 -0
  738. package/dist/knowledge/skills/market-proof-and-objection/SKILL.md +665 -0
  739. package/dist/knowledge/skills/market-scoring-interpretation/SKILL.md +620 -0
  740. package/dist/knowledge/skills/market-scoring-interpretation/references/framework-scoring-api.md +291 -0
  741. package/dist/knowledge/skills/market-snapshot-validation/SKILL.md +1706 -0
  742. package/dist/knowledge/skills/market-snapshot-validation/references/framework-snapshot-validation-api.md +1228 -0
  743. package/dist/knowledge/skills/market-tone-of-voice/SKILL.md +260 -0
  744. package/dist/knowledge/skills/market-triggers-and-journey/SKILL.md +579 -0
  745. package/dist/knowledge/skills/module-companion-exports/SKILL.md +318 -0
  746. package/dist/knowledge/skills/module-companion-exports/references/companion-exports-by-package.md +544 -0
  747. package/dist/knowledge/skills/module-registration/SKILL.md +212 -0
  748. package/dist/knowledge/skills/module-registration/references/framework-domain-modules-api.md +366 -0
  749. package/dist/knowledge/skills/module-registration/references/registry-files.md +9 -0
  750. package/dist/knowledge/skills/module-relationships/SKILL.md +523 -0
  751. package/dist/knowledge/skills/module-relationships/references/cross-resource-fk-checklist.md +7 -0
  752. package/dist/knowledge/skills/module-relationships/references/framework-resource-relationship-authoring-api.md +738 -0
  753. package/dist/knowledge/skills/pdf-template-authoring/SKILL.md +174 -0
  754. package/dist/knowledge/skills/pdf-template-authoring/references/framework-pdf-template-api.md +203 -0
  755. package/dist/knowledge/skills/pdf-template-authoring/references/framework-pdf-template-spec-api.md +62 -0
  756. package/dist/knowledge/skills/provider-frontend-file-picker/SKILL.md +239 -0
  757. package/dist/knowledge/skills/provider-frontend-file-picker/references/framework-file-provider-constraints-api.md +90 -0
  758. package/dist/knowledge/skills/provider-frontend-file-picker/references/framework-frontend-provider-module-api.md +50 -0
  759. package/dist/knowledge/skills/rate-limit-authoring/SKILL.md +652 -0
  760. package/dist/knowledge/skills/rate-limit-authoring/references/framework-rate-limit-policy-api.md +182 -0
  761. package/dist/knowledge/skills/rate-limit-authoring/references/scope-key-and-bucket-conventions.md +137 -0
  762. package/dist/knowledge/skills/resource-add-field/SKILL.md +272 -0
  763. package/dist/knowledge/skills/resource-add-field/examples/add-priority-field-to-todos.example.md +153 -0
  764. package/dist/knowledge/skills/resource-add-field/references/framework-field-cross-layer-api.md +845 -0
  765. package/dist/knowledge/skills/resource-add-module/SKILL.md +322 -0
  766. package/dist/knowledge/skills/resource-add-module/references/framework-new-module-wiring-api.md +67 -0
  767. package/dist/knowledge/skills/resource-add-module/references/module-scaffold-layout.md +15 -0
  768. package/dist/knowledge/skills/resource-add-resource/SKILL.md +222 -0
  769. package/dist/knowledge/skills/resource-add-resource/references/framework-new-resource-core-config-api.md +540 -0
  770. package/dist/knowledge/skills/resource-add-resource/references/scaffold-surfaces-checklist.md +25 -0
  771. package/dist/knowledge/skills/resource-config-wiring/SKILL.md +370 -0
  772. package/dist/knowledge/skills/resource-config-wiring/references/config-change-routing.md +11 -0
  773. package/dist/knowledge/skills/resource-config-wiring/references/framework-personal-data-declaration-api.md +622 -0
  774. package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-operation-scope-enums-api.md +248 -0
  775. package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-resource-config-api.md +1769 -0
  776. package/dist/knowledge/skills/resource-config-wiring/references/framework-system-access-reads-api.md +1209 -0
  777. package/dist/knowledge/skills/resource-custom-view/SKILL.md +228 -0
  778. package/dist/knowledge/skills/resource-custom-view/references/custom-view-contracts.md +693 -0
  779. package/dist/knowledge/skills/resource-external-data/SKILL.md +349 -0
  780. package/dist/knowledge/skills/resource-external-data/references/framework-external-data-pipeline-api.md +187 -0
  781. package/dist/knowledge/skills/resource-external-data/references/framework-http-api-binding-api.md +261 -0
  782. package/dist/knowledge/skills/resource-external-data/references/lane-selection.md +49 -0
  783. package/dist/knowledge/skills/resource-external-data/references/pipeline-destination-schema.md +43 -0
  784. package/dist/knowledge/skills/resource-mcp-tool-exposure/SKILL.md +308 -0
  785. package/dist/knowledge/skills/resource-mcp-tool-exposure/references/framework-named-mcp-servers-contract.md +166 -0
  786. package/dist/knowledge/skills/resource-mcp-tool-exposure/references/framework-resource-mcp-exposure-contract.md +63 -0
  787. package/dist/knowledge/skills/resource-mcp-tool-exposure/references/mcp-catalogue-withdrawal-and-verification.md +77 -0
  788. package/dist/knowledge/skills/resource-mcp-tool-exposure/references/mcp-client-registration-postures.md +90 -0
  789. package/dist/knowledge/skills/resource-rag-source-fields/SKILL.md +424 -0
  790. package/dist/knowledge/skills/resource-rag-source-fields/references/corpus-field-selection.md +90 -0
  791. package/dist/knowledge/skills/resource-rag-source-fields/references/framework-embeddings-capability-api.md +261 -0
  792. package/dist/knowledge/skills/resource-rag-source-fields/references/framework-file-rag-source-api.md +117 -0
  793. package/dist/knowledge/skills/resource-rag-source-fields/references/framework-rag-retrieval-api.md +597 -0
  794. package/dist/knowledge/skills/resource-rag-source-fields/references/framework-rag-source-decorator-api.md +181 -0
  795. package/dist/knowledge/skills/resource-schema-authoring/SKILL.md +318 -0
  796. package/dist/knowledge/skills/resource-schema-authoring/examples/add-enum-field-with-ui.example.md +132 -0
  797. package/dist/knowledge/skills/resource-schema-authoring/examples/basic-resource-schema.example.md +62 -0
  798. package/dist/knowledge/skills/resource-schema-authoring/references/decorator-layer-map.md +63 -0
  799. package/dist/knowledge/skills/resource-schema-authoring/references/field-type-selection.md +70 -0
  800. package/dist/knowledge/skills/resource-schema-authoring/references/framework-decorator-vocabulary-api.md +559 -0
  801. package/dist/knowledge/skills/resource-schema-authoring/references/framework-personal-data-category-api.md +245 -0
  802. package/dist/knowledge/skills/resource-schema-authoring/references/framework-polymorphic-resources-api.md +147 -0
  803. package/dist/knowledge/skills/resource-schema-authoring/references/framework-schema-family-api.md +247 -0
  804. package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-decorator-methods-api.md +164 -0
  805. package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-structural-params-api.md +327 -0
  806. package/dist/knowledge/skills/resource-schema-authoring/references/framework-special-factories-api.md +1286 -0
  807. package/dist/knowledge/skills/resource-schema-authoring/references/framework-zod-lifecycle-and-chainable-api.md +1080 -0
  808. package/dist/knowledge/skills/resource-schema-authoring/references/polymorphic-per-scope-resources.md +75 -0
  809. package/dist/knowledge/skills/resource-schema-authoring/references/schema-variants-and-discriminators.md +62 -0
  810. package/dist/knowledge/skills/resource-schema-authoring/references/shared-layer-decorator-checklist.md +69 -0
  811. package/dist/knowledge/skills/resource-schema-authoring/references/special-factories.md +45 -0
  812. package/dist/knowledge/skills/resource-ui-behavior/SKILL.md +389 -0
  813. package/dist/knowledge/skills/resource-ui-behavior/references/framework-conditional-visibility-api.md +106 -0
  814. package/dist/knowledge/skills/resource-ui-behavior/references/framework-display-edit-modes-api.md +176 -0
  815. package/dist/knowledge/skills/resource-ui-behavior/references/framework-enum-frontend-handling-api.md +103 -0
  816. package/dist/knowledge/skills/resource-ui-behavior/references/framework-foreign-key-ui-api.md +97 -0
  817. package/dist/knowledge/skills/resource-ui-behavior/references/framework-frontend-resource-ui-contracts-api.md +839 -0
  818. package/dist/knowledge/skills/resource-ui-behavior/references/framework-per-primitive-ui-api.md +461 -0
  819. package/dist/knowledge/skills/resource-ui-behavior/references/framework-primitive-ui-api.md +125 -0
  820. package/dist/knowledge/skills/resource-ui-behavior/references/framework-related-resource-embeds-api.md +245 -0
  821. package/dist/knowledge/skills/resource-ui-behavior/references/framework-resource-layout-templates-api.md +302 -0
  822. package/dist/knowledge/skills/resource-ui-behavior/references/ui-layer-boundaries.md +13 -0
  823. package/dist/knowledge/skills/seeding-authoring/SKILL.md +569 -0
  824. package/dist/knowledge/skills/seeding-authoring/references/data-seeding-mode-picker.md +154 -0
  825. package/dist/knowledge/skills/seeding-authoring/references/framework-data-seeding-api.md +176 -0
  826. package/dist/knowledge/skills/seeding-operations/SKILL.md +505 -0
  827. package/dist/knowledge/skills/seeding-operations/references/data-seeding-admin-runbook.md +337 -0
  828. package/dist/knowledge/skills/seeding-operations/references/data-seeding-cron-scheduler.md +171 -0
  829. package/dist/knowledge/skills/seeding-operations/references/framework-data-seeding-operations-api.md +662 -0
  830. package/dist/knowledge/skills/settings-placement-authoring/SKILL.md +134 -0
  831. package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-destinations-catalog.md +65 -0
  832. package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-placement-api.md +127 -0
  833. package/dist/knowledge/skills/spec-catalog-authoring/SKILL.md +726 -0
  834. package/dist/knowledge/skills/spec-catalog-authoring/references/catalog-spec-pattern-overview.md +242 -0
  835. package/dist/knowledge/skills/spec-companion-exports/SKILL.md +362 -0
  836. package/dist/knowledge/skills/spec-companion-exports/references/companion-export-checklist.md +8 -0
  837. package/dist/knowledge/skills/spec-companion-exports/references/framework-companion-exports-contract-api.md +533 -0
  838. package/dist/knowledge/skills/spec-component-update/SKILL.md +315 -0
  839. package/dist/knowledge/skills/spec-component-update/references/component-spec-props.md +8 -0
  840. package/dist/knowledge/skills/spec-component-update/references/framework-frontend-component-spec-api.md +481 -0
  841. package/dist/knowledge/skills/spec-composite-view-update/SKILL.md +283 -0
  842. package/dist/knowledge/skills/spec-composite-view-update/references/composite-spec-sections.md +5 -0
  843. package/dist/knowledge/skills/spec-composite-view-update/references/framework-composite-view-specification-api.md +51 -0
  844. package/dist/knowledge/skills/spec-family-update/SKILL.md +300 -0
  845. package/dist/knowledge/skills/spec-family-update/references/family-spec-routing.md +13 -0
  846. package/dist/knowledge/skills/spec-family-update/references/framework-error-message-specifications-api.md +108 -0
  847. package/dist/knowledge/skills/spec-family-update/references/framework-family-specifications-api.md +111 -0
  848. package/dist/knowledge/skills/spec-feature-update/SKILL.md +306 -0
  849. package/dist/knowledge/skills/spec-feature-update/references/feature-spec-scope.md +5 -0
  850. package/dist/knowledge/skills/spec-feature-update/references/framework-feature-specification-api.md +95 -0
  851. package/dist/knowledge/skills/spec-resource-update/SKILL.md +220 -0
  852. package/dist/knowledge/skills/spec-resource-update/references/framework-field-spec-params-api.md +319 -0
  853. package/dist/knowledge/skills/spec-resource-update/references/framework-spec-resource-contracts-api.md +2610 -0
  854. package/dist/knowledge/skills/spec-resource-update/references/resource-spec-field-routing.md +12 -0
  855. package/dist/knowledge/skills/spec-update-after-change/SKILL.md +195 -0
  856. package/dist/knowledge/skills/spec-update-after-change/references/framework-spec-factory-api.md +173 -0
  857. package/dist/knowledge/skills/spec-update-after-change/references/spec-maintenance-by-surface.md +33 -0
  858. package/dist/knowledge/skills/spec-update-after-change/references/surface-to-spec-routing.md +14 -0
  859. package/dist/knowledge/skills/views-add-composite-view/SKILL.md +259 -0
  860. package/dist/knowledge/skills/views-add-composite-view/references/composite-view-routing.md +10 -0
  861. package/dist/knowledge/skills/views-add-composite-view/references/framework-inserted-view-identity-api.md +151 -0
  862. package/dist/knowledge/skills/views-add-custom-view/SKILL.md +225 -0
  863. package/dist/knowledge/skills/views-add-custom-view/references/custom-view-routing.md +10 -0
  864. package/dist/knowledge/skills/views-add-custom-view/references/framework-view-scope-and-full-custom-api.md +107 -0
  865. package/dist/knowledge/skills/views-app-level/SKILL.md +201 -0
  866. package/dist/knowledge/skills/views-app-level/references/app-level-views-routing.md +9 -0
  867. package/dist/knowledge/skills/views-app-level/references/framework-view-scope-and-full-custom-api.md +107 -0
  868. package/dist/knowledge/skills/views-chart-authoring/SKILL.md +264 -0
  869. package/dist/knowledge/skills/views-chart-authoring/references/chart-view-checklist.md +7 -0
  870. package/dist/knowledge/skills/views-chart-authoring/references/framework-chart-view-contracts-api.md +82 -0
  871. package/dist/knowledge/skills/views-chart-authoring/references/framework-inserted-view-identity-api.md +152 -0
  872. package/dist/knowledge/skills/views-composite-authoring/SKILL.md +302 -0
  873. package/dist/knowledge/skills/views-composite-authoring/references/composite-embedding-checklist.md +23 -0
  874. package/dist/knowledge/skills/views-composite-authoring/references/framework-composite-view-contracts-api.md +133 -0
  875. package/dist/knowledge/skills/views-composite-authoring/references/framework-inserted-view-identity-api.md +152 -0
  876. package/dist/knowledge/skills/views-execution-authoring/SKILL.md +209 -0
  877. package/dist/knowledge/skills/views-execution-authoring/references/execution-view-checklist.md +7 -0
  878. package/dist/knowledge/skills/views-execution-authoring/references/framework-execution-view-contracts-api.md +389 -0
  879. package/dist/knowledge/skills/views-execution-authoring/references/framework-inserted-view-identity-api.md +152 -0
  880. package/dist/knowledge/skills/website-anonymous-session/SKILL.md +444 -0
  881. package/dist/knowledge/skills/website-blog-authoring/SKILL.md +587 -0
  882. package/dist/knowledge/skills/website-blog-authoring/references/blog-adapter-api.md +1426 -0
  883. package/dist/knowledge/skills/website-bundle-discipline/SKILL.md +553 -0
  884. package/dist/knowledge/skills/website-bundle-discipline/references/example-website-button-override.md +52 -0
  885. package/dist/knowledge/skills/website-bundle-discipline/references/website-bundle-rules.md +357 -0
  886. package/dist/knowledge/skills/website-consent-gate-overrides/SKILL.md +511 -0
  887. package/dist/knowledge/skills/website-factory-advanced/SKILL.md +376 -0
  888. package/dist/knowledge/skills/website-inbound-contact-forms/SKILL.md +304 -0
  889. package/dist/knowledge/skills/website-label-pack/SKILL.md +390 -0
  890. package/dist/knowledge/skills/website-layout-overrides/SKILL.md +461 -0
  891. package/dist/knowledge/skills/website-marketing-metadata-extension/SKILL.md +264 -0
  892. package/dist/knowledge/skills/website-navigation-authoring/SKILL.md +414 -0
  893. package/dist/knowledge/skills/website-navigation-authoring/references/worked-examples-header-footer.md +366 -0
  894. package/dist/knowledge/skills/website-page-authoring/SKILL.md +420 -0
  895. package/dist/knowledge/skills/website-page-variants/SKILL.md +256 -0
  896. package/dist/knowledge/skills/website-primitive-overrides/SKILL.md +302 -0
  897. package/dist/knowledge/skills/website-section-contact/SKILL.md +950 -0
  898. package/dist/knowledge/skills/website-section-contact/references/define-website-section-api.md +579 -0
  899. package/dist/knowledge/skills/website-section-cta/SKILL.md +822 -0
  900. package/dist/knowledge/skills/website-section-cta/references/define-website-section-api.md +579 -0
  901. package/dist/knowledge/skills/website-section-faq/SKILL.md +917 -0
  902. package/dist/knowledge/skills/website-section-faq/references/define-website-section-api.md +579 -0
  903. package/dist/knowledge/skills/website-section-feature-benefit-summary/SKILL.md +878 -0
  904. package/dist/knowledge/skills/website-section-feature-benefit-summary/references/define-website-section-api.md +579 -0
  905. package/dist/knowledge/skills/website-section-feature-detail/SKILL.md +895 -0
  906. package/dist/knowledge/skills/website-section-feature-detail/references/define-website-section-api.md +579 -0
  907. package/dist/knowledge/skills/website-section-footer-cta/SKILL.md +814 -0
  908. package/dist/knowledge/skills/website-section-footer-cta/references/define-website-section-api.md +579 -0
  909. package/dist/knowledge/skills/website-section-hero/SKILL.md +944 -0
  910. package/dist/knowledge/skills/website-section-hero/references/define-website-section-api.md +583 -0
  911. package/dist/knowledge/skills/website-section-pricing/SKILL.md +934 -0
  912. package/dist/knowledge/skills/website-section-pricing/references/define-website-section-api.md +579 -0
  913. package/dist/knowledge/skills/website-section-social-proof/SKILL.md +912 -0
  914. package/dist/knowledge/skills/website-section-social-proof/references/define-website-section-api.md +579 -0
  915. package/dist/knowledge/skills/website-seo-aeo-geo/SKILL.md +624 -0
  916. package/dist/knowledge/skills/website-seo-aeo-geo/references/aeo-api.md +633 -0
  917. package/dist/knowledge/skills/website-seo-aeo-geo/references/geo-api.md +193 -0
  918. package/dist/knowledge/skills/website-seo-aeo-geo/references/seo-api.md +790 -0
  919. package/dist/knowledge/topic-index.json +17510 -0
  920. package/dist/tsconfig.build.tsbuildinfo +1 -0
  921. package/dist/tsconfig.tsbuildinfo +1 -0
  922. package/package.json +49 -0
@@ -0,0 +1,1080 @@
1
+ # Zod — lifecycle params & chainable runtime (source)
2
+
3
+ - **`structural-lifecycle-params`** — shared structural params for field lifecycle (create/update/read visibility, exclusions, etc.) in `zod-decorators.types`.
4
+ - **`chainable-runtime`** — chainable decorator runtime surface in `zod.module-override` used after `initZodDecorators(z)`.
5
+
6
+ ## Import Origins
7
+
8
+ - `@wildo-ai/zod-decorators`
9
+
10
+ ## Source Excerpts
11
+
12
+ ### Origin Package: `@wildo-ai/zod-decorators`
13
+
14
+ ```typescript
15
+ *
16
+ * Structural and lifecycle decorator parameter types for shared resource
17
+ * schemas.
18
+ *
19
+ * These shapes belong to the shared schema layer:
20
+ * `shared-lib/src/modules/<module>/resources/<resource>/<resource>.schemas.ts`.
21
+ *
22
+ * They describe field behavior that affects persistence, DTO derivation,
23
+ * security boundaries, discriminated variants, validation lifecycle, and other
24
+ * cross-layer mechanics. They are appropriate in the shared Zod schema because
25
+ * backend and frontend consumers both depend on the resulting metadata.
26
+ *
27
+ * Do NOT place per-field UI rendering configuration here. UI decorators such as
28
+ * `.stringUI()` / `.enumUI()` belong in frontend `*.ui-behavior.tsx` files.
29
+ * Do NOT place business-semantics prose here. `{primitive}Spec()` decorators
30
+ * belong in specification overlays.
31
+ *
32
+ * When framework knowledge is generated, this anchored block is intended to be
33
+ * inserted as the deterministic source-of-truth reference for structural
34
+ * decorator parameters instead of maintaining parallel markdown tables.
35
+ */
36
+ // Parameters for the IS_HIDDEN decorator. Controls field visibility based on context.
37
+ export interface HiddenFieldParams {
38
+ display?: boolean; // Hide in display/read mode
39
+ edit?: boolean; // Hide in edit/form mode
40
+ operations?: string[]; // Hide for specific operations (e.g., 'create', 'update')
41
+ }
42
+
43
+ // Parameters for the IS_NOT_EDITABLE decorator. Controls when a field is read-only in forms.
44
+ export interface NotEditableFieldParams {
45
+ operations?: string[]; // Make not editable only for specific operations (e.g., 'update'). If not provided, applies to all operations.
46
+ }
47
+
48
+ // HiddenFieldParams, NotEditableFieldParams
49
+ // are imported from @wildo-ai/presets-components-models
50
+
51
+ /**
52
+ * Inline edit mode options
53
+ */
54
+ export const InlineEditMode = {
55
+ DIRECT: 'direct',
56
+ BUTTON: 'button',
57
+ } as const;
58
+ export type InlineEditMode = typeof InlineEditMode[keyof typeof InlineEditMode];
59
+
60
+ /**
61
+ * P10: When to trigger save in inline editing mode
62
+ */
63
+ export const InlineEditSaveOn = {
64
+ /** Save on blur (when user clicks away) */
65
+ BLUR: 'blur',
66
+ /** Save only on explicit button click */
67
+ EXPLICIT: 'explicit',
68
+ } as const;
69
+ export type InlineEditSaveOn = typeof InlineEditSaveOn[keyof typeof InlineEditSaveOn];
70
+
71
+ //------------------------------------------------------------------------------------------------
72
+ // BACKEND-ONLY FIELD PARAMS
73
+ //------------------------------------------------------------------------------------------------
74
+
75
+ /**
76
+ *
77
+ * Parameters for the isBackendOnly decorator.
78
+ * Marks fields that should only exist on the backend and be stripped from API responses.
79
+ */
80
+ export interface BackendOnlyFieldParams {
81
+ /**
82
+ * If true, the field will be included in the response for CREATE operations only,
83
+ * then stripped from all subsequent READ operations.
84
+ * Useful for secrets, API keys, etc. that should only be returned once.
85
+ *
86
+ * This is also the framework's ONLY disclosure-audit trigger: a field that carries it emits one
87
+ * `FIELD_ACCESS` audit event at the moment it is first (and last) exposed. That pairing is not a
88
+ * coincidence — first exposure is the only point at which a backend-only field crosses the client
89
+ * boundary at all, so it is the only point at which "this value left the system" is a true claim.
90
+ *
91
+ * Scope limit worth knowing before relying on it: the audit event is raised from the TOP-LEVEL
92
+ * shape of the response DTO. A single `CREATE` is the reliably covered case; do not assume a
93
+ * bulk-create response gives you the same guarantee without checking.
94
+ *
95
+ * assurance-control: WILDO.SECRETS.DISCLOSURE_AUDIT — first disclosure of server-minted secret
96
+ * material is attributable.
97
+ */
98
+ isReturnedAtCreation?: boolean;
99
+ }
100
+
101
+ /**
102
+ * Parameters for the isWriteOnlySecret decorator.
103
+ * Marks a user-provided secret that stays in CREATE/UPDATE request DTOs
104
+ * (client-writable) but is masked to a placeholder on every client-facing
105
+ * response DTO; the real value is retained for backend internal reads.
106
+ * Read-side masking and the write-back sentinel are enforced by the framework
107
+ * at the client-serialization boundary — no per-resource custom implementation
108
+ * needed.
109
+ *
110
+ * Pick the right secret posture by **who owns the value and which direction it
111
+ * flows** — the three are mutually exclusive on a field:
112
+ * - `.isWriteOnlySecret()` — the CLIENT supplies the secret and the server keeps
113
+ * it (e.g. a webhook signing key, an SSO client secret). Client-writable,
114
+ * masked on read, real value kept for backend use. Re-submitting the mask is
115
+ * a no-op (the stored value is preserved).
116
+ * - `.isEphemeral()` — the SERVER mints the secret and hands it to the client
117
+ * exactly once at creation (e.g. an API key shown in a one-time reveal). Not
118
+ * client-writable, not re-readable afterwards. A composite decorator (secret
119
+ * display + one-time reveal + not-editable).
120
+ * - `.isBackendOnly()` — the field never crosses the client boundary in EITHER
121
+ * direction. Do NOT use it for a client-provided secret: it strips the field
122
+ * from the write DTOs too, so the client could never set the value.
123
+ */
124
+ export interface WriteOnlySecretFieldParams {
125
+ /**
126
+ * Intentionally empty.
127
+ *
128
+ * A write-only secret is masked on EVERY client-facing response, so there is no disclosure to
129
+ * audit — the real value never crosses the boundary. The parameter bag is kept so the decorator
130
+ * can gain options later without changing its call shape.
131
+ */
132
+ readonly _reserved?: never;
133
+ }
134
+
135
+ //------------------------------------------------------------------------------------------------
136
+ // IMPERSONALIZATION SCRUB PARAMS
137
+ //------------------------------------------------------------------------------------------------
138
+
139
+ /**
140
+ * Stored metadata for the impersonalization scrub treatment (`.impersonalizeWith()` /
141
+ * `addImpersonalizeWith()`).
142
+ *
143
+ * This metadata deliberately stays outside the `shared-structural-params` subsection, mirroring
144
+ * the decorator method itself. Impersonalization has distinct lifecycle and retention semantics,
145
+ * so it needs dedicated application-facing guidance when the installed runtime exposes it.
146
+ */
147
+ export interface ImpersonalizeFieldParams {
148
+ /**
149
+ * The scrub treatment — a `RedactionType` value carried as an opaque string (zod-decorators sits
150
+ * below saas-models and cannot reference the enum type). REQUIRED and non-empty: a field either
151
+ * declares how it is scrubbed, or carries no treatment at all.
152
+ */
153
+ treatment: string;
154
+ /**
155
+ * `MASK` only — the literal value written in place of this field, overriding the framework's
156
+ * default mask constant.
157
+ *
158
+ * **Why this exists.** The default mask is an UNCONSTRAINED string, so it cannot be written into
159
+ * exactly the fields most likely to need masking: a CONSTRAINED string — `z.email()`, `z.uuid()`,
160
+ * `.min(n)` — rejects it and the boot guard fails the config. Without an override, such a field
161
+ * can only be erased by widening it to `.nullish()` for a `REMOVE` scrub. For a unique identity
162
+ * anchor (`User.email` is the motivating case) that trades a permanently weaker type on every
163
+ * consumer for a state only the audited see-through reader can ever observe, since a retained row
164
+ * is hidden from every normal read. The override keeps the authored type intact.
165
+ *
166
+ * **Contract.** The value must satisfy the field's OWN schema — the boot guard `safeParse`s it
167
+ * against that schema and fails loud otherwise. It is STATIC: the same value is written to every
168
+ * row of a scrub batch (the scrub is one `$set`), so choose something meaningless as data and
169
+ * safe to collide on. For an email, an RFC 2606 reserved `.invalid` address is the honest choice —
170
+ * that TLD can never be registered or delivered to.
171
+ *
172
+ * **Collision is not a concern**, even on a `.isUnique()` field: every unique index on a
173
+ * retention-governed resource is scoped to NON-RETAINED rows, and the scrub flips the row to
174
+ * `RETAINED` in the same write, so scrubbed rows leave the index.
175
+ *
176
+ * Declaring it alongside a non-`MASK` treatment is a config error — nothing would ever write it.
177
+ * That check lives in the saas-models boot guard, which is the layer that knows `RedactionType`.
178
+ */
179
+ maskValue?: string;
180
+ }
181
+
182
+ //------------------------------------------------------------------------------------------------
183
+ // VIRTUAL FIELD PARAMS
184
+ //------------------------------------------------------------------------------------------------
185
+
186
+ /**
187
+ * Parameters passed to virtual field calculation functions.
188
+ * The `utils` is typed as `any` in shared-lib but will be properly typed at runtime in backend-lib.
189
+ */
190
+ export interface VirtualFieldCalculationParams<TObject = any, TContext = any, TUserContext = any> {
191
+ /** The current resource object */
192
+ currentObject: TObject;
193
+ /** The resource context (parent/child relationships) - only if needsObjectContext is true */
194
+ objectContext?: TContext;
195
+ /** The user context - only if needsUserContext is true */
196
+ userContext?: TUserContext;
197
+ /** The execution context containing user, organization, etc. */
198
+ executionContext: any;
199
+ /**
200
+ * Utility services for calculations.
201
+ * Typed as `any` in shared-lib, but at runtime provides:
202
+ * - repositories: RepositoryRegistry
203
+ * - logger: LoggerService
204
+ * - errorBuilder: ErrorBuilderBackendService
205
+ * - dateService: DateService
206
+ * - getService: <T>(symbol: symbol) => T
207
+ */
208
+ utils: any;
209
+ }
210
+
211
+ /**
212
+ * Parameters for the isVirtual decorator.
213
+ * Virtual fields are computed at runtime and not stored in the database.
214
+ */
215
+ export interface VirtualFieldParams<TObject = any, TResult = any> {
216
+ /**
217
+ * The calculation function that computes this virtual field's value.
218
+ * Called at runtime by VirtualFieldsBackendService with injected utilities.
219
+ */
220
+ calculate: (params: VirtualFieldCalculationParams<TObject>) => TResult | Promise<TResult>;
221
+
222
+ /**
223
+ * If true, the objectContext (parent/child relationships) will be passed to calculate().
224
+ * Setting this to true has a performance cost as it requires fetching related resources.
225
+ */
226
+ needsObjectContext?: boolean;
227
+
228
+ /**
229
+ * If true, the userContext will be passed to calculate().
230
+ * Setting this to true requires additional context resolution.
231
+ */
232
+ needsUserContext?: boolean;
233
+
234
+ /**
235
+ * Optional list of field names this virtual field depends on.
236
+ * Used for documentation and potential future optimizations.
237
+ */
238
+ dependencies?: string[];
239
+ }
240
+
241
+ //------------------------------------------------------------------------------------------------
242
+ // DISCRIMINATOR FIELD PARAMS
243
+ //------------------------------------------------------------------------------------------------
244
+
245
+ /**
246
+ *
247
+ * Parameters for the isDiscriminator decorator.
248
+ * Marks a field as the discriminator for a discriminated union schema.
249
+ */
250
+ export interface DiscriminatorFieldParams {
251
+ /**
252
+ * Values for which the base schema is used (no extended variant).
253
+ * If not provided, auto-detected from enum values not covered by variants.
254
+ */
255
+ baseValues?: string[];
256
+ }
257
+
258
+ //------------------------------------------------------------------------------------------------
259
+ // UNIQUE FIELD PARAMS
260
+ //------------------------------------------------------------------------------------------------
261
+
262
+ /**
263
+ *
264
+ * Scope for unique constraint enforcement.
265
+ * - 'global': Unique across the entire collection (default)
266
+ * - 'organization': Unique within an organization (compound index with organizationId)
267
+ * - 'user': Unique per user (compound index with createdByUserId)
268
+ */
269
+ export const UniqueScope = {
270
+ GLOBAL: 'global',
271
+ ORGANIZATION: 'organization',
272
+ USER: 'user',
273
+ } as const;
274
+ export type UniqueScope = typeof UniqueScope[keyof typeof UniqueScope];
275
+
276
+ /**
277
+ * Parameters for the isUnique decorator.
278
+ * Marks a field as unique in the database with unique index.
279
+ * MongoDB will enforce uniqueness and throw E11000 duplicate key error on violations.
280
+ */
281
+ export interface UniqueFieldParams {
282
+ /**
283
+ * Scope for uniqueness constraint.
284
+ * - 'global': Unique across the entire collection (default)
285
+ * - 'organization': Unique per organization (compound index with organizationId)
286
+ * - 'user': Unique per user (compound index with createdByUserId)
287
+ */
288
+ scope?: UniqueScope;
289
+
290
+ /**
291
+ * Create a compound unique index with another field in the same schema.
292
+ * The referenced field name is resolved against the actual schema fields,
293
+ * handling polymorphic field renames automatically.
294
+ *
295
+ * @example poolKey: z.string().isUnique({ compoundWith: 'billingAccountId' })
296
+ * // Creates compound unique index: { billingAccountId: 1, poolKey: 1 }
297
+ * // For polymorphic variants, resolves e.g. to: { organizationBillingAccountId: 1, poolKey: 1 }
298
+ */
299
+ compoundWith?: string;
300
+
301
+ /**
302
+ * Whether to allow null values without triggering uniqueness.
303
+ * MongoDB unique indexes exclude null by default when sparse is true.
304
+ * @default true
305
+ */
306
+ sparse?: boolean;
307
+
308
+ /**
309
+ * Custom error message to show when uniqueness is violated.
310
+ * Supports placeholder {fieldName} which is replaced with the actual field name.
311
+ * @example "This {fieldName} is already taken"
312
+ */
313
+ errorMessage?: string;
314
+
315
+ /**
316
+ * The custom message reference the API returns when THIS field's unique index is violated.
317
+ *
318
+ * Without it, every duplicate-key rejection collapses to one generic conflict code, so an
319
+ * integrator cannot tell "that slug is taken" from "that invoice number is taken" without
320
+ * parsing a message. Naming the reference here — next to the constraint that produces it —
321
+ * keeps one authority: the key and the error it raises cannot drift apart.
322
+ *
323
+ * Pass a member of the framework's error-reference vocabulary, never a bare literal.
324
+ *
325
+ * @example slug: z.string().isUnique({ conflictMessageReference: ErrorCustomMessageReference.ORGANIZATION_SLUG_EXISTS })
326
+ */
327
+ conflictMessageReference?: string;
328
+ }
329
+
330
+ /**
331
+ * Parameters for the object-level `businessKeySet([...])` decorator.
332
+ *
333
+ * Declares a **composite business key**: the ordered list of `fields` is the stable identity of a
334
+ * row, used both by seeding upsert / upgrade / sync passes to find an existing row independently
335
+ * from its random `_id`, and by the storage adapter to materialize a compound UNIQUE index so the
336
+ * identity is enforced by the database rather than by a race-prone read-then-write.
337
+ *
338
+ * - `fields` must be non-empty and every entry must be a key declared on the
339
+ * underlying `ZodObject` shape (validated at decoration time).
340
+ * - This decorator is **mutually exclusive** with field-level `isBusinessKey()`
341
+ * on the same schema — pick one identity model.
342
+ *
343
+ * @example
344
+ * // "one membership per user per organization"
345
+ * z.object({ userId: z.string(), organizationId: z.string(), roles: z.array(z.string()) })
346
+ * .businessKeySet(['userId', 'organizationId'])
347
+ */
348
+ export interface BusinessKeySetParams {
349
+ fields: string[];
350
+
351
+ /**
352
+ * Fields whose ABSENCE takes a row out of the uniqueness constraint entirely.
353
+ *
354
+ * By default a missing member counts as a real value, so two rows that both omit it COLLIDE.
355
+ * That is the correct default for an identity whose members are always meaningful — two rows
356
+ * that are "unscoped" in the same way really are the same row.
357
+ *
358
+ * It is wrong when a member is optional in the domain sense: "unit code, unique among siblings"
359
+ * must still allow any number of siblings that carry NO code. Listing that field here scopes the
360
+ * constraint to the rows that actually have it.
361
+ *
362
+ * Every entry must also appear in `fields`. List only the members whose absence means "this row
363
+ * has no key", never merely "this member happens to be optional" — a field left out of the list
364
+ * keeps the default null-collides behaviour, which is what most composite keys want.
365
+ *
366
+ * @example
367
+ * // many code-less siblings are fine; two siblings sharing a code are not
368
+ * .businessKeySet(['organizationId', 'parentUnitId', 'code'], { skipRowsMissing: ['code'] })
369
+ */
370
+ skipRowsMissing?: string[];
371
+
372
+ /**
373
+ * The custom message reference the API returns when THIS key's unique index is violated.
374
+ *
375
+ * Without it, every duplicate-key rejection collapses to one generic conflict code, so an
376
+ * integrator cannot tell which identity was violated without parsing a message. Naming the
377
+ * reference here — next to the key that produces it — keeps one authority: the key and the error
378
+ * it raises cannot drift apart.
379
+ *
380
+ * Pass a member of the framework's error-reference vocabulary, never a bare literal.
381
+ */
382
+ conflictMessageReference?: string;
383
+ }
384
+
385
+ //------------------------------------------------------------------------------------------------
386
+ // TTL FIELD PARAMS
387
+ //------------------------------------------------------------------------------------------------
388
+
389
+ /**
390
+ *
391
+ * Parameters for the ttl decorator.
392
+ * Marks a Date field for TTL (Time To Live) expiration in MongoDB.
393
+ * MongoDB will automatically delete documents when the TTL expires.
394
+ *
395
+ * @example
396
+ * createdAt: z.date().ttl({ expireAfterSeconds: 3600 }) // Expire 1 hour after createdAt
397
+ *
398
+ * @example
399
+ * expiresAt: z.date().ttl({ expireAfterSeconds: 0 }) // Expire at the exact date value
400
+ */
401
+ export interface TtlFieldParams {
402
+ /**
403
+ * Number of seconds after the field's date value when the document should be deleted.
404
+ * - 0: Document expires at the exact date/time stored in the field
405
+ * - N > 0: Document expires N seconds after the date/time stored in the field
406
+ *
407
+ * @example
408
+ * // Expire documents 24 hours after createdAt
409
+ * createdAt: z.date().ttl({ expireAfterSeconds: 86400 })
410
+ *
411
+ * @example
412
+ * // Expire documents at the exact expiresAt date
413
+ * expiresAt: z.date().ttl({ expireAfterSeconds: 0 })
414
+ */
415
+ expireAfterSeconds: number;
416
+ }
417
+
418
+ //------------------------------------------------------------------------------------------------
419
+ // OTP FIELD PARAMS
420
+ //------------------------------------------------------------------------------------------------
421
+
422
+ /**
423
+ * Parameters for the isOtp decorator.
424
+ * Configures the OTP (One-Time Password) input field behavior.
425
+ */
426
+ export interface OtpFieldParams {
427
+ /**
428
+ * Maximum length of the OTP code.
429
+ * Determines how many input slots are rendered.
430
+ *
431
+ * @default 6
432
+ *
433
+ * @example
434
+ * // 6-digit OTP code
435
+ * otpCode: z.string().isOtp()
436
+ *
437
+ * @example
438
+ * // 4-digit PIN
439
+ * pin: z.string().isOtp({ maxLength: 4 })
440
+ */
441
+ maxLength?: number;
442
+ }
443
+
444
+ //------------------------------------------------------------------------------------------------
445
+ // SUMMARY FIELD PARAMS
446
+ //------------------------------------------------------------------------------------------------
447
+
448
+ /**
449
+ *
450
+ * Parameters for the isSummaryField decorator.
451
+ * Controls how summary fields are handled, particularly for foreign key population.
452
+ */
453
+ export interface SummaryFieldParams {
454
+ /**
455
+ * Whether to populate this foreign key field with the related resource's summary data.
456
+ * Only applicable when the field also has isForeignKey() decorator.
457
+ *
458
+ * When true:
459
+ * - The related resource will be fetched using the resourceIdentifier naming convention
460
+ * - Only the related resource's isSummaryField fields will be included
461
+ * - The populated data is optional (null if the related resource doesn't exist)
462
+ *
463
+ * @default false
464
+ *
465
+ * @example
466
+ * // Field definition:
467
+ * userId: z.string().isForeignKey().isSummaryField({ populate: true })
468
+ *
469
+ * // LIST/SEARCH response will include:
470
+ * {
471
+ * _id: "123",
472
+ * userId: "user-456",
473
+ * user: { _id: "user-456", email: "...", displayName: "..." } // populated summary
474
+ * }
475
+ */
476
+ populate?: boolean;
477
+ }
478
+
479
+ //------------------------------------------------------------------------------------------------
480
+ // FORM VALIDATION DECORATOR PARAMS
481
+ //------------------------------------------------------------------------------------------------
482
+
483
+ /**
484
+ * Validation mode for form fields.
485
+ * Configures when field validation is triggered.
486
+ * - ON_CHANGE: Validate on every change (with debounce for text fields)
487
+ * - ON_BLUR: Validate when field loses focus (default for text fields)
488
+ * - ON_TOUCHED: Validate on blur initially, then on every change once touched
489
+ * - ON_SUBMIT: Validate only on form submission
490
+ */
491
+ export enum ValidationMode {
492
+ ON_CHANGE = 'onChange',
493
+ ON_BLUR = 'onBlur',
494
+ ON_TOUCHED = 'onTouched',
495
+ ON_SUBMIT = 'onSubmit',
496
+ }
497
+
498
+ /**
499
+ * Trigger mechanism for autosave.
500
+ * - DEBOUNCE: Save after a delay following the last change
501
+ * - BLUR: Save when field loses focus
502
+ * - NONE: Disable autosave for this field
503
+ */
504
+ export enum AutosaveTrigger {
505
+ DEBOUNCE = 'debounce',
506
+ BLUR = 'blur',
507
+ NONE = 'none',
508
+ }
509
+
510
+ export interface AutosaveFieldParams {
511
+ /**
512
+ * Whether autosave is enabled for this field.
513
+ * @default true
514
+ */
515
+ enabled?: boolean;
516
+
517
+ /**
518
+ * Trigger mechanism for autosave.
519
+ * - AutosaveTrigger.DEBOUNCE: Save after a delay following the last change
520
+ * - AutosaveTrigger.BLUR: Save when field loses focus
521
+ * - AutosaveTrigger.NONE: Disable autosave for this field
522
+ * @default AutosaveTrigger.DEBOUNCE
523
+ */
524
+ trigger?: AutosaveTrigger;
525
+
526
+ /**
527
+ * Debounce delay in milliseconds (only for DEBOUNCE trigger).
528
+ * @default 500
529
+ */
530
+ debounceMs?: number;
531
+ }
532
+ ```
533
+ ## Import Origins
534
+
535
+ - `@wildo-ai/zod-decorators`
536
+
537
+ ## Source Excerpts
538
+
539
+ ### Origin Package: `@wildo-ai/zod-decorators`
540
+
541
+ ```typescript
542
+ *
543
+ * Deep-merge mergeable decorator params with special handling for the `values` key.
544
+ *
545
+ * - Nested plain objects are merged recursively so later decorator calls can
546
+ * augment `display`, `edit`, and similar buckets without dropping earlier data.
547
+ * - `values` is merged per key, preserving existing enum/spec entries while still
548
+ * letting later calls override a nested property of the same entry.
549
+ * - Arrays and non-object values remain atomic and are replaced by the incoming value.
550
+ * - Additive only — to clear a nested property, set it to `undefined` explicitly.
551
+ */
552
+ function deepMergeDecoratorParams(
553
+ existing: Record<string, unknown>,
554
+ incoming: Record<string, unknown>,
555
+ ): Record<string, unknown> {
556
+ const result = { ...existing };
557
+ for (const [key, value] of Object.entries(incoming)) {
558
+ const existingValue = result[key];
559
+
560
+ if (key === 'values' && isPlainObject(value) && isPlainObject(existingValue)) {
561
+ const existingValues = existingValue as Record<string, Record<string, unknown>>;
562
+ const incomingValues = value as Record<string, Record<string, unknown>>;
563
+ result[key] = { ...existingValues };
564
+ for (const [enumValue, enumConfig] of Object.entries(incomingValues)) {
565
+ const existingEnumConfig = existingValues[enumValue];
566
+ (result[key] as Record<string, unknown>)[enumValue] =
567
+ isPlainObject(existingEnumConfig) && isPlainObject(enumConfig)
568
+ ? deepMergeDecoratorParams(existingEnumConfig, enumConfig)
569
+ : enumConfig;
570
+ }
571
+ } else if (isPlainObject(value) && isPlainObject(existingValue)) {
572
+ result[key] = deepMergeDecoratorParams(existingValue, value);
573
+ } else {
574
+ result[key] = value;
575
+ }
576
+ }
577
+ return result;
578
+ }
579
+
580
+
581
+ /**
582
+ * Decorators that can never share a field with {@link ZodDecorator.RAG_SOURCE}, each with the one
583
+ * sentence that justifies refusing it. ONE table, keyed by the companion, consulted in BOTH
584
+ * application orders by `assertRagSourceCompanionAdmissible` below — the alternative (a check
585
+ * inside each of the five companion methods plus one inside `ragSource`) is six hand-applied
586
+ * copies of one invariant — the failure shape where a fix lands at one of an invariant's N call
587
+ * sites and the other N-1 drift. Because the check lives in
588
+ * `applySingleDecorator`, it also covers every escape hatch (`addRagSource`, `addDecorators`,
589
+ * `z_file({ ragSource })`) for free: there is no door into decorator metadata that bypasses it.
590
+ *
591
+ * ## `TTL` is the one entry this table cannot actually enforce — do not read it as closing DL3
592
+ *
593
+ * Corrected 2026-08-27. `.ttl()`'s applicable types are `['ZodDate','ZodOptional']` and
594
+ * `.ragSource()`'s are `['ZodString','ZodOptional','ZodNullable','ZodDefault']`, so the two
595
+ * essentially cannot land on the SAME field — this row defends a type-impossible pair. The
596
+ * REACHABLE configuration is `expiresAt: z.date().ttl(...)` beside `notes: z.string().ragSource()`:
597
+ * two fields, one resource, one row that MongoDB's TTL monitor deletes whole with no application
598
+ * code running. That is a RESOURCE-level fact and is refused at resource level, at boot, by
599
+ * `ApplicationStartupConfigValidatorService.collectRagSourceRetentionRefusal` (which reads both
600
+ * existing authorities — the RAG field walker and `collectResourceRetentionPolicies` — rather than
601
+ * re-deriving either). The row below is KEPT because it is cheap, correct, and reports the
602
+ * single-field case at authoring time instead of at boot; it is not the control.
603
+ */
604
+ const RAG_SOURCE_REFUSED_COMPANIONS: ReadonlyMap<ZodDecorator, string> = new Map([
605
+ [ZodDecorator.IS_PASSWORD, 'a password must never enter a retrieval corpus.'],
606
+ [ZodDecorator.IS_OTP, 'a one-time code must never enter a retrieval corpus.'],
607
+ [ZodDecorator.IS_WRITE_ONLY_SECRET, 'a write-only secret must never enter a retrieval corpus.'],
608
+ [ZodDecorator.IS_EPHEMERAL, 'an ephemeral shown-once value must never enter a retrieval corpus.'],
609
+ [
610
+ ZodDecorator.TTL,
611
+ 'MongoDB honours .ttl() natively — rows vanish with no application code running, so derived chunks could never be erased with their parent (resource-rag-capability DL3). ' +
612
+ 'The pair is normally declared on two DIFFERENT fields of one resource, which this field-level check cannot see: that case is refused at boot, per resource, by the startup RAG capability probe. ' +
613
+ 'Both refusals lift when a sweep-cascade reconciles chunk rows against vanished parents.',
614
+ ],
615
+ ]);
616
+
617
+ /**
618
+ * Enforce the RAG-source refusal pairs in BOTH orders at the single decorator chokepoint:
619
+ * applying `RAG_SOURCE` to a schema already carrying a refused companion throws, and applying a
620
+ * refused companion to a schema already carrying `RAG_SOURCE` throws the same sentence. Reading
621
+ * `currentMetadata` (the bag this very application is about to write into) is what makes the check
622
+ * order-symmetric: wrapper chains carry their inner metadata forward (`wrapInstanceMethod` copies
623
+ * `SCHEMA_METADATA` across `.optional()` / `.nullable()` / `.default()`), so the earlier
624
+ * declaration is visible from wherever the later one lands.
625
+ */
626
+ function assertRagSourceCompanionAdmissible(decorator: ZodDecorator, currentMetadata: CustomFieldMetadata): void {
627
+ if (decorator === ZodDecorator.RAG_SOURCE) {
628
+ for (const [companion, reason] of RAG_SOURCE_REFUSED_COMPANIONS) {
629
+ if (currentMetadata[companion] !== undefined) {
630
+ throw new Error(`ragSource() cannot be combined with ${companion}(): ${reason}`);
631
+ }
632
+ }
633
+ return;
634
+ }
635
+
636
+ const reason = RAG_SOURCE_REFUSED_COMPANIONS.get(decorator);
637
+ if (reason !== undefined && currentMetadata[ZodDecorator.RAG_SOURCE] !== undefined) {
638
+ throw new Error(`${decorator}() cannot be combined with ragSource(): ${reason}`);
639
+ }
640
+ }
641
+
642
+ function applySingleDecorator<T extends z.ZodTypeAny>(
643
+ schema: T,
644
+ decorator: ZodDecorator,
645
+ params?: ZodDecorator_ParamsType[ZodDecorator]
646
+ ): T {
647
+ // Ensure schema exists before accessing Symbol property
648
+ if (!schema) {
649
+ throw new Error('Invalid schema provided to applySingleDecorator');
650
+ }
651
+
652
+ // Get existing metadata from Symbol property with proper type casting
653
+ const currentMetadata: CustomFieldMetadata = (schema as any)[SCHEMA_METADATA] || {};
654
+
655
+ // Refused RAG-source companions, both orders, before any metadata is written — a refusal that
656
+ // fired after a partial write would leave the schema carrying half of a rejected combination.
657
+ assertRagSourceCompanionAdmissible(decorator, currentMetadata);
658
+
659
+ // Generic updater function resolution: if params is a function, call it with
660
+ // the current metadata value and use the result. Works for any decorator.
661
+ let resolvedFromUpdater = false;
662
+ if (typeof params === 'function') {
663
+ const existing = currentMetadata[decorator];
664
+ const currentValue = (existing && typeof existing === 'object') ? existing : undefined;
665
+ params = (params as (current: unknown) => unknown)(currentValue) as typeof params;
666
+ resolvedFromUpdater = true;
667
+ }
668
+ // After function resolution, params is a concrete value (never a function).
669
+ // TypeScript can't narrow this from control flow. Use `rp<D>()` for typed
670
+ // access in cases that read properties; use `p` for simple assignments.
671
+ const p = params as any;
672
+ function rp<D extends ZodDecorator>(): Exclude<ZodDecorator_ParamsType[D], Function> {
673
+ return params as Exclude<ZodDecorator_ParamsType[D], Function>;
674
+ }
675
+
676
+ // Handle each decorator explicitly.
677
+ // `p` is used instead of `params` for assignments — it's the same value
678
+ // but typed as `any` since TypeScript can't narrow the function union away
679
+ // after the generic resolution above.
680
+ switch (decorator) {
681
+ case ZodDecorator.IS_DB_INDEXED:
682
+ currentMetadata[ZodDecorator.IS_DB_INDEXED] = true;
683
+ break;
684
+ case ZodDecorator.IS_FOREIGN_KEY:
685
+ currentMetadata[ZodDecorator.IS_FOREIGN_KEY] = p ?? true;
686
+ break;
687
+ case ZodDecorator.IS_HIDDEN:
688
+ currentMetadata[ZodDecorator.IS_HIDDEN] = p ?? true;
689
+ break;
690
+ case ZodDecorator.IS_NOT_EDITABLE:
691
+ currentMetadata[ZodDecorator.IS_NOT_EDITABLE] = p ?? true;
692
+ break;
693
+ case ZodDecorator.IS_SUMMARY_FIELD:
694
+ currentMetadata[ZodDecorator.IS_SUMMARY_FIELD] = p ?? true;
695
+ break;
696
+ case ZodDecorator.IS_BACKEND_ONLY:
697
+ currentMetadata[ZodDecorator.IS_BACKEND_ONLY] = p ?? true;
698
+ break;
699
+ case ZodDecorator.IS_WRITE_ONLY_SECRET:
700
+ currentMetadata[ZodDecorator.IS_WRITE_ONLY_SECRET] = p ?? true;
701
+ break;
702
+ case ZodDecorator.IMPERSONALIZE_WITH: {
703
+ // Fail LOUD on a missing / blank treatment. This is the single chokepoint shared by the fluent
704
+ // `.impersonalizeWith(t)` method and the `addImpersonalizeWith(schema, t)` helper, so both doors
705
+ // reject the same inputs. Without it a bare `.impersonalizeWith()` (JS caller, or a TS caller
706
+ // whose value widened to undefined) would store `undefined`, `getImpersonalizeTreatment` would
707
+ // return `undefined`, and the field would read as UNTREATED — a silently unscrubbed personal
708
+ // field, i.e. exactly the PII-leak class this decorator exists to prevent.
709
+ //
710
+ // NORMALIZE HERE, not in the doors. Both authoring forms — the bare `RedactionType` string
711
+ // (the common case) and the `{ treatment, maskValue }` object (a MASK needing a field-specific
712
+ // value) — collapse to the params object before storage, so every reader sees ONE shape and
713
+ // the doors stay dumb pass-throughs. A raw `addDecorators()` caller lands here too.
714
+ const raw = p as unknown;
715
+ const normalized: ImpersonalizeFieldParams | undefined =
716
+ typeof raw === 'string'
717
+ ? { treatment: raw }
718
+ : (raw !== null && typeof raw === 'object' && !Array.isArray(raw))
719
+ ? { ...(raw as ImpersonalizeFieldParams) }
720
+ : undefined;
721
+ if (normalized === undefined || typeof normalized.treatment !== 'string' || normalized.treatment.trim().length === 0) {
722
+ throw new Error(
723
+ `impersonalizeWith(treatment) requires a non-empty RedactionType value (received ${JSON.stringify(raw)}). ` +
724
+ `An untreated field is left intact by the impersonalize writer — declare a treatment or omit the decorator.`,
725
+ );
726
+ }
727
+ // A blank override would write an empty string and erase the distinction between "masked" and
728
+ // "never had a value" — the same class of silent lie the treatment check above prevents.
729
+ // WHETHER a maskValue is legal for this treatment (MASK only) and whether the field's schema
730
+ // ACCEPTS it are both checked by the saas-models boot guard: this layer knows neither
731
+ // `RedactionType` nor the resource's mainSchema.
732
+ if (normalized.maskValue !== undefined && (typeof normalized.maskValue !== 'string' || normalized.maskValue.length === 0)) {
733
+ throw new Error(
734
+ `impersonalizeWith({ maskValue }) requires a non-empty string (received ${JSON.stringify(normalized.maskValue)}). ` +
735
+ `The mask value is written verbatim in place of the field — omit it to use the framework mask constant.`,
736
+ );
737
+ }
738
+ currentMetadata[ZodDecorator.IMPERSONALIZE_WITH] = normalized;
739
+ break;
740
+ }
741
+ case ZodDecorator.PORTABILITY_PROVENANCE: {
742
+ // Fail LOUD on a missing / blank provenance — the single chokepoint shared by the fluent
743
+ // `.portabilityProvenance(p)` method and the `addPortabilityProvenance(schema, p)` helper.
744
+ //
745
+ // Storing a blank would be worse here than for most decorators. An Art. 20 export treats an
746
+ // UNDECLARED field as a REFUSAL precisely because neither guess is safe (excluding
747
+ // under-delivers a legal right, including over-shares controller-derived data). A silently
748
+ // stored empty string would read back as declared-but-meaningless, converting that deliberate
749
+ // refusal into a fabricated answer about a disclosure boundary.
750
+ //
751
+ // WHETHER the value is a real `DataPortabilityProvenance` member is checked by the saas-models
752
+ // layer, which owns the enum — this layer knows only that a non-empty string was declared.
753
+ const raw = p as unknown;
754
+ if (typeof raw !== 'string' || raw.trim().length === 0) {
755
+ throw new Error(
756
+ `portabilityProvenance(provenance) requires a non-empty DataPortabilityProvenance value (received ${JSON.stringify(raw)}). ` +
757
+ `An undeclared field makes an Art. 20 export refuse rather than guess — declare a provenance or omit the decorator ` +
758
+ `to inherit the resource's portabilityPolicy.defaultProvenance.`,
759
+ );
760
+ }
761
+ currentMetadata[ZodDecorator.PORTABILITY_PROVENANCE] = raw;
762
+ break;
763
+ }
764
+ case ZodDecorator.DATA_CATEGORIES: {
765
+ // NORMALIZE HERE, not in the doors — the impersonalizeWith discipline. A single value (the
766
+ // common case) and an array both store a deduped ARRAY, so every reader sees one shape and
767
+ // `getDataCategories` answers "is this field categorized?" by presence alone.
768
+ //
769
+ // Fail LOUD on an empty declaration. An UNCATEGORIZED field is a legitimate, common state —
770
+ // most fields are not personal data — and the gap report is built on ABSENCE. A stored empty
771
+ // array would read back as declared-with-no-categories, which is invisible to a report
772
+ // looking for absence: the field would be silently excluded from the notice while looking
773
+ // annotated to anyone reading the schema.
774
+ //
775
+ // WHETHER each value is a real `PersonalDataCategory` member is checked by the resource
776
+ // factory's boot guard, which owns the enum — this layer knows only that non-empty strings
777
+ // were declared.
778
+ const raw = p as unknown;
779
+ const authored: readonly unknown[] = Array.isArray(raw) ? raw : [raw];
780
+ if (authored.length === 0 || authored.some((value) => typeof value !== 'string' || value.trim().length === 0)) {
781
+ throw new Error(
782
+ `dataCategories(categories) requires at least one non-empty PersonalDataCategory value (received ${JSON.stringify(raw)}). ` +
783
+ `A field that holds no personal data carries NO declaration — absence is what a category gap report reads. ` +
784
+ `An empty declaration looks annotated and discloses nothing.`,
785
+ );
786
+ }
787
+ currentMetadata[ZodDecorator.DATA_CATEGORIES] = [...new Set(authored as readonly string[])];
788
+ break;
789
+ }
790
+ case ZodDecorator.IS_AUDIT_EVIDENCE:
791
+ currentMetadata[ZodDecorator.IS_AUDIT_EVIDENCE] = true;
792
+ break;
793
+ case ZodDecorator.RAG_SOURCE: {
794
+ // NORMALIZE HERE, not in the doors — the impersonalizeWith discipline. A bare `.ragSource()`
795
+ // (the common case) stores `{}` rather than `true`/`undefined`, so every reader sees ONE
796
+ // shape and `getRagSourceConfig` answers "is this field a source?" by presence alone. The
797
+ // knobs are validated at decoration time because every one of them is otherwise a SILENT
798
+ // runtime misconfiguration: a zero chunkSize or an overlap >= size does not fail — it chunks
799
+ // pathologically (empty chunks, or every chunk repeating its predecessor), which surfaces
800
+ // as bad retrieval quality nobody traces back to the schema.
801
+ const raw = p as unknown;
802
+ if (raw !== undefined && (raw === null || typeof raw !== 'object' || Array.isArray(raw))) {
803
+ throw new Error(`ragSource(config?) accepts an optional RagSourceConfiguration object (received ${JSON.stringify(raw)}).`);
804
+ }
805
+ const normalized: RagSourceConfiguration = raw === undefined ? {} : { ...(raw as RagSourceConfiguration) };
806
+ const { chunkingStrategy, chunkSize, chunkOverlap } = normalized;
807
+ const knownStrategies = Object.values(RAGChunkingStrategy) as string[];
808
+ if (chunkingStrategy !== undefined && !knownStrategies.includes(chunkingStrategy)) {
809
+ throw new Error(
810
+ `ragSource({ chunkingStrategy }) must be a RAGChunkingStrategy member (received ${JSON.stringify(chunkingStrategy)}; known: ${knownStrategies.join(', ')}).`,
811
+ );
812
+ }
813
+ if (chunkSize !== undefined && (!Number.isInteger(chunkSize) || chunkSize <= 0)) {
814
+ throw new Error(`ragSource({ chunkSize }) must be a positive integer (received ${JSON.stringify(chunkSize)}).`);
815
+ }
816
+ if (chunkOverlap !== undefined && (!Number.isInteger(chunkOverlap) || chunkOverlap < 0)) {
817
+ throw new Error(`ragSource({ chunkOverlap }) must be a non-negative integer (received ${JSON.stringify(chunkOverlap)}).`);
818
+ }
819
+ if (chunkSize !== undefined && chunkOverlap !== undefined && chunkOverlap >= chunkSize) {
820
+ throw new Error(
821
+ `ragSource({ chunkSize, chunkOverlap }) requires chunkOverlap < chunkSize (received overlap ${chunkOverlap} >= size ${chunkSize}) — ` +
822
+ `an overlap that reaches the chunk size makes every chunk repeat its predecessor.`,
823
+ );
824
+ }
825
+ currentMetadata[ZodDecorator.RAG_SOURCE] = normalized;
826
+ break;
827
+ }
828
+ case ZodDecorator.IS_VIRTUAL: {
829
+ const vp = rp<ZodDecorator.IS_VIRTUAL>();
830
+ if (!vp?.calculate) {
831
+ throw new Error('isVirtual decorator requires a calculate function');
832
+ }
833
+ currentMetadata[ZodDecorator.IS_VIRTUAL] = vp;
834
+ break;
835
+ }
836
+ case ZodDecorator.IS_DISCRIMINATOR:
837
+ currentMetadata[ZodDecorator.IS_DISCRIMINATOR] = p ?? true;
838
+ break;
839
+ case ZodDecorator.EXCLUDE_FROM_CREATE:
840
+ currentMetadata[ZodDecorator.EXCLUDE_FROM_CREATE] = true;
841
+ break;
842
+ case ZodDecorator.EXCLUDE_FROM_UPDATE:
843
+ currentMetadata[ZodDecorator.EXCLUDE_FROM_UPDATE] = true;
844
+ break;
845
+ case ZodDecorator.IS_UNIQUE:
846
+ currentMetadata[ZodDecorator.IS_UNIQUE] = p ?? true;
847
+ break;
848
+ case ZodDecorator.IS_PRIMARY_KEY:
849
+ currentMetadata[ZodDecorator.IS_PRIMARY_KEY] = true;
850
+ break;
851
+ case ZodDecorator.IS_BUSINESS_KEY:
852
+ currentMetadata[ZodDecorator.IS_BUSINESS_KEY] = true;
853
+ break;
854
+ case ZodDecorator.OBJECT_BUSINESS_KEY_SET:
855
+ currentMetadata[ZodDecorator.OBJECT_BUSINESS_KEY_SET] = p;
856
+ break;
857
+ case ZodDecorator.TTL:
858
+ currentMetadata[ZodDecorator.TTL] = p;
859
+ break;
860
+ case ZodDecorator.IS_PASSWORD:
861
+ currentMetadata[ZodDecorator.IS_PASSWORD] = true;
862
+ break;
863
+ case ZodDecorator.IS_OTP:
864
+ currentMetadata[ZodDecorator.IS_OTP] = p ?? true;
865
+ break;
866
+ case ZodDecorator.IS_COLOR:
867
+ currentMetadata[ZodDecorator.IS_COLOR] = true;
868
+ break;
869
+ case ZodDecorator.IS_DRAFT_RELAXED:
870
+ currentMetadata[ZodDecorator.IS_DRAFT_RELAXED] = true;
871
+ break;
872
+ case ZodDecorator.SHOW_WHEN:
873
+ currentMetadata[ZodDecorator.SHOW_WHEN] = p;
874
+ break;
875
+ case ZodDecorator.SYSTEM_ENUM:
876
+ currentMetadata[ZodDecorator.SYSTEM_ENUM] = p;
877
+ break;
878
+ case ZodDecorator.IS_EPHEMERAL:
879
+ currentMetadata[ZodDecorator.IS_EPHEMERAL] = true;
880
+ break;
881
+ case ZodDecorator.IS_CRDT:
882
+ currentMetadata[ZodDecorator.IS_CRDT] = true;
883
+ break;
884
+ // Mergeable decorator buckets: primitive UI/spec decorators deep-merge
885
+ // plain-object params by default, while updater functions still replace
886
+ // exactly with what they return.
887
+ case ZodDecorator.ENUM_UI: {
888
+ const existing = currentMetadata[decorator];
889
+ if (p === undefined) {
890
+ (currentMetadata as Record<string, unknown>)[decorator] = existing ?? true;
891
+ } else if (resolvedFromUpdater) {
892
+ (currentMetadata as Record<string, unknown>)[decorator] = p;
893
+ } else {
894
+ (currentMetadata as Record<string, unknown>)[decorator] =
895
+ isPlainObject(existing) && isPlainObject(p)
896
+ ? deepMergeDecoratorParams(existing, p)
897
+ : p;
898
+ }
899
+ break;
900
+ }
901
+ case ZodDecorator.BOOLEAN_UI:
902
+ case ZodDecorator.STRING_UI:
903
+ case ZodDecorator.NUMBER_UI:
904
+ case ZodDecorator.DATE_UI:
905
+ case ZodDecorator.DATETIME_UI:
906
+ case ZodDecorator.TIME_UI:
907
+ case ZodDecorator.MONEY_UI:
908
+ case ZodDecorator.CODE_UI:
909
+ case ZodDecorator.FILE_UI:
910
+ case ZodDecorator.DURATION_UI:
911
+ case ZodDecorator.PHONE_UI:
912
+ case ZodDecorator.BIGDECIMAL_UI:
913
+ case ZodDecorator.FOREIGN_KEY_UI:
914
+ case ZodDecorator.ARRAY_UI:
915
+ case ZodDecorator.OBJECT_UI:
916
+ case ZodDecorator.STRING_SPEC:
917
+ case ZodDecorator.NUMBER_SPEC:
918
+ case ZodDecorator.BOOLEAN_SPEC:
919
+ case ZodDecorator.DATE_SPEC:
920
+ case ZodDecorator.DATETIME_SPEC:
921
+ case ZodDecorator.TIME_SPEC:
922
+ case ZodDecorator.ENUM_SPEC:
923
+ case ZodDecorator.MONEY_SPEC:
924
+ case ZodDecorator.CODE_SPEC:
925
+ case ZodDecorator.FILE_SPEC:
926
+ case ZodDecorator.DURATION_SPEC:
927
+ case ZodDecorator.PHONE_SPEC:
928
+ case ZodDecorator.BIGDECIMAL_SPEC:
929
+ case ZodDecorator.FOREIGN_KEY_SPEC:
930
+ case ZodDecorator.ARRAY_SPEC:
931
+ case ZodDecorator.OBJECT_SPEC: {
932
+ const existing = currentMetadata[decorator];
933
+ if (p === undefined) {
934
+ (currentMetadata as Record<string, unknown>)[decorator] = existing ?? true;
935
+ } else if (resolvedFromUpdater) {
936
+ (currentMetadata as Record<string, unknown>)[decorator] = p;
937
+ } else {
938
+ (currentMetadata as Record<string, unknown>)[decorator] =
939
+ isPlainObject(existing) && isPlainObject(p)
940
+ ? deepMergeDecoratorParams(existing, p)
941
+ : p;
942
+ }
943
+ break;
944
+ }
945
+ }
946
+
947
+ // Store updated metadata using Symbol
948
+ (schema as any)[SCHEMA_METADATA] = currentMetadata;
949
+ propagateWrapperDecoratorMetadataToInnerSchema(schema, currentMetadata);
950
+
951
+ return addChainableMethods(schema) as T;
952
+ }
953
+ ```
954
+
955
+ ### Origin Package: `@wildo-ai/zod-decorators`
956
+
957
+ ```typescript
958
+ *
959
+ * Wraps an instance method to preserve SCHEMA_METADATA when it returns a new instance.
960
+ * In Zod v4, methods are on instances not prototypes, so we wrap them individually.
961
+ * Also wraps the result's methods to ensure metadata persists through the entire chain.
962
+ */
963
+ function wrapInstanceMethod(instance: any, methodName: string): void {
964
+ const originalMethod = instance[methodName];
965
+ if (typeof originalMethod !== 'function') return;
966
+
967
+ // Skip if already wrapped
968
+ if ((originalMethod as any).__metadataWrapped) return;
969
+
970
+ // Use special wrapper for field-transform methods on ZodObject
971
+ const isObjectFieldTransform = OBJECT_FIELD_TRANSFORM_METHODS_SET.has(methodName) &&
972
+ instance.constructor?.name === 'ZodObject';
973
+
974
+ const wrappedMethod = function(this: any, ...args: any[]) {
975
+ // Get original shape before transformation (for field-transform methods)
976
+ const originalShape = isObjectFieldTransform ? this.shape : null;
977
+ const originalSchemaMetadata = (this as any)[SCHEMA_METADATA];
978
+
979
+ const result = originalMethod.apply(this, args);
980
+
981
+ // Copy metadata from original to result if it exists and result is different
982
+ if (result && result !== this) {
983
+ // Preserve all decorator metadata (including rangeConfig and currencyConfig)
984
+ if (originalSchemaMetadata && Object.keys(originalSchemaMetadata).length > 0) {
985
+ (result as any)[SCHEMA_METADATA] = { ...originalSchemaMetadata };
986
+ }
987
+
988
+ // For field-transform methods, copy field-level metadata to new wrapped fields
989
+ if (isObjectFieldTransform && originalShape && result.shape) {
990
+ copyFieldMetadata(originalShape, result.shape);
991
+ }
992
+
993
+ // Also wrap the result's methods so metadata persists through subsequent chains
994
+ wrapInstanceMethodsForMetadata(result);
995
+ }
996
+ return result;
997
+ };
998
+
999
+ // Mark as wrapped to avoid double-wrapping
1000
+ (wrappedMethod as any).__metadataWrapped = true;
1001
+
1002
+ instance[methodName] = wrappedMethod;
1003
+ }
1004
+
1005
+ /**
1006
+ * Copy field-level metadata from original shape to new shape.
1007
+ * Used for methods like .partial() that wrap fields in new types.
1008
+ */
1009
+ function copyFieldMetadata(originalShape: Record<string, any>, newShape: Record<string, any>): void {
1010
+ for (const fieldName of Object.keys(originalShape)) {
1011
+ const originalField = originalShape[fieldName];
1012
+ const newField = newShape[fieldName];
1013
+
1014
+ if (originalField && newField && originalField !== newField) {
1015
+ const fieldMetadata = (originalField as any)[SCHEMA_METADATA];
1016
+
1017
+ if (fieldMetadata && Object.keys(fieldMetadata).length > 0) {
1018
+ (newField as any)[SCHEMA_METADATA] = deepCloneValue(fieldMetadata);
1019
+
1020
+ // Also wrap the new field's methods for future chaining
1021
+ wrapInstanceMethodsForMetadata(newField);
1022
+ }
1023
+ }
1024
+ }
1025
+ }
1026
+
1027
+ /**
1028
+ * Wrap only the instance methods (not decorator methods) for metadata preservation.
1029
+ * Used when copying metadata to a new schema instance.
1030
+ */
1031
+ function wrapInstanceMethodsForMetadata(schema: any): void {
1032
+ for (const methodName of ZOD_INSTANCE_METHODS_TO_WRAP) {
1033
+ if (typeof schema[methodName] === 'function') {
1034
+ wrapInstanceMethod(schema, methodName);
1035
+ }
1036
+ }
1037
+ }
1038
+
1039
+
1040
+
1041
+ export function addChainableMethods<T extends z.ZodTypeAny>(schema: T): T {
1042
+ const decoratedSchema = schema as DecoratedPrimitiveZodType<T>;
1043
+
1044
+ // CRITICAL: Wrap instance methods that return new instances to preserve metadata
1045
+ // In Zod v4, methods are on instances not prototypes
1046
+ for (const methodName of ZOD_INSTANCE_METHODS_TO_WRAP) {
1047
+ if (typeof (decoratedSchema as any)[methodName] === 'function') {
1048
+ wrapInstanceMethod(decoratedSchema, methodName);
1049
+ }
1050
+ }
1051
+
1052
+ const ctorName = (decoratedSchema as any)?.constructor?.name as string | undefined;
1053
+
1054
+ for (const decorator of Object.values(ZodDecorator)) {
1055
+ const applyable = ZodDecorator_ApplyableType[decorator];
1056
+ if (!applyable || !ctorName) continue;
1057
+ if (!applyable.includes(ctorName)) continue;
1058
+ if (Object.prototype.hasOwnProperty.call(decoratedSchema, decorator)) continue;
1059
+
1060
+ // Use the actual function from ZodDecorator_FunctionType to preserve composite
1061
+ // decorator behavior (e.g., isPrimaryKey sets 5 decorators, isPassword sets 2).
1062
+ // Falling back to a generic wrapper should never happen if the table is complete.
1063
+ const registeredFn = ZodDecorator_FunctionType[decorator];
1064
+ const value = registeredFn
1065
+ ? (...args: any[]) => registeredFn.apply(decoratedSchema, args)
1066
+ : (params: any) => addDecorators(decoratedSchema, [{ ref: decorator, params }]);
1067
+
1068
+ Object.defineProperty(decoratedSchema, decorator, { value, ...defaultZodDecoSchemaProperties});
1069
+ }
1070
+
1071
+ if (!decoratedSchema.hasOwnProperty('addDecorators')) {
1072
+ Object.defineProperty(decoratedSchema, 'addDecorators', {
1073
+ value: (decorators: DecoratorInput[]) => addDecorators(decoratedSchema, decorators),
1074
+ ...defaultZodDecoSchemaProperties
1075
+ });
1076
+ }
1077
+
1078
+ return decoratedSchema as T;
1079
+ }
1080
+ ```