@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,1230 @@
1
+ # Market-Generation CLI (source)
2
+
3
+ `wildo market generate` is the Phase-4.2 operator surface that
4
+ turns one `MarketMessageTemplate` into final marketing copy via a
5
+ two-call companion flow (introspection subprocess for prompt
6
+ assembly + parent-process LLM call). This file pulls the canonical
7
+ source spans for every layer the CLI touches so the SKILL stays in
8
+ sync with the shipped code.
9
+
10
+ ## CLI command (source)
11
+
12
+ The full command class — flag definitions, run loop, LLM-output
13
+ rendering, soft-warning helper:
14
+
15
+ ## Import Origins
16
+
17
+ - `@wildo-ai/wildo-cli`
18
+
19
+ ## Source Excerpts
20
+
21
+ ### Origin Package: `@wildo-ai/wildo-cli`
22
+
23
+ ```typescript
24
+ *
25
+ * `wildo market generate` — Market generation CLI surface (Phase 4.2).
26
+ *
27
+ * Renders one `MarketMessageTemplate` against the application's
28
+ * authored `MarketSnapshot` and invokes the
29
+ * `market.generation.agent` LLM agent to produce final
30
+ * marketing copy. The CLI is a thin client over POST
31
+ * `/api/companion/market/generate`; the dev-companion does the work.
32
+ *
33
+ * Flags:
34
+ * - `--template` (required) — `MarketMessageTemplate.ref`
35
+ * - `--icp`, `--feature`, `--benefit`, `--channel`, `--objection` —
36
+ * ref of the corresponding entity. Each is optional at the CLI
37
+ * layer, but the *template's* `requiredInputs` decides which ones
38
+ * become mandatory: an under-specified call surfaces a precise
39
+ * "missing required input" error from the subprocess instead of a
40
+ * confusing LLM hallucination. Refs that the template does not
41
+ * declare are silently ignored — the CLI surfaces a soft warning
42
+ * so the operator can simplify the command line.
43
+ * - `--language` — overrides `output_language` substitution
44
+ * (default: English).
45
+ * - `--explain` — prints the rendered prompt + trace alongside the
46
+ * LLM output. Useful for debugging templates and context-block
47
+ * ranking.
48
+ * - `--timeout` — override the default 90 s companion-client
49
+ * timeout (in seconds). Useful for long objection-response emails
50
+ * on slow GPT-4O windows.
51
+ */
52
+
53
+ import chalk from 'chalk';
54
+
55
+ import { BaseCommand } from '~wildo-cli/kernel/base-command';
56
+ import { CommandCategory } from '~wildo-cli/kernel/types';
57
+ import type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';
58
+ import { ensureSaasAppScope } from '~wildo-cli/kernel/command-scope-utils';
59
+ import { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';
60
+
61
+ import {
62
+ companionPost,
63
+ MARKET_SAAS_SCOPE_REQUIRED_MESSAGE,
64
+ optionalStringFlag,
65
+ requireStringFlag,
66
+ type MarketGenerateCliResult,
67
+ } from './market-command.utils';
68
+
69
+ /**
70
+ * CLI flag → `MarketMessageRequiredInput`-equivalent kind name pairs.
71
+ *
72
+ * Used for the soft "you passed --benefit but the template didn't
73
+ * declare BENEFIT_REF, so it was ignored" warning. Kept in sync with
74
+ * the renderer's switch in `renderMarketPrompt(...)` (subprocess).
75
+ */
76
+ const FLAG_TO_CONSUMED_KIND: Record<string, string> = {
77
+ icp: 'icp',
78
+ benefit: 'benefit',
79
+ channel: 'channel',
80
+ objection: 'objection',
81
+ };
82
+
83
+ export default class MarketGenerateCommand extends BaseCommand {
84
+ readonly meta: CommandMeta = {
85
+ name: 'market generate',
86
+ description: 'Render a market message template + invoke the generation agent',
87
+ category: CommandCategory.Market,
88
+ flags: {
89
+ template: {
90
+ type: 'string',
91
+ description: 'MarketMessageTemplate ref to render',
92
+ required: true,
93
+ },
94
+ icp: {
95
+ type: 'string',
96
+ description: 'MarketICP ref (required when the template declares ICP_REF)',
97
+ },
98
+ feature: {
99
+ type: 'string',
100
+ description: 'AppFeature ref to anchor the context block (used for intent picking, not substitution)',
101
+ },
102
+ benefit: {
103
+ type: 'string',
104
+ description: 'FeatureBenefit ref (required when the template declares BENEFIT_REF)',
105
+ },
106
+ channel: {
107
+ type: 'string',
108
+ description: 'MarketChannel ref (required when the template declares CHANNEL_REF)',
109
+ },
110
+ objection: {
111
+ type: 'string',
112
+ description: 'MarketObjection ref (required when the template declares OBJECTION_REF)',
113
+ },
114
+ language: {
115
+ type: 'string',
116
+ description: 'Output language label substituted into {{output_language}} (default: English)',
117
+ },
118
+ explain: {
119
+ type: 'boolean',
120
+ description: 'Print the rendered prompt + trace alongside the LLM output',
121
+ default: false,
122
+ },
123
+ timeout: {
124
+ type: 'number',
125
+ description: 'Override the default 90s companion-client timeout (in seconds)',
126
+ },
127
+ },
128
+ };
129
+
130
+ async run(ctx: CommandContext): Promise<CommandResult> {
131
+ if (!ensureSaasAppScope(ctx, MARKET_SAAS_SCOPE_REQUIRED_MESSAGE)) {
132
+ return { success: false };
133
+ }
134
+
135
+ const templateRef = requireStringFlag(ctx, 'template', 'MarketMessageTemplate ref');
136
+ if (!templateRef) {
137
+ return { success: false };
138
+ }
139
+
140
+ try {
141
+ ctx.log.info(chalk.cyan('\n Generating market copy via dev companion...\n'));
142
+
143
+ const result = await companionPost<MarketGenerateCliResult>(
144
+ ctx,
145
+ '/api/companion/market/generate',
146
+ {
147
+ templateRef,
148
+ icpRef: optionalStringFlag(ctx, 'icp'),
149
+ featureRef: optionalStringFlag(ctx, 'feature'),
150
+ benefitRef: optionalStringFlag(ctx, 'benefit'),
151
+ channelRef: optionalStringFlag(ctx, 'channel'),
152
+ objectionRef: optionalStringFlag(ctx, 'objection'),
153
+ outputLanguage: optionalStringFlag(ctx, 'language'),
154
+ },
155
+ );
156
+
157
+ this.warnAboutIgnoredRefs(ctx, result);
158
+
159
+ ctx.log.success(' Market generation output ready.');
160
+ ctx.log.info(chalk.dim(` Template: ${result.trace.template.ref} (${result.trace.template.name})`));
161
+ ctx.log.info(chalk.dim(` Output kind: ${result.trace.template.outputKind}`));
162
+ ctx.log.info(chalk.dim(` Language: ${result.trace.outputLanguage}`));
163
+ ctx.log.info(chalk.dim(` Voice used: ${result.trace.contextVoiceUsed ?? '(none)'}`));
164
+ ctx.log.info(chalk.dim(` Agent: ${result.trace.agentRef}`));
165
+
166
+ if (result.trace.consumedInputs.length > 0) {
167
+ ctx.log.info(chalk.dim(' Inputs consumed:'));
168
+ for (const input of result.trace.consumedInputs) {
169
+ ctx.log.info(chalk.dim(` - ${input.kind}: ${input.ref}`));
170
+ }
171
+ }
172
+
173
+ if (result.trace.contextIcpsConsidered.length > 0) {
174
+ ctx.log.info(chalk.dim(` ICPs in context: ${result.trace.contextIcpsConsidered.join(', ')}`));
175
+ }
176
+ if (result.trace.contextBenefitsConsidered.length > 0) {
177
+ ctx.log.info(chalk.dim(` Benefits in context: ${result.trace.contextBenefitsConsidered.join(', ')}`));
178
+ }
179
+
180
+ const explain = Boolean(ctx.flags.explain);
181
+ if (explain) {
182
+ ctx.log.info('');
183
+ ctx.log.info(chalk.bold(' Market-context block'));
184
+ for (const line of result.contextBlock.split('\n')) {
185
+ ctx.log.info(` ${line}`);
186
+ }
187
+ ctx.log.info('');
188
+ ctx.log.info(chalk.bold(' Rendered template body'));
189
+ for (const line of result.renderedTemplate.split('\n')) {
190
+ ctx.log.info(` ${line}`);
191
+ }
192
+ }
193
+
194
+ ctx.log.info('');
195
+ ctx.log.info(chalk.bold(' LLM output'));
196
+ for (const line of result.output.split('\n')) {
197
+ ctx.log.info(` ${line}`);
198
+ }
199
+ ctx.log.info('');
200
+
201
+ return { success: true };
202
+ } catch (error) {
203
+ ctx.log.error(
204
+ `Market generation failed: ${ErrorUtils.extractErrorMessage(error)}`,
205
+ );
206
+ return { success: false };
207
+ }
208
+ }
209
+
210
+ /**
211
+ * Surface a soft warning when the operator passed an entity ref
212
+ * that the chosen template did not consume.
213
+ *
214
+ * The renderer (subprocess) is the source of truth for "what the
215
+ * template actually used" — `result.trace.consumedInputs` lists
216
+ * every ref the renderer consumed for substitution. If the
217
+ * operator passed `--benefit X` but the template's
218
+ * `requiredInputs` did not declare `BENEFIT_REF`, the ref is
219
+ * silently ignored. Surfacing a warning lets the operator
220
+ * simplify their command line without us hard-failing (templates
221
+ * may legitimately accept optional contextual hints later).
222
+ *
223
+ * `--feature` is intentionally excluded: it currently anchors
224
+ * the context-block intent picker, not template substitution, so
225
+ * it never appears in `consumedInputs` even when used.
226
+ */
227
+ private warnAboutIgnoredRefs(ctx: CommandContext, result: MarketGenerateCliResult): void {
228
+ const consumedKinds = new Set(result.trace.consumedInputs.map((entry) => entry.kind));
229
+ const ignored: string[] = [];
230
+ for (const [flag, kind] of Object.entries(FLAG_TO_CONSUMED_KIND)) {
231
+ if (optionalStringFlag(ctx, flag) && !consumedKinds.has(kind)) {
232
+ ignored.push(`--${flag}`);
233
+ }
234
+ }
235
+ if (ignored.length > 0) {
236
+ ctx.log.warn(
237
+ `Template "${result.trace.template.ref}" did not consume: ${ignored.join(', ')} — these flags were ignored.`,
238
+ );
239
+ }
240
+ }
241
+ }
242
+ ```
243
+
244
+ ## CLI utilities (source)
245
+
246
+ The shared helpers the command leans on (companion HTTP client +
247
+ flag parsers + timeout resolver + default constants, including the
248
+ market-specific scope-gate message):
249
+
250
+ ## Import Origins
251
+
252
+ - `@wildo-ai/wildo-cli`
253
+
254
+ ## Source Excerpts
255
+
256
+ ### Origin Package: `@wildo-ai/wildo-cli`
257
+
258
+ ```typescript
259
+ *
260
+ * Market generation CLI shared utilities (Phase 4.2).
261
+ *
262
+ * Mirrors the shape of `commands/generate/email-command.utils.ts` —
263
+ * each command surface gets its own small utils file so we don't
264
+ * cross-couple the `generate` and `market` categories. The two
265
+ * helpers we genuinely share (companion HTTP client + service-address
266
+ * resolution) live in `~wildo-cli/services/companion/...` and are
267
+ * imported here directly.
268
+ */
269
+
270
+ import type { MarketGenerationResponse } from '@wildo-ai/saas-specifications';
271
+
272
+ import { CompanionClient } from '~wildo-cli/services/companion/companion-client.service';
273
+ import { loadAppLocalRuntimeServiceAddresses } from '~wildo-cli/services/application/app-local-runtime-addresses.service';
274
+ import type { CompanionClientOptions } from '~wildo-cli/services/companion/companion.schemas';
275
+ import type { CommandContext } from '~wildo-cli/kernel/types';
276
+
277
+ /**
278
+ * Default companion-client timeout for `wildo market generate`.
279
+ *
280
+ * 90 s matches `EMAIL_COMPANION_TIMEOUT_MS` plus headroom for the
281
+ * two-step (introspection subprocess + LLM call) market generation
282
+ * flow. The LLM call is the dominant cost; the renderer itself
283
+ * completes in single-digit ms. Operators can override via
284
+ * `--timeout <seconds>` on the CLI for long objection-response
285
+ * emails or batch generations.
286
+ */
287
+ export const MARKET_COMPANION_DEFAULT_TIMEOUT_MS = 90_000;
288
+
289
+ export interface MarketGenerateCliRequest {
290
+ templateRef: string;
291
+ icpRef?: string;
292
+ featureRef?: string;
293
+ benefitRef?: string;
294
+ channelRef?: string;
295
+ objectionRef?: string;
296
+ outputLanguage?: string;
297
+ }
298
+
299
+ /**
300
+ * CLI-side alias for `MarketGenerationResponse` (canonical shape
301
+ * authored once in `@wildo-ai/saas-specifications`,
302
+ * `market-generation.schemas.ts`). F-2 + F-6 from the Phase-4.2 audit
303
+ * consolidated three formerly hand-authored definitions (CLI
304
+ * interface, service interface, inline service Zod) into this one
305
+ * shared schema.
306
+ */
307
+ export type MarketGenerateCliResult = MarketGenerationResponse;
308
+
309
+ /**
310
+ * Operator-facing message for the saas-app scope gate on `market`
311
+ * commands. More specific than the shared kernel default — it names
312
+ * `wildo.saas.config.ts` so the operator knows exactly what marks a
313
+ * SaaS application root. Passed to the shared `ensureSaasAppScope`
314
+ * kernel helper (`~wildo-cli/kernel/command-scope-utils`) at the
315
+ * command call site; kept here so the market surface owns its own
316
+ * wording and the `market` command tree need not import the message
317
+ * from another command category.
318
+ */
319
+ export const MARKET_SAAS_SCOPE_REQUIRED_MESSAGE =
320
+ 'Market commands require a SaaS application. Run from within a directory containing wildo.saas.config.ts.';
321
+
322
+ export function requireStringFlag(
323
+ ctx: CommandContext,
324
+ flagName: string,
325
+ label: string,
326
+ ): string | null {
327
+ const value = ctx.flags[flagName];
328
+ if (typeof value === 'string' && value.trim().length > 0) {
329
+ return value.trim();
330
+ }
331
+ ctx.log.error(`Missing required flag --${flagName} (${label}).`);
332
+ return null;
333
+ }
334
+
335
+ export function optionalStringFlag(
336
+ ctx: CommandContext,
337
+ flagName: string,
338
+ ): string | undefined {
339
+ const value = ctx.flags[flagName];
340
+ if (typeof value === 'string' && value.trim().length > 0) {
341
+ return value.trim();
342
+ }
343
+ return undefined;
344
+ }
345
+
346
+ /**
347
+ * Resolve a per-call `--timeout` flag (in seconds) into milliseconds.
348
+ *
349
+ * Returns `MARKET_COMPANION_DEFAULT_TIMEOUT_MS` when the flag is
350
+ * absent, missing, or invalid. Negative or zero values fall back to
351
+ * the default (the CLI never lets the operator disable the timeout
352
+ * outright — that surface belongs to the companion service).
353
+ */
354
+ export function resolveTimeoutMs(ctx: CommandContext): number {
355
+ const raw = ctx.flags.timeout;
356
+ if (raw === undefined || raw === null || raw === '') {
357
+ return MARKET_COMPANION_DEFAULT_TIMEOUT_MS;
358
+ }
359
+ const seconds = typeof raw === 'number' ? raw : Number(raw);
360
+ if (!Number.isFinite(seconds) || seconds <= 0) {
361
+ return MARKET_COMPANION_DEFAULT_TIMEOUT_MS;
362
+ }
363
+ return Math.floor(seconds * 1000);
364
+ }
365
+
366
+ async function resolveCompanionClientOptions(
367
+ ctx: CommandContext,
368
+ timeoutMs: number,
369
+ ): Promise<CompanionClientOptions> {
370
+ const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;
371
+ if (!saasRoot) {
372
+ return { timeoutMs };
373
+ }
374
+
375
+ const serviceAddresses = await loadAppLocalRuntimeServiceAddresses(saasRoot);
376
+ const devCompanion = serviceAddresses?.devCompanion;
377
+
378
+ return {
379
+ baseUrl: devCompanion?.url,
380
+ port: devCompanion?.port,
381
+ timeoutMs,
382
+ };
383
+ }
384
+
385
+ export async function companionPost<T>(
386
+ ctx: CommandContext,
387
+ pathname: string,
388
+ body?: unknown,
389
+ options?: { timeoutMs?: number },
390
+ ): Promise<T> {
391
+ const timeoutMs = options?.timeoutMs ?? resolveTimeoutMs(ctx);
392
+ return CompanionClient.post<T>(pathname, body, await resolveCompanionClientOptions(ctx, timeoutMs));
393
+ }
394
+ ```
395
+
396
+ ## Companion-side prompt renderer (subprocess, source)
397
+
398
+ The introspection-subprocess function that loads the snapshot,
399
+ validates it, looks up the template, enforces `requiredInputs[]`,
400
+ renders the market-context block, and substitutes the Mustache
401
+ placeholders. Never makes an LLM call.
402
+
403
+ ## Import Origins
404
+
405
+ - `@wildo-ai/dev-companion`
406
+
407
+ ## Source Excerpts
408
+
409
+ ### Origin Package: `@wildo-ai/dev-companion`
410
+
411
+ ```typescript
412
+ *
413
+ * Phase-4.2 market generation prompt renderer.
414
+ *
415
+ * Pure, deterministic, snapshot-in / prompt-out. Lives in the
416
+ * introspection subprocess (the same process that owns
417
+ * `buildMarketContextBlock`) so the parent companion process never
418
+ * has to load `marketSpecification` to compose a prompt.
419
+ *
420
+ * Pipeline (no LLM, no I/O):
421
+ *
422
+ * 1. **Look up the template** by `templateRef`. Throw if absent.
423
+ * 2. **Resolve every `requiredInputs[]` ref** the template declares
424
+ * against the snapshot — throw if any required input is missing
425
+ * from the caller's payload, or if a provided ref is unknown.
426
+ * 3. **Pick the context-block intent**:
427
+ * - `featureRef` provided → `{ kind: 'feature', featureRef }` (the
428
+ * builder already filters benefits-in-scope correctly).
429
+ * - else `icpRef` provided → `{ kind: 'icp', icpRef }`.
430
+ * - else throw — every Phase-4.2 template needs at least one
431
+ * anchor for the context block.
432
+ * 4. **Call `buildMarketContextBlock(...)`** to get the English
433
+ * context block + trace.
434
+ * 5. **Substitute Mustache placeholders** in `template.promptTemplate`
435
+ * using a tiny single-pass `{{path}}` resolver that walks
436
+ * dot-paths against the resolved entity map. `{{output_language}}`
437
+ * is wired specifically (the value comes from the CLI flag, not
438
+ * from a snapshot entity). Unknown placeholders surface a
439
+ * `MarketPromptUnknownPlaceholderError` so authoring drift is
440
+ * caught loudly rather than rendered as the empty string.
441
+ * 6. **Concatenate**: `<context block>\n\n<rendered template body>`.
442
+ *
443
+ * The renderer intentionally does NOT call `validateMarketSnapshot`
444
+ * — the caller (`resolveMarketSnapshot` in the handler) already did
445
+ * that with WARN-vs-ERROR semantics. Calling it again here would
446
+ * either duplicate WARN logging or risk a different validation
447
+ * surface drifting from the canonical entry point.
448
+ */
449
+
450
+ /** Maximum length of the BCP-47 `outputLanguage` tag — defensive guard
451
+ * mirroring `MAX_OUTPUT_LANGUAGE_LENGTH` in `market-context-block.builder.ts`.
452
+ * Long values almost always indicate the operator pasted a sentence
453
+ * instead of a tag (e.g. "translate the result into Brazilian Portuguese"). */
454
+ const MAX_OUTPUT_LANGUAGE_LENGTH = 64;
455
+
456
+ /** Default `output_language` used when the CLI does not pass `--output-language`.
457
+ * Keeps every template's `{{output_language}}` placeholder render-safe and
458
+ * defaults to the English-authoring contract (D15). */
459
+ const DEFAULT_OUTPUT_LANGUAGE = 'English';
460
+
461
+ export interface MarketPromptRequest {
462
+ /** Required — every render is anchored on exactly one template. */
463
+ templateRef: string;
464
+ /** ICP ref — required when the template declares `ICP_REF`. */
465
+ icpRef?: string;
466
+ /** Feature ref — drives the context-block intent when provided. */
467
+ featureRef?: string;
468
+ /** Benefit ref — required when the template declares `BENEFIT_REF`. */
469
+ benefitRef?: string;
470
+ /** Channel ref — required when the template declares `CHANNEL_REF`. */
471
+ channelRef?: string;
472
+ /** Objection ref — required when the template declares `OBJECTION_REF`. */
473
+ objectionRef?: string;
474
+ /** BCP-47 tag for the LLM's `{{output_language}}` placeholder. */
475
+ outputLanguage?: string;
476
+ }
477
+
478
+ export interface MarketPromptTemplateTrace {
479
+ ref: string;
480
+ name: string;
481
+ outputKind: string;
482
+ requiredInputs: string[];
483
+ preferredVoiceRef?: string;
484
+ }
485
+
486
+ export interface MarketPromptResult {
487
+ /** Final prompt: `<context block>\n\n<rendered template body>`. */
488
+ prompt: string;
489
+ /** Just the rendered template body, post-substitution (useful for trace). */
490
+ renderedTemplate: string;
491
+ /** Just the context block (useful for trace + dry-run / `--explain`). */
492
+ contextBlock: string;
493
+ trace: {
494
+ template: MarketPromptTemplateTrace;
495
+ context: ReturnType<typeof buildMarketContextBlock>['trace'];
496
+ /** The exact `output_language` value that was substituted. */
497
+ outputLanguage: string;
498
+ /** Refs the renderer actually consumed (subset of `MarketMessageRequiredInput`). */
499
+ consumedInputs: { kind: string; ref: string }[];
500
+ };
501
+ }
502
+
503
+ export class MarketPromptUnknownPlaceholderError extends Error {
504
+ public readonly placeholders: string[];
505
+ constructor(placeholders: string[]) {
506
+ super(
507
+ `Market generation prompt has unknown placeholder(s): ${placeholders.map(p => `\`{{${p}}}\``).join(', ')}. `
508
+ + `Add the corresponding entity to the snapshot, fix the placeholder name, or remove it from the template body.`,
509
+ );
510
+ this.name = 'MarketPromptUnknownPlaceholderError';
511
+ this.placeholders = placeholders;
512
+ }
513
+ }
514
+
515
+ export class MarketPromptMissingRequiredInputError extends Error {
516
+ public readonly missing: MarketMessageRequiredInput[];
517
+ constructor(templateRef: string, missing: MarketMessageRequiredInput[]) {
518
+ super(
519
+ `Template \`${templateRef}\` declares requiredInputs ${missing.map(m => `\`${m}\``).join(', ')} `
520
+ + `but the caller did not provide them. Pass the matching CLI flag(s) (e.g. \`--icp\`, \`--benefit\`, \`--objection\`, \`--channel\`).`,
521
+ );
522
+ this.name = 'MarketPromptMissingRequiredInputError';
523
+ this.missing = missing;
524
+ }
525
+ }
526
+
527
+ export class MarketPromptUnknownRefError extends Error {
528
+ public readonly entityKind: string;
529
+ public readonly providedRef: string;
530
+ constructor(entityKind: string, providedRef: string, knownRefs: string[]) {
531
+ super(
532
+ `No ${entityKind} found with ref \`${providedRef}\` in the authored MarketSnapshot. `
533
+ + `Known ${entityKind} refs: ${knownRefs.length > 0 ? knownRefs.map(r => `\`${r}\``).join(', ') : '(none)'}.`,
534
+ );
535
+ this.name = 'MarketPromptUnknownRefError';
536
+ this.entityKind = entityKind;
537
+ this.providedRef = providedRef;
538
+ }
539
+ }
540
+
541
+ export class MarketPromptTemplateNotFoundError extends Error {
542
+ constructor(templateRef: string, knownRefs: string[]) {
543
+ super(
544
+ `No MarketMessageTemplate found with ref \`${templateRef}\`. `
545
+ + `Known templates: ${knownRefs.length > 0 ? knownRefs.map(r => `\`${r}\``).join(', ') : '(none — author one in `specifications/src/market/messaging/`)'}.`,
546
+ );
547
+ this.name = 'MarketPromptTemplateNotFoundError';
548
+ }
549
+ }
550
+
551
+ export interface RenderMarketPromptInput {
552
+ snapshot: MarketSnapshot;
553
+ request: MarketPromptRequest;
554
+ }
555
+
556
+ export function renderMarketPrompt(input: RenderMarketPromptInput): MarketPromptResult {
557
+ const { snapshot, request } = input;
558
+ const template = lookupTemplate(snapshot, request.templateRef);
559
+ const outputLanguage = normalizeOutputLanguage(request.outputLanguage);
560
+
561
+ // Resolve only the entities referenced by `requiredInputs`. Extra
562
+ // refs the caller passes (e.g. `--feature` purely for context-block
563
+ // intent) are not enforced as required and are NOT placed into the
564
+ // Mustache substitution map.
565
+ const resolvedEntities: PlaceholderEntities = {};
566
+ const consumedInputs: { kind: string; ref: string }[] = [];
567
+ const missing: MarketMessageRequiredInput[] = [];
568
+
569
+ for (const requiredInput of template.requiredInputs ?? []) {
570
+ switch (requiredInput) {
571
+ case MarketMessageRequiredInput.ICP_REF: {
572
+ if (!request.icpRef) { missing.push(requiredInput); break; }
573
+ resolvedEntities.icp = lookupIcp(snapshot, request.icpRef);
574
+ resolvedEntities.icpRef = request.icpRef;
575
+ consumedInputs.push({ kind: 'icp', ref: request.icpRef });
576
+ break;
577
+ }
578
+ case MarketMessageRequiredInput.BENEFIT_REF: {
579
+ if (!request.benefitRef) { missing.push(requiredInput); break; }
580
+ resolvedEntities.benefit = lookupBenefit(snapshot, request.benefitRef);
581
+ resolvedEntities.benefitRef = request.benefitRef;
582
+ consumedInputs.push({ kind: 'benefit', ref: request.benefitRef });
583
+ break;
584
+ }
585
+ case MarketMessageRequiredInput.CHANNEL_REF: {
586
+ if (!request.channelRef) { missing.push(requiredInput); break; }
587
+ resolvedEntities.channel = lookupChannel(snapshot, request.channelRef);
588
+ resolvedEntities.channelRef = request.channelRef;
589
+ consumedInputs.push({ kind: 'channel', ref: request.channelRef });
590
+ break;
591
+ }
592
+ case MarketMessageRequiredInput.OBJECTION_REF: {
593
+ if (!request.objectionRef) { missing.push(requiredInput); break; }
594
+ resolvedEntities.objection = lookupObjection(snapshot, request.objectionRef);
595
+ resolvedEntities.objectionRef = request.objectionRef;
596
+ consumedInputs.push({ kind: 'objection', ref: request.objectionRef });
597
+ break;
598
+ }
599
+ }
600
+ }
601
+
602
+ if (missing.length > 0) {
603
+ throw new MarketPromptMissingRequiredInputError(template.ref, missing);
604
+ }
605
+
606
+ // Context-block intent — feature wins over icp when both are
607
+ // provided, mirroring `buildMarketContextBlock`'s feature-first
608
+ // semantics (a feature anchor produces a tighter benefit set).
609
+ const intent = pickContextIntent(request);
610
+ const contextBuilt = buildMarketContextBlock({
611
+ snapshot,
612
+ intent,
613
+ outputLanguage: request.outputLanguage,
614
+ });
615
+
616
+ const renderedTemplate = renderMustache(
617
+ template.promptTemplate,
618
+ {
619
+ ...resolvedEntities,
620
+ output_language: outputLanguage,
621
+ },
622
+ );
623
+
624
+ const prompt = `${contextBuilt.block}\n\n${renderedTemplate}`;
625
+
626
+ return {
627
+ prompt,
628
+ renderedTemplate,
629
+ contextBlock: contextBuilt.block,
630
+ trace: {
631
+ template: {
632
+ ref: template.ref,
633
+ name: template.name,
634
+ outputKind: String(template.outputKind),
635
+ requiredInputs: (template.requiredInputs ?? []).map(String),
636
+ ...(template.preferredVoiceRef ? { preferredVoiceRef: template.preferredVoiceRef } : {}),
637
+ },
638
+ context: contextBuilt.trace,
639
+ outputLanguage,
640
+ consumedInputs,
641
+ },
642
+ };
643
+ }
644
+ ```
645
+
646
+ ## Companion-side generation service (parent process, source)
647
+
648
+ The service that consumes the rendered prompt and invokes the LLM
649
+ agent via the `AgentsBackendService`:
650
+
651
+ ## Import Origins
652
+
653
+ - `@wildo-ai/dev-companion`
654
+
655
+ ## Source Excerpts
656
+
657
+ ### Origin Package: `@wildo-ai/dev-companion`
658
+
659
+ ```typescript
660
+ *
661
+ * Market generation companion service (Phase 4.2).
662
+ *
663
+ * Two-step orchestrator that bridges the introspection subprocess
664
+ * (which owns snapshot + template + context-block + Mustache
665
+ * substitution) and the in-process `AgentsBackendService` (which
666
+ * owns the LLM call):
667
+ *
668
+ * 1. **Subprocess (`market-render-prompt`)** — pure prompt assembly.
669
+ * Resolves `marketSpecification`, runs `validateMarketSnapshot`,
670
+ * looks up the `MarketMessageTemplate` by ref, enforces every
671
+ * declared `requiredInputs` ref, calls `buildMarketContextBlock`,
672
+ * and substitutes Mustache placeholders. Output: `{ prompt,
673
+ * contextBlock, renderedTemplate, trace }`.
674
+ * 2. **Parent (`AgentsBackendService.invokeAgent`)** — feeds the
675
+ * final prompt to `market.generation.agent` (a
676
+ * `GENERATE_TEXT` agent) and unwraps `{ text }`. The optional
677
+ * `traceContext` (built by the caller from its request session +
678
+ * a dedicated agent step) is threaded straight into `invokeAgent`,
679
+ * so the engine-level agent-call trace sink records this call's
680
+ * prompt, output, and token-usage/latency. This is the canonical
681
+ * way a companion service makes its LLM calls observable — pass the
682
+ * `traceContext` through; the engine owns the per-call record.
683
+ *
684
+ * Why split across two boundaries instead of doing it all in one
685
+ * place:
686
+ *
687
+ * - The dev-companion subprocess is the *only* place that can load
688
+ * `marketSpecification` (it lives in the application's
689
+ * specifications package, which is loaded via `pathToFileURL`
690
+ * into the spawned child).
691
+ * - `AgentsBackendService` lives in the parent companion process
692
+ * (it depends on the saas-backend-lib DI container, which is
693
+ * bootstrapped exactly once at companion startup).
694
+ * - Doing both in the subprocess would force every introspection
695
+ * call to spin up a brand-new `AgentsBackendService` instance —
696
+ * wasteful, and worse, would lose the unified LLM-quota and
697
+ * provider-cache surface that lives in the parent container.
698
+ *
699
+ * Service-key picking: the market generation behaviors route to the
700
+ * `specifications` target which every SaaS service declares. We
701
+ * deliberately reuse the same "any backend service key" picker as
702
+ * `getResourcesRegistry` (see `pickResourcesRegistryCarrierServiceKey`
703
+ * in `companion.controller.ts`) — the choice is uniform across
704
+ * backends because the spec-package target is identical for every
705
+ * service of a given app.
706
+ */
707
+
708
+ import { inject, injectable } from 'inversify';
709
+ import {
710
+ ErrorBuilderBackendService,
711
+ LoggerService,
712
+ MARKET_GENERATION_AGENT_REF,
713
+ SAAS_SERVICE_TYPES,
714
+ type AgentsBackendService,
715
+ describeCaughtError,
716
+ } from '@wildo-ai/saas-backend-lib';
717
+ import {
718
+ ErrorCustomMessageReference,
719
+ ErrorType,
720
+ type AgentTraceContext,
721
+ type FlowsActors_Agent_Invocation,
722
+ } from '@wildo-ai/saas-models';
723
+ import {
724
+ LLMProvider_GenerateTextInputSchema,
725
+ LLMProvider_GenerateTextOutputSchema,
726
+ LLMProvider_OperationContext_BaseSchema,
727
+ } from '@wildo-ai/external-connectors-models';
728
+ import {
729
+ MarketRenderPromptResponseSchema,
730
+ type MarketGenerationResponse,
731
+ } from '@wildo-ai/saas-specifications';
732
+
733
+ import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';
734
+ import type { CompanionContext } from '../../core/context/companion-context';
735
+ import { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';
736
+
737
+ export interface MarketGenerationRequest {
738
+ templateRef: string;
739
+ icpRef?: string;
740
+ featureRef?: string;
741
+ benefitRef?: string;
742
+ channelRef?: string;
743
+ objectionRef?: string;
744
+ outputLanguage?: string;
745
+ }
746
+
747
+ /**
748
+ * Service-level alias for `MarketGenerationResponse`.
749
+ *
750
+ * The canonical shape (Zod schema + inferred type) lives in
751
+ * `@wildo-ai/saas-specifications` (`market-generation.schemas.ts`) so
752
+ * that the subprocess HTTP boundary, the parent-process service, and
753
+ * the CLI all parse against the same single source of truth. F-2 +
754
+ * F-6 from the Phase-4.2 audit consolidated three formerly
755
+ * hand-authored definitions into this one.
756
+ */
757
+ export type MarketGenerationResult = MarketGenerationResponse;
758
+
759
+ @injectable()
760
+ export class MarketGenerationCompanionService {
761
+ private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;
762
+
763
+ constructor(
764
+ @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,
765
+ @inject(SAAS_SERVICE_TYPES.ErrorBuilderService)
766
+ private readonly errorBuilder: ErrorBuilderBackendService,
767
+ @inject(SAAS_SERVICE_TYPES.AgentsBackendService)
768
+ private readonly agentsService: AgentsBackendService,
769
+ @inject(COMPANION_SERVICE_TYPES.CompanionContext)
770
+ private readonly companionContext: CompanionContext,
771
+ @inject(COMPANION_SERVICE_TYPES.IntrospectionService)
772
+ private readonly companionIntrospectionService: CompanionIntrospectionService,
773
+ ) {
774
+ this.logDebug = this.logger.debugByType('MarketGenerationCompanionService');
775
+ this.logger.setDebugTypeLogging('MarketGenerationCompanionService', true);
776
+ }
777
+
778
+ public async generate(
779
+ request: MarketGenerationRequest,
780
+ traceContext?: AgentTraceContext,
781
+ ): Promise<MarketGenerationResult> {
782
+ if (!request.templateRef || typeof request.templateRef !== 'string') {
783
+ throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
784
+ customMessageReference: ErrorCustomMessageReference.VALIDATION,
785
+ context: { message: '`templateRef` is required and must be a non-empty string.' },
786
+ });
787
+ }
788
+
789
+ this.logDebug('market generation — start', {
790
+ templateRef: request.templateRef,
791
+ icpRef: request.icpRef,
792
+ featureRef: request.featureRef,
793
+ benefitRef: request.benefitRef,
794
+ channelRef: request.channelRef,
795
+ objectionRef: request.objectionRef,
796
+ outputLanguage: request.outputLanguage,
797
+ });
798
+
799
+ // ── 1. Subprocess prompt assembly ──────────────────────────
800
+ const introspection = await this.companionIntrospectionService.requestInfo({
801
+ serviceKey: this.pickMarketCarrierServiceKey(),
802
+ behavior: 'market-render-prompt',
803
+ input: this.buildSubprocessPayload(request),
804
+ });
805
+
806
+ if (introspection.success === false) {
807
+ const failure = introspection;
808
+ throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {
809
+ customMessageReference: ErrorCustomMessageReference.INTERNAL,
810
+ context: {
811
+ message: failure.error.message,
812
+ serviceKey: failure.serviceKey,
813
+ behavior: failure.behavior,
814
+ targetId: failure.targetId,
815
+ },
816
+ });
817
+ }
818
+
819
+ let renderResult;
820
+ try {
821
+ renderResult = MarketRenderPromptResponseSchema.parse(introspection.data);
822
+ } catch (error) {
823
+ throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {
824
+ customMessageReference: ErrorCustomMessageReference.INTERNAL,
825
+ context: {
826
+ message: `market-render-prompt subprocess returned an unexpected payload shape: ${describeCaughtError(error)}`,
827
+ },
828
+ });
829
+ }
830
+
831
+ // ── 2. Parent-process LLM call ─────────────────────────────
832
+ const invocation: FlowsActors_Agent_Invocation<
833
+ typeof LLMProvider_GenerateTextInputSchema,
834
+ typeof LLMProvider_GenerateTextOutputSchema,
835
+ typeof LLMProvider_OperationContext_BaseSchema
836
+ > = {
837
+ agentRef: MARKET_GENERATION_AGENT_REF,
838
+ initiator: {},
839
+ invocationContext: [],
840
+ input: { prompt: renderResult.prompt },
841
+ output: { text: '' },
842
+ executionContext: { callTimestamp: new Date().toISOString() },
843
+ artifactBindings: [],
844
+ };
845
+
846
+ const llmResult = await this.agentsService.invokeAgent(invocation, traceContext);
847
+ const outputText = (llmResult.output as { text?: string })?.text;
848
+ if (typeof outputText !== 'string' || outputText.trim().length === 0) {
849
+ throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {
850
+ customMessageReference: ErrorCustomMessageReference.INTERNAL,
851
+ context: {
852
+ message: 'Market generation agent returned empty output. Check provider connectivity and prompt validity.',
853
+ },
854
+ });
855
+ }
856
+
857
+ return {
858
+ prompt: renderResult.prompt,
859
+ renderedTemplate: renderResult.renderedTemplate,
860
+ contextBlock: renderResult.contextBlock,
861
+ output: outputText,
862
+ trace: {
863
+ template: renderResult.trace.template,
864
+ consumedInputs: renderResult.trace.consumedInputs,
865
+ outputLanguage: renderResult.trace.outputLanguage,
866
+ contextIcpsConsidered: renderResult.trace.context.icpsConsidered,
867
+ contextBenefitsConsidered: renderResult.trace.context.benefitsConsidered,
868
+ contextVoiceUsed: renderResult.trace.context.voiceUsed,
869
+ agentRef: MARKET_GENERATION_AGENT_REF,
870
+ },
871
+ };
872
+ }
873
+
874
+ /**
875
+ * Build the wire payload sent into the subprocess. We strip
876
+ * `undefined`-valued keys so the subprocess parser sees the
877
+ * minimal object — this keeps the JSON in IPC small and
878
+ * avoids spurious "key X is not a string" guards.
879
+ */
880
+ private buildSubprocessPayload(
881
+ request: MarketGenerationRequest,
882
+ ): Record<string, string> {
883
+ const payload: Record<string, string> = { templateRef: request.templateRef };
884
+ if (request.icpRef) payload.icpRef = request.icpRef;
885
+ if (request.featureRef) payload.featureRef = request.featureRef;
886
+ if (request.benefitRef) payload.benefitRef = request.benefitRef;
887
+ if (request.channelRef) payload.channelRef = request.channelRef;
888
+ if (request.objectionRef) payload.objectionRef = request.objectionRef;
889
+ if (request.outputLanguage) payload.outputLanguage = request.outputLanguage;
890
+ return payload;
891
+ }
892
+
893
+ /**
894
+ * Pick the first backend service available in the companion
895
+ * context. Mirrors `pickResourcesRegistryCarrierServiceKey`
896
+ * (companion.controller.ts) — the market generation behaviors
897
+ * route to `specifications` which every backend service
898
+ * declares, so the choice is uniform.
899
+ */
900
+ private pickMarketCarrierServiceKey(): string {
901
+ const backendServiceKey = Object.entries(this.companionContext.servicesByKey)
902
+ .find(([, service]) => !service.frontendType)?.[0];
903
+
904
+ if (!backendServiceKey) {
905
+ throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
906
+ customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
907
+ context: {
908
+ message: 'No backend service is available to resolve the market generation behavior. '
909
+ + 'The market-render-prompt behavior routes to the `specifications` target, which is '
910
+ + 'declared on every backend service — but the companion context has none.',
911
+ },
912
+ });
913
+ }
914
+
915
+ return backendServiceKey;
916
+ }
917
+ }
918
+ ```
919
+
920
+ ## Framework-default actors-system agent definition (source)
921
+
922
+ `market.generation.agent` — GPT-4O / `GENERATE_TEXT` /
923
+ temperature 0.6 — the framework default the service invokes, shipped
924
+ from `@wildo-ai/saas-backend-lib`. An application overrides
925
+ provider/model/persona via `marketGenerationAgentOverride` on its
926
+ backend companion-exports (the override reuses this fixed ref):
927
+
928
+ ## Import Origins
929
+
930
+ - `@wildo-ai/saas-backend-lib`
931
+
932
+ ## Source Excerpts
933
+
934
+ ### Origin Package: `@wildo-ai/saas-backend-lib`
935
+
936
+ ```typescript
937
+ *
938
+ * Market generation agent — framework default (Phase 4.2).
939
+ *
940
+ * The market generation agent is a free-form text-generation LLM agent
941
+ * driven by the `wildo market generate` CLI. It receives a fully
942
+ * rendered prompt (market-context block + Mustache-substituted
943
+ * `MarketMessageTemplate` body) and returns the LLM's prose output as a
944
+ * single string.
945
+ *
946
+ * Import path: `@wildo-ai/saas-backend-lib`.
947
+ *
948
+ * **Framework default + application override.** This constant is the
949
+ * default agent the dev companion registers under
950
+ * `MARKET_GENERATION_AGENT_REF` when the application authors no
951
+ * override. An application chooses its own LLM provider / model /
952
+ * persona by exporting a `marketGenerationAgentOverride` on its backend
953
+ * companion-exports (`BackendCompanionExports.marketGenerationAgentOverride`);
954
+ * the companion registers the override in place of this default. The
955
+ * override MUST keep `ref: MARKET_GENERATION_AGENT_REF` — the companion's
956
+ * market service invokes the agent by that fixed ref, so the override
957
+ * replaces the default under the same identity (an override under a
958
+ * different ref would never be reached). The ref is authored here (not
959
+ * in the companion) precisely so an application's `backend-api` can
960
+ * import it to author a valid override.
961
+ *
962
+ * Why `GENERATE_TEXT` instead of `GENERATE_STRUCTURED`: Phase-4.2
963
+ * outputs are always free-form prose (landing-page hero copy,
964
+ * objection-response email body, etc.). A structured schema would force
965
+ * every template author to also author a matching Zod schema per
966
+ * variant. Mirrors the companion's `emailTemplateGenerationAgent`
967
+ * pattern (a build-time `GENERATE_TEXT` scaffolding agent).
968
+ *
969
+ * Temperature note: 0.6 is intentionally higher than
970
+ * `email-template.generation.agent` (0.4) because marketing copy
971
+ * benefits from more creative latitude than email-template TSX
972
+ * scaffolding. An application that wants deterministic reruns authors an
973
+ * override with a lower temperature.
974
+ */
975
+
976
+ import {
977
+ FlowsActors_Agent,
978
+ FlowsActors_Agent_Skill_Type,
979
+ FlowsActors_Agent_Status,
980
+ ResourceOperationRiskLevel,
981
+ ResourcePrimaryScope,
982
+ } from '@wildo-ai/saas-models';
983
+ import {
984
+ LLMProvider_GenerateTextInputSchema,
985
+ LLMProvider_GenerateTextOutputSchema,
986
+ LLMProvider_OperationContext_BaseSchema,
987
+ LLMProvider_OperationDefinitionBase,
988
+ LLMProvider_OperationKey,
989
+ LLM_Model,
990
+ } from '@wildo-ai/external-connectors-models';
991
+
992
+ export const MARKET_GENERATION_AGENT_REF = 'market.generation.agent' as const;
993
+
994
+ export const marketGenerationAgent: FlowsActors_Agent = {
995
+ ref: MARKET_GENERATION_AGENT_REF,
996
+ displayName: 'Market Generation Agent',
997
+ status: FlowsActors_Agent_Status.ACTIVE,
998
+ config: {
999
+ providerRef: 'openai',
1000
+ model: LLM_Model.OPEN_AI_GPT_5_6_TERRA,
1001
+ operationKey: LLMProvider_OperationKey.GENERATE_TEXT,
1002
+ // No sampling params: the GPT-5.6 family rejects non-default temperature (verified live 2026-07-16).
1003
+ accessControl: [{
1004
+ primaryScope: ResourcePrimaryScope.APPLICATION,
1005
+ requiresApproval: false,
1006
+ }],
1007
+ riskLevel: ResourceOperationRiskLevel.LOW,
1008
+ },
1009
+ operationDefinition: {
1010
+ operationKey: LLMProvider_OperationKey.GENERATE_TEXT,
1011
+ providerRef: 'openai',
1012
+ inputSchema: LLMProvider_GenerateTextInputSchema,
1013
+ outputSchema: LLMProvider_GenerateTextOutputSchema,
1014
+ operationContextSchema: LLMProvider_OperationContext_BaseSchema,
1015
+ } satisfies LLMProvider_OperationDefinitionBase,
1016
+ promptSpec: {
1017
+ role: 'You are a senior B2B SaaS marketing writer. You receive an English market-context '
1018
+ + 'briefing followed by a single concrete writing task. The briefing is the source of truth '
1019
+ + 'for ICP, benefits, voice, and any objections — never invent facts that contradict it.',
1020
+ persona: 'You write tight, customer-led copy. You favour the reader\'s outcomes over feature lists, '
1021
+ + 'never use marketing clichés ("game-changer", "revolutionary", "synergy"), and respect the '
1022
+ + 'preferred tone of voice from the briefing. When the task asks for a specific output language, '
1023
+ + 'you write the entire response in that language while keeping proper nouns and product names intact.',
1024
+ skillType: FlowsActors_Agent_Skill_Type.GENERATION,
1025
+ instructions: [],
1026
+ },
1027
+ createdAt: '2026-04-17T00:00:00.000Z',
1028
+ };
1029
+ ```
1030
+
1031
+ ## HTTP response schema (source of truth)
1032
+
1033
+ `MarketGenerationResponse` — authored once in
1034
+ `@wildo-ai/saas-specifications`, parsed against by both the CLI
1035
+ (via `MarketGenerateCliResult` alias) and the companion service:
1036
+
1037
+ ## Import Origins
1038
+
1039
+ - `@wildo-ai/saas-specifications`
1040
+
1041
+ ## Source Excerpts
1042
+
1043
+ ### Origin Package: `@wildo-ai/saas-specifications`
1044
+
1045
+ ```typescript
1046
+ *
1047
+ * Phase-4.2 contract surface for the result returned by the
1048
+ * market generation pipeline:
1049
+ *
1050
+ * - **Subprocess** (`market-render-prompt` introspection behavior)
1051
+ * produces `MarketRenderPromptResponse` — pure prompt assembly,
1052
+ * no LLM call.
1053
+ * - **Parent process** (`MarketGenerationCompanionService`) consumes the
1054
+ * subprocess response, invokes `AgentsBackendService`, and produces
1055
+ * `MarketGenerationResponse` — the LLM-augmented variant
1056
+ * surfaced over `POST /api/companion/market/generate`.
1057
+ * - **CLI** (`wildo market generate`) consumes
1058
+ * `MarketGenerationResponse` over HTTP.
1059
+ *
1060
+ * Owning the contract here (rather than re-authoring it in the
1061
+ * dev-companion + the CLI) follows the same posture as
1062
+ * `market-context-block.schemas.ts` (Phase-4.1 audit closure F-13):
1063
+ * **anything that crosses a process boundary MUST be Zod-policed on
1064
+ * at least one side**. The single source of truth lives in
1065
+ * `saas-specifications` so both the subprocess HTTP boundary and the
1066
+ * CLI ↔ companion HTTP boundary can `parse()` against the same
1067
+ * schema, eliminating silent drift.
1068
+ *
1069
+ * The two response shapes intentionally share the same trace surface
1070
+ * (`MarketGenerationTemplateTraceSchema`) — the parent process passes the
1071
+ * subprocess trace through verbatim and only adds `agentRef`. Field
1072
+ * names match end-to-end (subprocess builder → handler → service →
1073
+ * CLI), so a refactor in any one layer surfaces a Zod parse error in
1074
+ * the next layer rather than a silent type drift.
1075
+ */
1076
+ export const MarketGenerationTemplateTraceSchema = z.object({
1077
+ ref: z.string().min(1),
1078
+ name: z.string().min(1),
1079
+ outputKind: z.string().min(1),
1080
+ requiredInputs: z.array(z.string().min(1)),
1081
+ preferredVoiceRef: z.string().min(1).optional(),
1082
+ });
1083
+
1084
+ export type MarketGenerationTemplateTrace = z.infer<typeof MarketGenerationTemplateTraceSchema>;
1085
+
1086
+ export const MarketGenerationConsumedInputSchema = z.object({
1087
+ kind: z.string().min(1),
1088
+ ref: z.string().min(1),
1089
+ });
1090
+
1091
+ export type MarketGenerationConsumedInput = z.infer<typeof MarketGenerationConsumedInputSchema>;
1092
+
1093
+ /**
1094
+ * Subprocess (`market-render-prompt`) response.
1095
+ *
1096
+ * Composed shape: `{ prompt, renderedTemplate, contextBlock,
1097
+ * trace: { template, context, outputLanguage, consumedInputs } }`.
1098
+ *
1099
+ * `context` reuses the canonical `MarketContextBlockTraceSchema` so
1100
+ * the subprocess + parent-process trace shapes do not drift.
1101
+ */
1102
+ export const MarketRenderPromptResponseSchema = z.object({
1103
+ prompt: z.string().min(1),
1104
+ renderedTemplate: z.string().min(1),
1105
+ contextBlock: z.string().min(1),
1106
+ trace: z.object({
1107
+ template: MarketGenerationTemplateTraceSchema,
1108
+ context: MarketContextBlockTraceSchema,
1109
+ outputLanguage: z.string().min(1),
1110
+ consumedInputs: z.array(MarketGenerationConsumedInputSchema),
1111
+ }),
1112
+ });
1113
+
1114
+ export type MarketRenderPromptResponse = z.infer<typeof MarketRenderPromptResponseSchema>;
1115
+
1116
+ /**
1117
+ * Parent-process (`MarketGenerationCompanionService.generate`) response.
1118
+ *
1119
+ * Surfaced over `POST /api/companion/market/generate`. Adds the LLM
1120
+ * `output` text and a flat trace surface (the parent process
1121
+ * unpacks `trace.context` into `contextIcpsConsidered` /
1122
+ * `contextBenefitsConsidered` / `contextVoiceUsed` for CLI display
1123
+ * convenience, and adds the `agentRef` used for the call).
1124
+ */
1125
+ export const MarketGenerationResponseSchema = z.object({
1126
+ prompt: z.string().min(1),
1127
+ renderedTemplate: z.string().min(1),
1128
+ contextBlock: z.string().min(1),
1129
+ output: z.string().min(1),
1130
+ trace: z.object({
1131
+ template: MarketGenerationTemplateTraceSchema,
1132
+ consumedInputs: z.array(MarketGenerationConsumedInputSchema),
1133
+ outputLanguage: z.string().min(1),
1134
+ contextIcpsConsidered: z.array(z.string().min(1)),
1135
+ contextBenefitsConsidered: z.array(z.string().min(1)),
1136
+ contextVoiceUsed: z.string().min(1).nullable(),
1137
+ agentRef: z.string().min(1),
1138
+ }),
1139
+ });
1140
+
1141
+ export type MarketGenerationResponse = z.infer<typeof MarketGenerationResponseSchema>;
1142
+ ```
1143
+
1144
+ ## Flag table
1145
+
1146
+ | Flag | Type | Required | Purpose |
1147
+ |--------------|---------|----------|------------------------------------------------------------------------------------------|
1148
+ | `--template` | string | yes | `MarketMessageTemplate.ref` to render |
1149
+ | `--icp` | string | when template declares `ICP_REF` | `MarketICP.ref` substituted into `{{icp.*}}` / `{{icpRef}}` placeholders |
1150
+ | `--feature` | string | no | `AppFeature.ref` — anchors the context-block intent picker; **never** substituted |
1151
+ | `--benefit` | string | when template declares `BENEFIT_REF` | `FeatureBenefit.ref` substituted into `{{benefit.*}}` / `{{benefitRef}}` placeholders |
1152
+ | `--channel` | string | when template declares `CHANNEL_REF` | `MarketChannel.ref` substituted into `{{channel.*}}` / `{{channelRef}}` placeholders |
1153
+ | `--objection`| string | when template declares `OBJECTION_REF` | `MarketObjection.ref` substituted into `{{objection.*}}` / `{{objectionRef}}` placeholders |
1154
+ | `--language` | string | no (default English) | Substituted into `{{output_language}}` — instructs the LLM to produce output in the named human language |
1155
+ | `--explain` | boolean | no | Print the rendered context block + template body alongside the trace + LLM output |
1156
+ | `--timeout` | number | no (default 90 s) | Override the companion-client timeout in seconds. Negative / zero / non-numeric falls back to the default |
1157
+
1158
+ ## Exit codes
1159
+
1160
+ | Exit | Meaning |
1161
+ |------|------------------------------------------------------------------------------------------|
1162
+ | 0 | Generation succeeded; LLM output printed to stdout |
1163
+ | 1 | Scope gate failed (cwd not inside a SaaS app), missing `--template`, or companion call rejected (renderer error: missing required input / unknown ref / unknown placeholder / template not found / LLM failure / timeout) |
1164
+
1165
+ The CLI never partial-prints — either the full LLM output renders
1166
+ or the error path runs and nothing else.
1167
+
1168
+ ## Soft-warning behavior
1169
+
1170
+ When the operator passes `--icp`, `--benefit`, `--channel`, or
1171
+ `--objection` and the template's `requiredInputs[]` does **not**
1172
+ declare the corresponding kind, the renderer ignores the ref and
1173
+ the CLI prints a single `Template "<ref>" did not consume:
1174
+ --<flag>, … — these flags were ignored.` warning. Generation
1175
+ still succeeds. `--feature` is intentionally excluded from the
1176
+ warning because it anchors the context-block intent picker
1177
+ (feature-scoped vs ICP-scoped sections) instead of placeholder
1178
+ substitution.
1179
+
1180
+ ## Default timeout
1181
+
1182
+ `MARKET_COMPANION_DEFAULT_TIMEOUT_MS = 90_000` — see
1183
+ `cli.market.utils` source span. The constant lives in
1184
+ `market-command.utils.ts`. The deprecated alias
1185
+ `MARKET_COMPANION_TIMEOUT_MS` is kept for any caller that imported
1186
+ the original symbol; it points at the same value.
1187
+
1188
+ ## Process boundary
1189
+
1190
+ ```
1191
+ wildo market generate
1192
+ │
1193
+ ▼
1194
+ POST /api/companion/market/generate
1195
+ │
1196
+ ▼
1197
+ MarketGenerationCompanionService (parent process)
1198
+ │
1199
+ ├─► spawn introspection subprocess
1200
+ │ │
1201
+ │ ▼
1202
+ │ renderMarketPrompt(...) (companion.market.prompt-renderer)
1203
+ │ │ - loads snapshot
1204
+ │ │ - validates snapshot
1205
+ │ │ - looks up template by ref
1206
+ │ │ - enforces requiredInputs[]
1207
+ │ │ - builds context block
1208
+ │ │ - substitutes Mustache vars
1209
+ │ ▼
1210
+ │ { prompt, contextBlock, renderedTemplate, trace }
1211
+ │
1212
+ └─► AgentsBackendService.invokeAgent(market.generation.agent, prompt)
1213
+ │
1214
+ ▼
1215
+ { output }
1216
+ │
1217
+ ▼
1218
+ MarketGenerationResponse (single shared Zod schema —
1219
+ market.generation.response)
1220
+ │
1221
+ ▼
1222
+ stdout (LLM output + trace headline; full prompt + block when --explain)
1223
+ ```
1224
+
1225
+ The subprocess is the only place that touches the snapshot. The
1226
+ parent process never reads the snapshot, never knows the template
1227
+ shape, and never sees the validator — its job is the LLM round-trip
1228
+ plus the response shape. This split is the authoring-time vs
1229
+ runtime boundary that keeps the CLI fast, the renderer pure, and
1230
+ the LLM-call surface narrow.