@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.
- package/LICENSE +34 -0
- package/dist/esm/.builder.pid +9 -0
- package/dist/esm/framework-knowledge.definitions.d.ts +51 -0
- package/dist/esm/framework-knowledge.definitions.d.ts.map +1 -0
- package/dist/esm/framework-knowledge.definitions.js +1571 -0
- package/dist/esm/framework-knowledge.definitions.js.map +1 -0
- package/dist/esm/framework-knowledge.loader.d.ts +72 -0
- package/dist/esm/framework-knowledge.loader.d.ts.map +1 -0
- package/dist/esm/framework-knowledge.loader.js +258 -0
- package/dist/esm/framework-knowledge.loader.js.map +1 -0
- package/dist/esm/framework-knowledge.schemas.d.ts +236 -0
- package/dist/esm/framework-knowledge.schemas.d.ts.map +1 -0
- package/dist/esm/framework-knowledge.schemas.js +23 -0
- package/dist/esm/framework-knowledge.schemas.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts +53 -0
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js +56 -0
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts +200 -0
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js +228 -0
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts +39 -0
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js +39 -0
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts +261 -0
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js +412 -0
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts +61 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js +65 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts +53 -0
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js +54 -0
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts +43 -0
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js +73 -0
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts +53 -0
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js +114 -0
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts +95 -0
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js +102 -0
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts +258 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.js +241 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts +241 -0
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js +202 -0
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts +82 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js +89 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts +56 -0
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.js +76 -0
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.d.ts +30 -0
- package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.js +27 -0
- package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.market-research/playbook.definition.d.ts +31 -0
- package/dist/esm/playbooks/top_down.market-research/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.market-research/playbook.definition.js +26 -0
- package/dist/esm/playbooks/top_down.market-research/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts +254 -0
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js +219 -0
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts +180 -0
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js +302 -0
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts +249 -0
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js +286 -0
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts +248 -0
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js +227 -0
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts +45 -0
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js +48 -0
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts +250 -0
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js +218 -0
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js.map +1 -0
- package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/authority-basis.json +1 -0
- package/dist/knowledge/manifest.json +45 -0
- package/dist/knowledge/playbooks/bottom_up.build-decompose/method.md +407 -0
- package/dist/knowledge/playbooks/bottom_up.build-decompose/playbook.json +69 -0
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/method.md +556 -0
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/playbook.json +47 -0
- package/dist/knowledge/playbooks/bottom_up.build-scale/method.md +344 -0
- package/dist/knowledge/playbooks/bottom_up.build-scale/playbook.json +43 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/method.md +259 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/playbook.json +83 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.foundation/method.md +321 -0
- package/dist/knowledge/playbooks/bottom_up.foundation/playbook.json +79 -0
- package/dist/knowledge/playbooks/bottom_up.placement-plan/method.md +185 -0
- package/dist/knowledge/playbooks/bottom_up.placement-plan/playbook.json +66 -0
- package/dist/knowledge/playbooks/refinement.compliance-document-candidate/method.md +737 -0
- package/dist/knowledge/playbooks/refinement.compliance-document-candidate/playbook.json +44 -0
- package/dist/knowledge/playbooks/refinement.document-facts/method.md +261 -0
- package/dist/knowledge/playbooks/refinement.document-facts/playbook.json +57 -0
- package/dist/knowledge/playbooks/top_down.brand-identity/method.md +151 -0
- package/dist/knowledge/playbooks/top_down.brand-identity/playbook.json +124 -0
- package/dist/knowledge/playbooks/top_down.business-model/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.business-model/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.business-model/method.md +128 -0
- package/dist/knowledge/playbooks/top_down.business-model/playbook.json +102 -0
- package/dist/knowledge/playbooks/top_down.business-model/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.capability-map/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.capability-map/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.capability-map/method.md +239 -0
- package/dist/knowledge/playbooks/top_down.capability-map/playbook.json +73 -0
- package/dist/knowledge/playbooks/top_down.capability-map/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.compliance-posture/method.md +177 -0
- package/dist/knowledge/playbooks/top_down.compliance-posture/playbook.json +95 -0
- package/dist/knowledge/playbooks/top_down.market-analysis/method.md +64 -0
- package/dist/knowledge/playbooks/top_down.market-analysis/playbook.json +49 -0
- package/dist/knowledge/playbooks/top_down.market-evidence-adequacy/method.md +56 -0
- package/dist/knowledge/playbooks/top_down.market-evidence-adequacy/playbook.json +40 -0
- package/dist/knowledge/playbooks/top_down.market-research/method.md +68 -0
- package/dist/knowledge/playbooks/top_down.market-research/playbook.json +42 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/method.md +239 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/playbook.json +69 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.phase-gate/method.md +96 -0
- package/dist/knowledge/playbooks/top_down.phase-gate/playbook.json +77 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/method.md +53 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/playbook.json +61 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/method.md +280 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/playbook.json +87 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.value-proposition/method.md +204 -0
- package/dist/knowledge/playbooks/top_down.value-proposition/playbook.json +54 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/method.md +146 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/playbook.json +120 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/structured-artifact-action.json +1 -0
- package/dist/knowledge/references/application.database.migration-change-risk.md +28 -0
- package/dist/knowledge/references/assertions.authored-metadata.config.md +90 -0
- package/dist/knowledge/references/assertions.behaviors.wire-contracts.md +223 -0
- package/dist/knowledge/references/assertions.references.conventions.md +92 -0
- package/dist/knowledge/references/assertions.snapshot.validation.md +317 -0
- package/dist/knowledge/references/assertions.specification.config.md +287 -0
- package/dist/knowledge/references/brand.asset.config.md +167 -0
- package/dist/knowledge/references/brand.authored-metadata.config.md +51 -0
- package/dist/knowledge/references/brand.logo-direction.config.md +88 -0
- package/dist/knowledge/references/brand.name.config.md +46 -0
- package/dist/knowledge/references/brand.snapshot.config.md +76 -0
- package/dist/knowledge/references/brand.snapshot.validation.md +446 -0
- package/dist/knowledge/references/brand.visual-tone.config.md +56 -0
- package/dist/knowledge/references/build-plan.task-graph.config.md +198 -0
- package/dist/knowledge/references/business-model.authored-metadata.config.md +65 -0
- package/dist/knowledge/references/business-model.pricing-plan.config.md +122 -0
- package/dist/knowledge/references/business-model.references.conventions.md +99 -0
- package/dist/knowledge/references/business-model.snapshot.config.md +121 -0
- package/dist/knowledge/references/business-model.snapshot.validation.md +325 -0
- package/dist/knowledge/references/cli.market.generate-command.md +230 -0
- package/dist/knowledge/references/cli.market.utils.md +147 -0
- package/dist/knowledge/references/companion.introspection.behaviors.market.md +90 -0
- package/dist/knowledge/references/companion.introspection.handlers.market.md +42 -0
- package/dist/knowledge/references/companion.market.generation-service.md +270 -0
- package/dist/knowledge/references/companion.market.prompt-renderer.md +244 -0
- package/dist/knowledge/references/companion.technical-doc.service.md +809 -0
- package/dist/knowledge/references/engine.client-bundle.allow-list.md +125 -0
- package/dist/knowledge/references/engine.client-bundle.discipline.md +130 -0
- package/dist/knowledge/references/engine.client-bundle.external-connectors-public.discipline.md +55 -0
- package/dist/knowledge/references/engine.saas-technical-doc.config.md +215 -0
- package/dist/knowledge/references/engine.saas-website.config.md +331 -0
- package/dist/knowledge/references/example.authorization.unit-narrowing.declaration.md +24 -0
- package/dist/knowledge/references/example.backend.addon-wiring.module.md +55 -0
- package/dist/knowledge/references/example.backend.custom-operation.create-postfix.md +35 -0
- package/dist/knowledge/references/example.backend.operation.error-throw.md +17 -0
- package/dist/knowledge/references/example.config.app-shell.command-menu-items.md +63 -0
- package/dist/knowledge/references/example.config.app-shell.full.md +147 -0
- package/dist/knowledge/references/example.config.app-shell.hosted-components.md +45 -0
- package/dist/knowledge/references/example.config.app-shell.quick-switcher-fields.md +37 -0
- package/dist/knowledge/references/example.config.backend.billing-enable.md +20 -0
- package/dist/knowledge/references/example.config.backend.required-floors.md +46 -0
- package/dist/knowledge/references/example.config.design-system.full.md +162 -0
- package/dist/knowledge/references/example.config.navigation.full.md +71 -0
- package/dist/knowledge/references/example.config.provider.backend-scope-billing.md +27 -0
- package/dist/knowledge/references/example.data-seeding.minimal.md +114 -0
- package/dist/knowledge/references/example.email.template.minimal.md +54 -0
- package/dist/knowledge/references/example.engine.component-registration.lazy-load.md +16 -0
- package/dist/knowledge/references/example.engine.product-definitions.feature-and-profiles.md +146 -0
- package/dist/knowledge/references/example.flows-actors.chat-assistant.md +196 -0
- package/dist/knowledge/references/example.flows-actors.llm-agent-one-shot.md +174 -0
- package/dist/knowledge/references/example.i18n.label-generation.engine-barrel.md +15 -0
- package/dist/knowledge/references/example.infra.cdn.cloudflare.md +23 -0
- package/dist/knowledge/references/example.infra.cdn.generic.md +17 -0
- package/dist/knowledge/references/example.infra.environment-config.local.md +250 -0
- package/dist/knowledge/references/example.market.alternative.in-house-build.md +49 -0
- package/dist/knowledge/references/example.market.authored-metadata.md +32 -0
- package/dist/knowledge/references/example.market.buying-journey.core-icp.md +140 -0
- package/dist/knowledge/references/example.market.category.config.md +71 -0
- package/dist/knowledge/references/example.market.channel.community.md +39 -0
- package/dist/knowledge/references/example.market.feature-benefit.kano-threshold.md +67 -0
- package/dist/knowledge/references/example.market.feature-benefit.pain-reliever.md +65 -0
- package/dist/knowledge/references/example.market.icp.anti-target.md +47 -0
- package/dist/knowledge/references/example.market.icp.individual.md +82 -0
- package/dist/knowledge/references/example.market.icp.legal-entity-with-geographies.md +95 -0
- package/dist/knowledge/references/example.market.is-benefit-available.composition.md +40 -0
- package/dist/knowledge/references/example.market.job.emotional.md +27 -0
- package/dist/knowledge/references/example.market.job.functional.md +28 -0
- package/dist/knowledge/references/example.market.message-template.seeds.md +106 -0
- package/dist/knowledge/references/example.market.objection.pricing.md +39 -0
- package/dist/knowledge/references/example.market.persona.dmu-with-inheritance.md +62 -0
- package/dist/knowledge/references/example.market.persona.individual-self.md +51 -0
- package/dist/knowledge/references/example.market.positioning.per-icp.md +103 -0
- package/dist/knowledge/references/example.market.proof.metric.md +39 -0
- package/dist/knowledge/references/example.market.scoring.golden-case.md +46 -0
- package/dist/knowledge/references/example.market.scoring.no-coverage-zero.md +40 -0
- package/dist/knowledge/references/example.market.snapshot-validation.duplicate-journey-stage.md +36 -0
- package/dist/knowledge/references/example.market.snapshot-validation.errors-by-kind.md +55 -0
- package/dist/knowledge/references/example.market.snapshot-validation.objection-proof-benefit-mismatch.md +74 -0
- package/dist/knowledge/references/example.market.snapshot-validation.proof-without-support.md +32 -0
- package/dist/knowledge/references/example.market.snapshot-validation.threshold-without-job.md +44 -0
- package/dist/knowledge/references/example.market.snapshot.assembled.md +49 -0
- package/dist/knowledge/references/example.market.tone-of-voice.config.md +41 -0
- package/dist/knowledge/references/example.market.trigger.growth-milestone.md +43 -0
- package/dist/knowledge/references/example.module.companion-exports.full.md +142 -0
- package/dist/knowledge/references/example.module.registration.shared.md +16 -0
- package/dist/knowledge/references/example.module.relationships.actor-edge-back-to-scope-owner.md +47 -0
- package/dist/knowledge/references/example.module.relationships.discriminator.md +25 -0
- package/dist/knowledge/references/example.module.relationships.scope-membership-junction.md +25 -0
- package/dist/knowledge/references/example.provider.backend-module-shape.md +110 -0
- package/dist/knowledge/references/example.provider.contribution.backend-billing.md +12 -0
- package/dist/knowledge/references/example.provider.frontend-file-picker.contribution.md +30 -0
- package/dist/knowledge/references/example.provider.frontend-file-picker.module.md +21 -0
- package/dist/knowledge/references/example.rag.source-fields.declaration.md +83 -0
- package/dist/knowledge/references/example.rate-limit.custom-controller-surface.md +25 -0
- package/dist/knowledge/references/example.rate-limit.resource-operation-surface.md +24 -0
- package/dist/knowledge/references/example.resource.add-field.priority-enum.md +19 -0
- package/dist/knowledge/references/example.resource.add-resource.module-factory-map.md +21 -0
- package/dist/knowledge/references/example.resource.config-wiring.fk-relationship.md +33 -0
- package/dist/knowledge/references/example.resource.custom-view.read-host.md +28 -0
- package/dist/knowledge/references/example.resource.mcp-exposure.md +65 -0
- package/dist/knowledge/references/example.resource.reference-constraints.role-constrained.md +27 -0
- package/dist/knowledge/references/example.resource.ui-behavior.enum-badge.md +22 -0
- package/dist/knowledge/references/example.resource.ui-behavior.operation-icon.md +43 -0
- package/dist/knowledge/references/example.spec.composite-view.workspace.md +72 -0
- package/dist/knowledge/references/example.spec.feature.flag-with-codehandling.md +64 -0
- package/dist/knowledge/references/example.spec.frontend-component.prop-vocabulary.md +88 -0
- package/dist/knowledge/references/example.spec.resource.semantic-field.md +23 -0
- package/dist/knowledge/references/example.views.app-level.composite-views-config.md +19 -0
- package/dist/knowledge/references/example.views.chart-view.resource-owned.md +69 -0
- package/dist/knowledge/references/example.views.composite-view.host-embeds.md +31 -0
- package/dist/knowledge/references/example.views.composite-view.workspace.md +65 -0
- package/dist/knowledge/references/example.views.custom-view.execution-host.md +41 -0
- package/dist/knowledge/references/example.views.execution-view.resource-owned.md +25 -0
- package/dist/knowledge/references/external-connectors.app.frontend-provider-module.md +42 -0
- package/dist/knowledge/references/market.alternative.config.md +68 -0
- package/dist/knowledge/references/market.alternative.kind.md +32 -0
- package/dist/knowledge/references/market.authored-metadata.config.md +64 -0
- package/dist/knowledge/references/market.buying-journey.config.md +43 -0
- package/dist/knowledge/references/market.buying-journey.stage.md +33 -0
- package/dist/knowledge/references/market.category.config.md +63 -0
- package/dist/knowledge/references/market.channel.config.md +59 -0
- package/dist/knowledge/references/market.channel.kind.md +49 -0
- package/dist/knowledge/references/market.context-block.builder.md +544 -0
- package/dist/knowledge/references/market.context-block.response.md +57 -0
- package/dist/knowledge/references/market.feature-benefit.config.md +84 -0
- package/dist/knowledge/references/market.feature-benefit.kano.md +41 -0
- package/dist/knowledge/references/market.gain.config.md +50 -0
- package/dist/knowledge/references/market.generation.response.md +108 -0
- package/dist/knowledge/references/market.icp.config.md +162 -0
- package/dist/knowledge/references/market.icp.geographic-targeting.md +57 -0
- package/dist/knowledge/references/market.inherit-from.md +74 -0
- package/dist/knowledge/references/market.is-benefit-available.md +58 -0
- package/dist/knowledge/references/market.job.config.md +48 -0
- package/dist/knowledge/references/market.message-template.config.md +86 -0
- package/dist/knowledge/references/market.objection.config.md +56 -0
- package/dist/knowledge/references/market.objection.kind.md +34 -0
- package/dist/knowledge/references/market.pain.config.md +50 -0
- package/dist/knowledge/references/market.persona.config.md +64 -0
- package/dist/knowledge/references/market.positioning.config.md +84 -0
- package/dist/knowledge/references/market.proof.config.md +48 -0
- package/dist/knowledge/references/market.proof.kind.md +34 -0
- package/dist/knowledge/references/market.references.weighted-edges.md +105 -0
- package/dist/knowledge/references/market.scoring.fit.md +215 -0
- package/dist/knowledge/references/market.snapshot.config.md +34 -0
- package/dist/knowledge/references/market.snapshot.validation.md +1171 -0
- package/dist/knowledge/references/market.tone-of-voice.config.md +80 -0
- package/dist/knowledge/references/market.trigger.config.md +45 -0
- package/dist/knowledge/references/market.trigger.kind.md +35 -0
- package/dist/knowledge/references/placement-plan.config.md +330 -0
- package/dist/knowledge/references/platform.config.application-database.md +74 -0
- package/dist/knowledge/references/platform.config.application-modules.md +30 -0
- package/dist/knowledge/references/platform.config.backing-services.md +266 -0
- package/dist/knowledge/references/platform.config.cdn.md +167 -0
- package/dist/knowledge/references/platform.config.environment.deployment.md +263 -0
- package/dist/knowledge/references/platform.config.saas.md +405 -0
- package/dist/knowledge/references/presets.models.design-system.configuration.md +59 -0
- package/dist/knowledge/references/presets.models.design-system.source-config.md +72 -0
- package/dist/knowledge/references/presets.models.labelling.sections.md +64 -0
- package/dist/knowledge/references/presets.models.material.profile-contract.md +192 -0
- package/dist/knowledge/references/presets.models.material.runtime-policy.md +60 -0
- package/dist/knowledge/references/presets.models.surface-policy.defaults.md +613 -0
- package/dist/knowledge/references/presets.models.surface-policy.md +534 -0
- package/dist/knowledge/references/presets.models.surface-variant.md +56 -0
- package/dist/knowledge/references/requirements.authored-metadata.config.md +64 -0
- package/dist/knowledge/references/requirements.functional-requirement.config.md +68 -0
- package/dist/knowledge/references/requirements.non-functional-requirement.config.md +100 -0
- package/dist/knowledge/references/requirements.references.conventions.md +125 -0
- package/dist/knowledge/references/requirements.snapshot.config.md +73 -0
- package/dist/knowledge/references/requirements.snapshot.validation.md +333 -0
- package/dist/knowledge/references/roadmap.authored-metadata.config.md +64 -0
- package/dist/knowledge/references/roadmap.phase.config.md +149 -0
- package/dist/knowledge/references/roadmap.references.conventions.md +89 -0
- package/dist/knowledge/references/roadmap.snapshot.config.md +65 -0
- package/dist/knowledge/references/roadmap.snapshot.validation.md +325 -0
- package/dist/knowledge/references/saas.backend.app-config.backend-authored.md +32 -0
- package/dist/knowledge/references/saas.backend.application-initialization.assembly.md +38 -0
- package/dist/knowledge/references/saas.backend.billing.resolution-failure-reasons.md +45 -0
- package/dist/knowledge/references/saas.backend.custom-operation.authoritative-fields.md +53 -0
- package/dist/knowledge/references/saas.backend.custom-operation.transactional-core.md +120 -0
- package/dist/knowledge/references/saas.backend.domain-module.md +237 -0
- package/dist/knowledge/references/saas.backend.email-template.definition.md +69 -0
- package/dist/knowledge/references/saas.backend.flows-actors.a2a-agent-card.md +89 -0
- package/dist/knowledge/references/saas.backend.flows-actors.a2a-task-surface.md +118 -0
- package/dist/knowledge/references/saas.backend.flows-actors.function-tool.md +82 -0
- package/dist/knowledge/references/saas.backend.flows-actors.invoke-agent.md +48 -0
- package/dist/knowledge/references/saas.backend.flows-actors.resource-read-tool.md +39 -0
- package/dist/knowledge/references/saas.backend.flows-actors.resource-write-tool.md +67 -0
- package/dist/knowledge/references/saas.backend.pdf-template.bindings.md +52 -0
- package/dist/knowledge/references/saas.backend.pdf-template.definition.md +113 -0
- package/dist/knowledge/references/saas.backend.rate-limit-service.check-policy.md +75 -0
- package/dist/knowledge/references/saas.backend.system-access-service.md +994 -0
- package/dist/knowledge/references/saas.data-seeding.admin-endpoints.md +59 -0
- package/dist/knowledge/references/saas.data-seeding.bootstrap-wiring.md +184 -0
- package/dist/knowledge/references/saas.data-seeding.definition-input.md +95 -0
- package/dist/knowledge/references/saas.data-seeding.modes.md +72 -0
- package/dist/knowledge/references/saas.data-seeding.run-ledger.md +198 -0
- package/dist/knowledge/references/saas.data-seeding.run-status.md +35 -0
- package/dist/knowledge/references/saas.data-seeding.schedule.md +91 -0
- package/dist/knowledge/references/saas.data-seeding.scope-iteration-strategy.md +46 -0
- package/dist/knowledge/references/saas.external-providers.backend-provider-registry.runtime-filter.md +55 -0
- package/dist/knowledge/references/saas.external-providers.document-extraction.applicability.md +26 -0
- package/dist/knowledge/references/saas.external-providers.embeddings.applicability.md +30 -0
- package/dist/knowledge/references/saas.external-providers.llm.model-configuration.md +124 -0
- package/dist/knowledge/references/saas.external-providers.llm.operation-key.md +49 -0
- package/dist/knowledge/references/saas.frontend.app-level-component.configuration.md +265 -0
- package/dist/knowledge/references/saas.frontend.app-level-component.vocabulary.md +148 -0
- package/dist/knowledge/references/saas.frontend.app-shell.hosted-components.md +145 -0
- package/dist/knowledge/references/saas.frontend.chart-view.inserted-declaration.md +80 -0
- package/dist/knowledge/references/saas.frontend.command-menu.omnibox.md +88 -0
- package/dist/knowledge/references/saas.frontend.command-menu.search-resource.md +109 -0
- package/dist/knowledge/references/saas.frontend.component-registration.entry.md +21 -0
- package/dist/knowledge/references/saas.frontend.composite-view.authoring.md +102 -0
- package/dist/knowledge/references/saas.frontend.composite-view.define-helper.md +31 -0
- package/dist/knowledge/references/saas.frontend.domain-module.md +31 -0
- package/dist/knowledge/references/saas.frontend.embedded-resource-descent.md +37 -0
- package/dist/knowledge/references/saas.frontend.execution-view.action-status-contract.md +172 -0
- package/dist/knowledge/references/saas.frontend.execution-view.action-status-contract.per-action-retry-loop.md +115 -0
- package/dist/knowledge/references/saas.frontend.execution-view.definition.md +172 -0
- package/dist/knowledge/references/saas.frontend.execution-view.dirty-bridge-contract.local-pane.md +109 -0
- package/dist/knowledge/references/saas.frontend.execution-view.dirty-bridge-contract.md +55 -0
- package/dist/knowledge/references/saas.frontend.execution-view.dirty-state-contract.md +151 -0
- package/dist/knowledge/references/saas.frontend.execution-view.failure-handling-contract.md +302 -0
- package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.md +89 -0
- package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.participation-prefetch.md +231 -0
- package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.participation-prefetch.shell-data-hydrator.md +174 -0
- package/dist/knowledge/references/saas.frontend.execution-view.navigation-handling-and-embedding.md +96 -0
- package/dist/knowledge/references/saas.frontend.execution-view.navigation-handling-and-embedding.resolution.md +45 -0
- package/dist/knowledge/references/saas.frontend.execution-view.outcome-emission-contract.md +71 -0
- package/dist/knowledge/references/saas.frontend.execution-view.participation-and-anchor.md +80 -0
- package/dist/knowledge/references/saas.frontend.execution-view.three-zone-contract.md +147 -0
- package/dist/knowledge/references/saas.frontend.flows-actors-view.md +40 -0
- package/dist/knowledge/references/saas.frontend.form-fields.file-provider-constraints.md +80 -0
- package/dist/knowledge/references/saas.frontend.full-custom-view.definition.md +64 -0
- package/dist/knowledge/references/saas.frontend.inserted-view.identity-bindings-descriptor.md +149 -0
- package/dist/knowledge/references/saas.frontend.operation-key-and-resource-config-like.md +63 -0
- package/dist/knowledge/references/saas.frontend.quick-switcher.scope-field.md +102 -0
- package/dist/knowledge/references/saas.frontend.related-resource-embeds.md +86 -0
- package/dist/knowledge/references/saas.frontend.related-resource-preview.md +23 -0
- package/dist/knowledge/references/saas.frontend.related-resource-sections.md +28 -0
- package/dist/knowledge/references/saas.frontend.resource-header-title.md +43 -0
- package/dist/knowledge/references/saas.frontend.resource-layout-templates.md +215 -0
- package/dist/knowledge/references/saas.frontend.resource-operation-frontend-config.md +531 -0
- package/dist/knowledge/references/saas.frontend.resource-ui-behavior-config.md +210 -0
- package/dist/knowledge/references/saas.frontend.resource-ui-behavior-preset-map.md +39 -0
- package/dist/knowledge/references/saas.frontend.settings-hub.engine-destinations.md +58 -0
- package/dist/knowledge/references/saas.frontend.settings-hub.placement.md +118 -0
- package/dist/knowledge/references/saas.frontend.view-definition-scope.md +42 -0
- package/dist/knowledge/references/saas.market.generation-agent.md +104 -0
- package/dist/knowledge/references/saas.models.core-resource-operation.md +86 -0
- package/dist/knowledge/references/saas.models.data-mode-read-list.md +395 -0
- package/dist/knowledge/references/saas.models.engine-capabilities.md +114 -0
- package/dist/knowledge/references/saas.models.error-type.md +45 -0
- package/dist/knowledge/references/saas.models.external-data-pipeline.md +162 -0
- package/dist/knowledge/references/saas.models.feature-limit-semantic.md +51 -0
- package/dist/knowledge/references/saas.models.flows-actors.agent-configuration.md +127 -0
- package/dist/knowledge/references/saas.models.flows-actors.agent-definition.md +115 -0
- package/dist/knowledge/references/saas.models.flows-actors.agent-invocation.md +52 -0
- package/dist/knowledge/references/saas.models.flows-actors.agent-prompt-spec.md +188 -0
- package/dist/knowledge/references/saas.models.http-api-binding.md +237 -0
- package/dist/knowledge/references/saas.models.navigation.layout.md +149 -0
- package/dist/knowledge/references/saas.models.organization-unit-narrowing-containment.md +22 -0
- package/dist/knowledge/references/saas.models.organization-unit-narrowing-declaration.md +42 -0
- package/dist/knowledge/references/saas.models.polymorphism.optout-business-key.md +62 -0
- package/dist/knowledge/references/saas.models.polymorphism.variant-definition.md +74 -0
- package/dist/knowledge/references/saas.models.provider-capabilities.md +97 -0
- package/dist/knowledge/references/saas.models.rate-limit-configuration.md +67 -0
- package/dist/knowledge/references/saas.models.relationship-handling-contract.md +30 -0
- package/dist/knowledge/references/saas.models.relationship-handling-settings.md +62 -0
- package/dist/knowledge/references/saas.models.relationship-nature-and-models.md +112 -0
- package/dist/knowledge/references/saas.models.resource-config.builder-parameters.md +431 -0
- package/dist/knowledge/references/saas.models.resource-config.forwarded-label.md +88 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-api-call.md +89 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-base.md +79 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-mcp-exposure.md +49 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-path.md +27 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-union.md +26 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-variant-for-key.md +62 -0
- package/dist/knowledge/references/saas.models.resource-config.resource-configuration.md +124 -0
- package/dist/knowledge/references/saas.models.resource-config.resource-relationships-buckets.md +38 -0
- package/dist/knowledge/references/saas.models.resource-config.resources-registry.md +69 -0
- package/dist/knowledge/references/saas.models.resource-config.searchable-relation.md +89 -0
- package/dist/knowledge/references/saas.models.resource-config.system-access-policy.md +121 -0
- package/dist/knowledge/references/saas.models.resource-config.token-generation.md +145 -0
- package/dist/knowledge/references/saas.models.resource-field-identifier.md +25 -0
- package/dist/knowledge/references/saas.models.resource-operation-display-risk.md +77 -0
- package/dist/knowledge/references/saas.models.resource-operation-variant-runtime.md +58 -0
- package/dist/knowledge/references/saas.models.resource-primary-scope.md +36 -0
- package/dist/knowledge/references/saas.models.resource-relationship-access-scope.md +26 -0
- package/dist/knowledge/references/saas.models.resource-relationship-builder-parameters.md +100 -0
- package/dist/knowledge/references/saas.models.resource-relationship-cardinality.md +57 -0
- package/dist/knowledge/references/saas.models.resource-relationship-declaration.md +69 -0
- package/dist/knowledge/references/saas.models.resource-relationship-resolved-semantics.md +60 -0
- package/dist/knowledge/references/saas.models.resource-relationship-schema.md +172 -0
- package/dist/knowledge/references/saas.models.resource-server-instance.md +109 -0
- package/dist/knowledge/references/saas.models.resource-type.md +24 -0
- package/dist/knowledge/references/saas.models.schema-family-builder.md +242 -0
- package/dist/knowledge/references/saas.models.scope-membership.md +143 -0
- package/dist/knowledge/references/saas.models.shared-domain-module.md +36 -0
- package/dist/knowledge/references/saas.models.shared-saas-module.md +36 -0
- package/dist/knowledge/references/saas.public-runtime.contract.md +229 -0
- package/dist/knowledge/references/saas.rag.retrieval-bounds.md +106 -0
- package/dist/knowledge/references/saas.rag.retrieval-refusals.md +89 -0
- package/dist/knowledge/references/saas.rag.retrieval-request.md +130 -0
- package/dist/knowledge/references/saas.rag.retrieval-result.md +147 -0
- package/dist/knowledge/references/saas.rag.retrieval-scores.md +54 -0
- package/dist/knowledge/references/saas.specifications.application-document-fact-specification.contract.md +59 -0
- package/dist/knowledge/references/saas.specifications.application-document-publication.contract.md +74 -0
- package/dist/knowledge/references/saas.specifications.assurance-document-blueprint.contract.md +1158 -0
- package/dist/knowledge/references/saas.specifications.assurance-program.contract.md +2602 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.catalog-spec-shared.md +180 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.discriminated-union.md +138 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-aggregate-offer.md +46 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-aggregate-rating.md +47 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-article.md +49 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-blog-posting.md +62 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-breadcrumb-list.md +46 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-faq-page.md +51 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-offer.md +46 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-organization.md +48 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-product.md +59 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-review.md +46 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-website.md +46 -0
- package/dist/knowledge/references/saas.specifications.companion-exports.contract.md +530 -0
- package/dist/knowledge/references/saas.specifications.composite-view-specification.md +49 -0
- package/dist/knowledge/references/saas.specifications.error-message-specification.md +92 -0
- package/dist/knowledge/references/saas.specifications.family-specifications.md +109 -0
- package/dist/knowledge/references/saas.specifications.feature-specification.md +93 -0
- package/dist/knowledge/references/saas.specifications.frontend-component-spec-factory.md +113 -0
- package/dist/knowledge/references/saas.specifications.frontend-component-spec-model.md +366 -0
- package/dist/knowledge/references/saas.specifications.resource-frontend-configuration-aspect.md +41 -0
- package/dist/knowledge/references/saas.specifications.resource-operation-spec.md +1978 -0
- package/dist/knowledge/references/saas.specifications.resource-pdf-template-spec.md +58 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-code-handling.md +49 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-config.md +156 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-factory.md +171 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-frontend-config-type.md +54 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-frontend-prose.md +171 -0
- package/dist/knowledge/references/saas.website.astro.bridge.md +262 -0
- package/dist/knowledge/references/saas.website.astro.head-renderer.md +271 -0
- package/dist/knowledge/references/saas.website.astro.headers-renderer.md +41 -0
- package/dist/knowledge/references/saas.website.astro.i18n-helper.md +121 -0
- package/dist/knowledge/references/saas.website.astro.label-key-collector.md +117 -0
- package/dist/knowledge/references/saas.website.astro.label-loader.md +377 -0
- package/dist/knowledge/references/saas.website.astro.llms-txt-server.md +46 -0
- package/dist/knowledge/references/saas.website.astro.pick-labels-for-page.md +90 -0
- package/dist/knowledge/references/saas.website.astro.robots-renderer.md +174 -0
- package/dist/knowledge/references/saas.website.astro.runtime-helper.md +187 -0
- package/dist/knowledge/references/saas.website.astro.site-context.md +141 -0
- package/dist/knowledge/references/saas.website.astro.sitemap-coverage.md +188 -0
- package/dist/knowledge/references/saas.website.astro.structured-data-renderer.md +174 -0
- package/dist/knowledge/references/saas.website.blog.bridge.md +396 -0
- package/dist/knowledge/references/saas.website.blog.collection-config.md +180 -0
- package/dist/knowledge/references/saas.website.blog.frontmatter.md +116 -0
- package/dist/knowledge/references/saas.website.blog.head-renderer.md +292 -0
- package/dist/knowledge/references/saas.website.blog.mdx-provider.md +100 -0
- package/dist/knowledge/references/saas.website.blog.post-renderer.md +291 -0
- package/dist/knowledge/references/saas.website.design-tokens.bundle.md +29 -0
- package/dist/knowledge/references/saas.website.design-tokens.colors.md +64 -0
- package/dist/knowledge/references/saas.website.design-tokens.radius.md +38 -0
- package/dist/knowledge/references/saas.website.factories.define-page-manifest.md +98 -0
- package/dist/knowledge/references/saas.website.factories.define-section.md +128 -0
- package/dist/knowledge/references/saas.website.label-keys.compose-helper.md +36 -0
- package/dist/knowledge/references/saas.website.label-keys.format.md +67 -0
- package/dist/knowledge/references/saas.website.label-pack.validator.md +206 -0
- package/dist/knowledge/references/saas.website.page-layout.component.md +217 -0
- package/dist/knowledge/references/saas.website.page-manifest.meta-label-keys.md +47 -0
- package/dist/knowledge/references/saas.website.page-manifest.route-path.md +49 -0
- package/dist/knowledge/references/saas.website.page-manifest.schema.md +186 -0
- package/dist/knowledge/references/saas.website.page-manifest.seo.md +46 -0
- package/dist/knowledge/references/saas.website.page.context.md +57 -0
- package/dist/knowledge/references/saas.website.primitives.button.md +123 -0
- package/dist/knowledge/references/saas.website.primitives.heading.md +103 -0
- package/dist/knowledge/references/saas.website.primitives.image.md +103 -0
- package/dist/knowledge/references/saas.website.primitives.internal-button.md +151 -0
- package/dist/knowledge/references/saas.website.primitives.internal-link.md +193 -0
- package/dist/knowledge/references/saas.website.primitives.link.md +78 -0
- package/dist/knowledge/references/saas.website.primitives.text.md +82 -0
- package/dist/knowledge/references/saas.website.refs.page.md +56 -0
- package/dist/knowledge/references/saas.website.refs.section.md +57 -0
- package/dist/knowledge/references/saas.website.root-config.navigation.md +37 -0
- package/dist/knowledge/references/saas.website.root-config.schema.md +192 -0
- package/dist/knowledge/references/saas.website.root-config.seo.md +98 -0
- package/dist/knowledge/references/saas.website.routing.localized-path.md +84 -0
- package/dist/knowledge/references/saas.website.runtime.context.md +174 -0
- package/dist/knowledge/references/saas.website.section.component.md +138 -0
- package/dist/knowledge/references/saas.website.section.context.md +63 -0
- package/dist/knowledge/references/saas.website.sections.category-enum.md +72 -0
- package/dist/knowledge/references/saas.website.sections.definition-schema.md +121 -0
- package/dist/knowledge/references/saas.website.seo.llms-txt-config.md +37 -0
- package/dist/knowledge/references/saas.website.seo.robots-config.md +106 -0
- package/dist/knowledge/references/saas.website.seo.sitemap-config.md +73 -0
- package/dist/knowledge/references/saas.website.structured-data.payload-shape.md +71 -0
- package/dist/knowledge/references/saas.website.use-label-by-key.hook.md +45 -0
- package/dist/knowledge/references/saas.website.use-label.hook.md +82 -0
- package/dist/knowledge/references/saas.website.use-page.hook.md +30 -0
- package/dist/knowledge/references/saas.website.use-runtime.hook.md +36 -0
- package/dist/knowledge/references/saas.website.use-section.hook.md +30 -0
- package/dist/knowledge/references/saas.website.use-tokens.hook.md +32 -0
- package/dist/knowledge/references/vision.authored-metadata.config.md +64 -0
- package/dist/knowledge/references/vision.constraint.config.md +66 -0
- package/dist/knowledge/references/vision.idea.config.md +45 -0
- package/dist/knowledge/references/vision.mission.config.md +46 -0
- package/dist/knowledge/references/vision.problem.config.md +51 -0
- package/dist/knowledge/references/vision.references.conventions.md +115 -0
- package/dist/knowledge/references/vision.snapshot.config.md +85 -0
- package/dist/knowledge/references/vision.snapshot.validation.md +226 -0
- package/dist/knowledge/references/vision.success-criterion.config.md +60 -0
- package/dist/knowledge/references/zod.decorators.chainable-runtime.md +550 -0
- package/dist/knowledge/references/zod.decorators.conditional-visibility.md +104 -0
- package/dist/knowledge/references/zod.decorators.data-categories.md +197 -0
- package/dist/knowledge/references/zod.decorators.decorator-vocabulary.md +436 -0
- package/dist/knowledge/references/zod.decorators.display-edit-modes.md +174 -0
- package/dist/knowledge/references/zod.decorators.enums.frontend-handling.md +101 -0
- package/dist/knowledge/references/zod.decorators.field-spec-params.md +317 -0
- package/dist/knowledge/references/zod.decorators.file-generation.md +36 -0
- package/dist/knowledge/references/zod.decorators.file-rag-source.md +56 -0
- package/dist/knowledge/references/zod.decorators.file-schema.md +319 -0
- package/dist/knowledge/references/zod.decorators.foreign-key-display-mode.md +83 -0
- package/dist/knowledge/references/zod.decorators.per-primitive-ui.md +459 -0
- package/dist/knowledge/references/zod.decorators.primitive-ui.md +123 -0
- package/dist/knowledge/references/zod.decorators.rag-source.md +164 -0
- package/dist/knowledge/references/zod.decorators.schema-metadata.md +122 -0
- package/dist/knowledge/references/zod.decorators.shared-structural-methods.md +152 -0
- package/dist/knowledge/references/zod.decorators.shared-structural-params.md +314 -0
- package/dist/knowledge/references/zod.decorators.structural-lifecycle-params.md +529 -0
- package/dist/knowledge/references/zod.factories.bigdecimal.md +155 -0
- package/dist/knowledge/references/zod.factories.code.md +127 -0
- package/dist/knowledge/references/zod.factories.duration.md +246 -0
- package/dist/knowledge/references/zod.factories.money.md +166 -0
- package/dist/knowledge/references/zod.factories.phone.md +88 -0
- package/dist/knowledge/references/zod.factories.range.md +174 -0
- package/dist/knowledge/registries/assurance-authority-bases.json +15 -0
- package/dist/knowledge/registries/framework-topics.json +5212 -0
- package/dist/knowledge/registries/playbooks.json +488 -0
- package/dist/knowledge/registries/source-tags.json +7664 -0
- package/dist/knowledge/rules/resource-schema-awareness.md +77 -0
- package/dist/knowledge/skills/INDEX.md +349 -0
- package/dist/knowledge/skills/application-consumer-documentation-authoring/SKILL.md +415 -0
- package/dist/knowledge/skills/application-consumer-documentation-authoring/examples/domain-use-case-and-admin-task.example.md +49 -0
- package/dist/knowledge/skills/application-consumer-documentation-authoring/references/source-and-ownership-routing.md +52 -0
- package/dist/knowledge/skills/application-database-migrations/SKILL.md +218 -0
- package/dist/knowledge/skills/application-database-migrations/references/framework-application-database-api.md +84 -0
- package/dist/knowledge/skills/application-database-migrations/references/framework-migration-change-risk-api.md +37 -0
- package/dist/knowledge/skills/application-database-migrations/references/migration-refusals.md +64 -0
- package/dist/knowledge/skills/application-database-migrations/references/postgresql-vs-mongodb-obligations.md +34 -0
- package/dist/knowledge/skills/authorization-unit-narrowing/SKILL.md +323 -0
- package/dist/knowledge/skills/authorization-unit-narrowing/references/framework-unit-narrowing-declaration-api.md +84 -0
- package/dist/knowledge/skills/backend-addon-wiring/SKILL.md +324 -0
- package/dist/knowledge/skills/backend-addon-wiring/references/backend-di-routing.md +7 -0
- package/dist/knowledge/skills/backend-addon-wiring/references/framework-backend-bootstrap-api.md +276 -0
- package/dist/knowledge/skills/backend-custom-operation/SKILL.md +374 -0
- package/dist/knowledge/skills/backend-custom-operation/references/framework-error-handling-api.md +118 -0
- package/dist/knowledge/skills/backend-custom-operation/references/framework-operation-base-and-path-api.md +107 -0
- package/dist/knowledge/skills/backend-custom-operation/references/framework-transactional-core-api.md +134 -0
- package/dist/knowledge/skills/backend-custom-operation/references/operation-file-conventions.md +10 -0
- package/dist/knowledge/skills/brand-logo-authoring/SKILL.md +192 -0
- package/dist/knowledge/skills/brand-logo-authoring/references/brand-authoring-decisions.md +55 -0
- package/dist/knowledge/skills/brand-logo-authoring/references/framework-brand-asset-api.md +184 -0
- package/dist/knowledge/skills/brand-logo-authoring/references/framework-brand-snapshot-api.md +279 -0
- package/dist/knowledge/skills/compliance-document-authoring/SKILL.md +346 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-governance.md +160 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-privacy-notice.md +518 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-service-terms.md +158 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-application-document-fact-specification-contract.md +95 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-application-document-publication-contract.md +100 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-assurance-document-blueprint-contract.md +1210 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-governed-document-after-drafting.md +40 -0
- package/dist/knowledge/skills/config-app-shell/SKILL.md +698 -0
- package/dist/knowledge/skills/config-app-shell/references/app-shell-surfaces.md +5 -0
- package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-api.md +415 -0
- package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-hosted-components-api.md +170 -0
- package/dist/knowledge/skills/config-app-shell/references/framework-command-menu-omnibox-api.md +212 -0
- package/dist/knowledge/skills/config-app-shell/references/framework-quick-switcher-scope-field-api.md +178 -0
- package/dist/knowledge/skills/config-design-system/SKILL.md +424 -0
- package/dist/knowledge/skills/config-design-system/references/design-system-file.md +10 -0
- package/dist/knowledge/skills/config-design-system/references/framework-design-system-configuration-api.md +77 -0
- package/dist/knowledge/skills/config-design-system/references/framework-material-profile-api.md +200 -0
- package/dist/knowledge/skills/config-design-system/references/framework-material-runtime-policy-api.md +68 -0
- package/dist/knowledge/skills/config-design-system/references/framework-surface-policy-api.md +1212 -0
- package/dist/knowledge/skills/config-design-system/references/surface-policy-authoring.md +92 -0
- package/dist/knowledge/skills/config-navigation/SKILL.md +249 -0
- package/dist/knowledge/skills/config-navigation/references/framework-navigation-layout-api.md +152 -0
- package/dist/knowledge/skills/config-navigation/references/navigation-zones.md +5 -0
- package/dist/knowledge/skills/config-saas/SKILL.md +209 -0
- package/dist/knowledge/skills/config-saas/references/framework-provider-capabilities-api.md +221 -0
- package/dist/knowledge/skills/config-saas/references/framework-wildo-saas-config-api.md +408 -0
- package/dist/knowledge/skills/config-saas/references/saas-config-scope.md +9 -0
- package/dist/knowledge/skills/config-saas-backend/SKILL.md +183 -0
- package/dist/knowledge/skills/config-saas-backend/references/framework-backend-authored-config-api.md +40 -0
- package/dist/knowledge/skills/configure-billing/SKILL.md +261 -0
- package/dist/knowledge/skills/configure-billing/references/config-chain-and-failure-map.md +90 -0
- package/dist/knowledge/skills/configure-billing/references/example-backend-provider-module-shape.md +122 -0
- package/dist/knowledge/skills/configure-billing/references/example-provider-contribution-and-backend-config.md +48 -0
- package/dist/knowledge/skills/configure-billing/references/framework-backend-provider-reachability-api.md +69 -0
- package/dist/knowledge/skills/configure-billing/references/framework-billing-resolution-failure-api.md +57 -0
- package/dist/knowledge/skills/email-add-template/SKILL.md +439 -0
- package/dist/knowledge/skills/email-add-template/references/email-artifact-paths.md +9 -0
- package/dist/knowledge/skills/email-add-template/references/framework-email-template-api.md +72 -0
- package/dist/knowledge/skills/email-definition-wiring/SKILL.md +62 -0
- package/dist/knowledge/skills/email-labels-authoring/SKILL.md +64 -0
- package/dist/knowledge/skills/email-template-authoring/SKILL.md +62 -0
- package/dist/knowledge/skills/engine-component-registration/SKILL.md +257 -0
- package/dist/knowledge/skills/engine-component-registration/references/component-registration-file.md +7 -0
- package/dist/knowledge/skills/engine-component-registration/references/framework-component-registration-api.md +24 -0
- package/dist/knowledge/skills/engine-product-definitions/SKILL.md +429 -0
- package/dist/knowledge/skills/engine-product-definitions/references/framework-engine-product-definitions-api.md +287 -0
- package/dist/knowledge/skills/engine-product-definitions/references/product-registry-scope.md +5 -0
- package/dist/knowledge/skills/flows-actors-a2a-exposure/SKILL.md +491 -0
- package/dist/knowledge/skills/flows-actors-a2a-exposure/references/framework-flows-actors-a2a-contract.md +227 -0
- package/dist/knowledge/skills/flows-actors-a2a-exposure/references/framework-named-a2a-agents-contract.md +143 -0
- package/dist/knowledge/skills/flows-actors-chat-assistant/SKILL.md +368 -0
- package/dist/knowledge/skills/flows-actors-chat-assistant/examples/todo-assistant.example.md +226 -0
- package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-flows-actors-tool-api.md +208 -0
- package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-flows-actors-view-api.md +286 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/SKILL.md +376 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-definition-api.md +262 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-invocation-api.md +130 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-prompt-spec-api.md +214 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-operation-and-model-api.md +195 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/operation-key-selection.md +60 -0
- package/dist/knowledge/skills/frontend-cdn-publish/SKILL.md +237 -0
- package/dist/knowledge/skills/frontend-cdn-publish/references/cloudflare-and-operator-setup.md +56 -0
- package/dist/knowledge/skills/frontend-cdn-publish/references/framework-cdn-config-api.md +176 -0
- package/dist/knowledge/skills/i18n-label-generation/SKILL.md +261 -0
- package/dist/knowledge/skills/i18n-label-generation/references/framework-labelling-sections-api.md +67 -0
- package/dist/knowledge/skills/i18n-label-generation/references/label-placement.md +7 -0
- package/dist/knowledge/skills/i18n-rerun-pipeline/SKILL.md +269 -0
- package/dist/knowledge/skills/i18n-rerun-pipeline/references/framework-labelling-sections-api.md +67 -0
- package/dist/knowledge/skills/i18n-rerun-pipeline/references/i18n-routing.md +9 -0
- package/dist/knowledge/skills/i18n-translation-rerun/SKILL.md +245 -0
- package/dist/knowledge/skills/i18n-translation-rerun/references/framework-labelling-sections-api.md +67 -0
- package/dist/knowledge/skills/i18n-translation-rerun/references/translation-workflow.md +17 -0
- package/dist/knowledge/skills/infra-environment-config/SKILL.md +646 -0
- package/dist/knowledge/skills/infra-environment-config/references/framework-application-database-api.md +77 -0
- package/dist/knowledge/skills/infra-environment-config/references/framework-backing-services-api.md +282 -0
- package/dist/knowledge/skills/infra-environment-config/references/framework-environment-deployment-api.md +265 -0
- package/dist/knowledge/skills/infra-environment-config/references/infra-config-files.md +7 -0
- package/dist/knowledge/skills/journey-approve/SKILL.md +43 -0
- package/dist/knowledge/skills/journey-bootstrap-scope/SKILL.md +42 -0
- package/dist/knowledge/skills/journey-next/SKILL.md +42 -0
- package/dist/knowledge/skills/journey-report/SKILL.md +43 -0
- package/dist/knowledge/skills/journey-run/SKILL.md +55 -0
- package/dist/knowledge/skills/journey-status/SKILL.md +50 -0
- package/dist/knowledge/skills/local-environment-bootstrap/SKILL.md +370 -0
- package/dist/knowledge/skills/local-environment-bootstrap/references/initialization-recovery-recipe.md +50 -0
- package/dist/knowledge/skills/local-environment-bootstrap/references/local-environment-troubleshooting.md +409 -0
- package/dist/knowledge/skills/local-environment-bootstrap/references/wildo-cli-bootstrap-commands.md +247 -0
- package/dist/knowledge/skills/market-add-feature-benefit/SKILL.md +474 -0
- package/dist/knowledge/skills/market-add-feature-benefit/references/framework-feature-benefit-api.md +139 -0
- package/dist/knowledge/skills/market-alternatives/SKILL.md +543 -0
- package/dist/knowledge/skills/market-authoring-overview/SKILL.md +354 -0
- package/dist/knowledge/skills/market-authoring-overview/references/framework-market-references-api.md +138 -0
- package/dist/knowledge/skills/market-authoring-overview/references/framework-market-snapshot-api.md +129 -0
- package/dist/knowledge/skills/market-category/SKILL.md +290 -0
- package/dist/knowledge/skills/market-channels/SKILL.md +361 -0
- package/dist/knowledge/skills/market-companion-prompt-enrichment/SKILL.md +2752 -0
- package/dist/knowledge/skills/market-companion-prompt-enrichment/references/framework-companion-behavior-api.md +2443 -0
- package/dist/knowledge/skills/market-generation-cli/SKILL.md +1484 -0
- package/dist/knowledge/skills/market-generation-cli/references/framework-market-generation-cli.md +1230 -0
- package/dist/knowledge/skills/market-icp/SKILL.md +625 -0
- package/dist/knowledge/skills/market-jobs-pains-gains/SKILL.md +352 -0
- package/dist/knowledge/skills/market-message-templates-authoring/SKILL.md +415 -0
- package/dist/knowledge/skills/market-message-templates-authoring/references/framework-message-template-api.md +1439 -0
- package/dist/knowledge/skills/market-persona/SKILL.md +407 -0
- package/dist/knowledge/skills/market-positioning-authoring/SKILL.md +392 -0
- package/dist/knowledge/skills/market-positioning-authoring/references/framework-positioning-api.md +97 -0
- package/dist/knowledge/skills/market-proof-and-objection/SKILL.md +665 -0
- package/dist/knowledge/skills/market-scoring-interpretation/SKILL.md +620 -0
- package/dist/knowledge/skills/market-scoring-interpretation/references/framework-scoring-api.md +291 -0
- package/dist/knowledge/skills/market-snapshot-validation/SKILL.md +1706 -0
- package/dist/knowledge/skills/market-snapshot-validation/references/framework-snapshot-validation-api.md +1228 -0
- package/dist/knowledge/skills/market-tone-of-voice/SKILL.md +260 -0
- package/dist/knowledge/skills/market-triggers-and-journey/SKILL.md +579 -0
- package/dist/knowledge/skills/module-companion-exports/SKILL.md +318 -0
- package/dist/knowledge/skills/module-companion-exports/references/companion-exports-by-package.md +544 -0
- package/dist/knowledge/skills/module-registration/SKILL.md +212 -0
- package/dist/knowledge/skills/module-registration/references/framework-domain-modules-api.md +366 -0
- package/dist/knowledge/skills/module-registration/references/registry-files.md +9 -0
- package/dist/knowledge/skills/module-relationships/SKILL.md +523 -0
- package/dist/knowledge/skills/module-relationships/references/cross-resource-fk-checklist.md +7 -0
- package/dist/knowledge/skills/module-relationships/references/framework-resource-relationship-authoring-api.md +738 -0
- package/dist/knowledge/skills/pdf-template-authoring/SKILL.md +174 -0
- package/dist/knowledge/skills/pdf-template-authoring/references/framework-pdf-template-api.md +203 -0
- package/dist/knowledge/skills/pdf-template-authoring/references/framework-pdf-template-spec-api.md +62 -0
- package/dist/knowledge/skills/provider-frontend-file-picker/SKILL.md +239 -0
- package/dist/knowledge/skills/provider-frontend-file-picker/references/framework-file-provider-constraints-api.md +90 -0
- package/dist/knowledge/skills/provider-frontend-file-picker/references/framework-frontend-provider-module-api.md +50 -0
- package/dist/knowledge/skills/rate-limit-authoring/SKILL.md +652 -0
- package/dist/knowledge/skills/rate-limit-authoring/references/framework-rate-limit-policy-api.md +182 -0
- package/dist/knowledge/skills/rate-limit-authoring/references/scope-key-and-bucket-conventions.md +137 -0
- package/dist/knowledge/skills/resource-add-field/SKILL.md +272 -0
- package/dist/knowledge/skills/resource-add-field/examples/add-priority-field-to-todos.example.md +153 -0
- package/dist/knowledge/skills/resource-add-field/references/framework-field-cross-layer-api.md +845 -0
- package/dist/knowledge/skills/resource-add-module/SKILL.md +322 -0
- package/dist/knowledge/skills/resource-add-module/references/framework-new-module-wiring-api.md +67 -0
- package/dist/knowledge/skills/resource-add-module/references/module-scaffold-layout.md +15 -0
- package/dist/knowledge/skills/resource-add-resource/SKILL.md +222 -0
- package/dist/knowledge/skills/resource-add-resource/references/framework-new-resource-core-config-api.md +540 -0
- package/dist/knowledge/skills/resource-add-resource/references/scaffold-surfaces-checklist.md +25 -0
- package/dist/knowledge/skills/resource-config-wiring/SKILL.md +370 -0
- package/dist/knowledge/skills/resource-config-wiring/references/config-change-routing.md +11 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-personal-data-declaration-api.md +622 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-operation-scope-enums-api.md +248 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-resource-config-api.md +1769 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-system-access-reads-api.md +1209 -0
- package/dist/knowledge/skills/resource-custom-view/SKILL.md +228 -0
- package/dist/knowledge/skills/resource-custom-view/references/custom-view-contracts.md +693 -0
- package/dist/knowledge/skills/resource-external-data/SKILL.md +349 -0
- package/dist/knowledge/skills/resource-external-data/references/framework-external-data-pipeline-api.md +187 -0
- package/dist/knowledge/skills/resource-external-data/references/framework-http-api-binding-api.md +261 -0
- package/dist/knowledge/skills/resource-external-data/references/lane-selection.md +49 -0
- package/dist/knowledge/skills/resource-external-data/references/pipeline-destination-schema.md +43 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/SKILL.md +308 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/references/framework-named-mcp-servers-contract.md +166 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/references/framework-resource-mcp-exposure-contract.md +63 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/references/mcp-catalogue-withdrawal-and-verification.md +77 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/references/mcp-client-registration-postures.md +90 -0
- package/dist/knowledge/skills/resource-rag-source-fields/SKILL.md +424 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/corpus-field-selection.md +90 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/framework-embeddings-capability-api.md +261 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/framework-file-rag-source-api.md +117 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/framework-rag-retrieval-api.md +597 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/framework-rag-source-decorator-api.md +181 -0
- package/dist/knowledge/skills/resource-schema-authoring/SKILL.md +318 -0
- package/dist/knowledge/skills/resource-schema-authoring/examples/add-enum-field-with-ui.example.md +132 -0
- package/dist/knowledge/skills/resource-schema-authoring/examples/basic-resource-schema.example.md +62 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/decorator-layer-map.md +63 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/field-type-selection.md +70 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-decorator-vocabulary-api.md +559 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-personal-data-category-api.md +245 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-polymorphic-resources-api.md +147 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-schema-family-api.md +247 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-decorator-methods-api.md +164 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-structural-params-api.md +327 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-special-factories-api.md +1286 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-zod-lifecycle-and-chainable-api.md +1080 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/polymorphic-per-scope-resources.md +75 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/schema-variants-and-discriminators.md +62 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/shared-layer-decorator-checklist.md +69 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/special-factories.md +45 -0
- package/dist/knowledge/skills/resource-ui-behavior/SKILL.md +389 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-conditional-visibility-api.md +106 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-display-edit-modes-api.md +176 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-enum-frontend-handling-api.md +103 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-foreign-key-ui-api.md +97 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-frontend-resource-ui-contracts-api.md +839 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-per-primitive-ui-api.md +461 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-primitive-ui-api.md +125 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-related-resource-embeds-api.md +245 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-resource-layout-templates-api.md +302 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/ui-layer-boundaries.md +13 -0
- package/dist/knowledge/skills/seeding-authoring/SKILL.md +569 -0
- package/dist/knowledge/skills/seeding-authoring/references/data-seeding-mode-picker.md +154 -0
- package/dist/knowledge/skills/seeding-authoring/references/framework-data-seeding-api.md +176 -0
- package/dist/knowledge/skills/seeding-operations/SKILL.md +505 -0
- package/dist/knowledge/skills/seeding-operations/references/data-seeding-admin-runbook.md +337 -0
- package/dist/knowledge/skills/seeding-operations/references/data-seeding-cron-scheduler.md +171 -0
- package/dist/knowledge/skills/seeding-operations/references/framework-data-seeding-operations-api.md +662 -0
- package/dist/knowledge/skills/settings-placement-authoring/SKILL.md +134 -0
- package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-destinations-catalog.md +65 -0
- package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-placement-api.md +127 -0
- package/dist/knowledge/skills/spec-catalog-authoring/SKILL.md +726 -0
- package/dist/knowledge/skills/spec-catalog-authoring/references/catalog-spec-pattern-overview.md +242 -0
- package/dist/knowledge/skills/spec-companion-exports/SKILL.md +362 -0
- package/dist/knowledge/skills/spec-companion-exports/references/companion-export-checklist.md +8 -0
- package/dist/knowledge/skills/spec-companion-exports/references/framework-companion-exports-contract-api.md +533 -0
- package/dist/knowledge/skills/spec-component-update/SKILL.md +315 -0
- package/dist/knowledge/skills/spec-component-update/references/component-spec-props.md +8 -0
- package/dist/knowledge/skills/spec-component-update/references/framework-frontend-component-spec-api.md +481 -0
- package/dist/knowledge/skills/spec-composite-view-update/SKILL.md +283 -0
- package/dist/knowledge/skills/spec-composite-view-update/references/composite-spec-sections.md +5 -0
- package/dist/knowledge/skills/spec-composite-view-update/references/framework-composite-view-specification-api.md +51 -0
- package/dist/knowledge/skills/spec-family-update/SKILL.md +300 -0
- package/dist/knowledge/skills/spec-family-update/references/family-spec-routing.md +13 -0
- package/dist/knowledge/skills/spec-family-update/references/framework-error-message-specifications-api.md +108 -0
- package/dist/knowledge/skills/spec-family-update/references/framework-family-specifications-api.md +111 -0
- package/dist/knowledge/skills/spec-feature-update/SKILL.md +306 -0
- package/dist/knowledge/skills/spec-feature-update/references/feature-spec-scope.md +5 -0
- package/dist/knowledge/skills/spec-feature-update/references/framework-feature-specification-api.md +95 -0
- package/dist/knowledge/skills/spec-resource-update/SKILL.md +220 -0
- package/dist/knowledge/skills/spec-resource-update/references/framework-field-spec-params-api.md +319 -0
- package/dist/knowledge/skills/spec-resource-update/references/framework-spec-resource-contracts-api.md +2610 -0
- package/dist/knowledge/skills/spec-resource-update/references/resource-spec-field-routing.md +12 -0
- package/dist/knowledge/skills/spec-update-after-change/SKILL.md +195 -0
- package/dist/knowledge/skills/spec-update-after-change/references/framework-spec-factory-api.md +173 -0
- package/dist/knowledge/skills/spec-update-after-change/references/spec-maintenance-by-surface.md +33 -0
- package/dist/knowledge/skills/spec-update-after-change/references/surface-to-spec-routing.md +14 -0
- package/dist/knowledge/skills/views-add-composite-view/SKILL.md +259 -0
- package/dist/knowledge/skills/views-add-composite-view/references/composite-view-routing.md +10 -0
- package/dist/knowledge/skills/views-add-composite-view/references/framework-inserted-view-identity-api.md +151 -0
- package/dist/knowledge/skills/views-add-custom-view/SKILL.md +225 -0
- package/dist/knowledge/skills/views-add-custom-view/references/custom-view-routing.md +10 -0
- package/dist/knowledge/skills/views-add-custom-view/references/framework-view-scope-and-full-custom-api.md +107 -0
- package/dist/knowledge/skills/views-app-level/SKILL.md +201 -0
- package/dist/knowledge/skills/views-app-level/references/app-level-views-routing.md +9 -0
- package/dist/knowledge/skills/views-app-level/references/framework-view-scope-and-full-custom-api.md +107 -0
- package/dist/knowledge/skills/views-chart-authoring/SKILL.md +264 -0
- package/dist/knowledge/skills/views-chart-authoring/references/chart-view-checklist.md +7 -0
- package/dist/knowledge/skills/views-chart-authoring/references/framework-chart-view-contracts-api.md +82 -0
- package/dist/knowledge/skills/views-chart-authoring/references/framework-inserted-view-identity-api.md +152 -0
- package/dist/knowledge/skills/views-composite-authoring/SKILL.md +302 -0
- package/dist/knowledge/skills/views-composite-authoring/references/composite-embedding-checklist.md +23 -0
- package/dist/knowledge/skills/views-composite-authoring/references/framework-composite-view-contracts-api.md +133 -0
- package/dist/knowledge/skills/views-composite-authoring/references/framework-inserted-view-identity-api.md +152 -0
- package/dist/knowledge/skills/views-execution-authoring/SKILL.md +209 -0
- package/dist/knowledge/skills/views-execution-authoring/references/execution-view-checklist.md +7 -0
- package/dist/knowledge/skills/views-execution-authoring/references/framework-execution-view-contracts-api.md +389 -0
- package/dist/knowledge/skills/views-execution-authoring/references/framework-inserted-view-identity-api.md +152 -0
- package/dist/knowledge/skills/website-anonymous-session/SKILL.md +444 -0
- package/dist/knowledge/skills/website-blog-authoring/SKILL.md +587 -0
- package/dist/knowledge/skills/website-blog-authoring/references/blog-adapter-api.md +1426 -0
- package/dist/knowledge/skills/website-bundle-discipline/SKILL.md +553 -0
- package/dist/knowledge/skills/website-bundle-discipline/references/example-website-button-override.md +52 -0
- package/dist/knowledge/skills/website-bundle-discipline/references/website-bundle-rules.md +357 -0
- package/dist/knowledge/skills/website-consent-gate-overrides/SKILL.md +511 -0
- package/dist/knowledge/skills/website-factory-advanced/SKILL.md +376 -0
- package/dist/knowledge/skills/website-inbound-contact-forms/SKILL.md +304 -0
- package/dist/knowledge/skills/website-label-pack/SKILL.md +390 -0
- package/dist/knowledge/skills/website-layout-overrides/SKILL.md +461 -0
- package/dist/knowledge/skills/website-marketing-metadata-extension/SKILL.md +264 -0
- package/dist/knowledge/skills/website-navigation-authoring/SKILL.md +414 -0
- package/dist/knowledge/skills/website-navigation-authoring/references/worked-examples-header-footer.md +366 -0
- package/dist/knowledge/skills/website-page-authoring/SKILL.md +420 -0
- package/dist/knowledge/skills/website-page-variants/SKILL.md +256 -0
- package/dist/knowledge/skills/website-primitive-overrides/SKILL.md +302 -0
- package/dist/knowledge/skills/website-section-contact/SKILL.md +950 -0
- package/dist/knowledge/skills/website-section-contact/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-cta/SKILL.md +822 -0
- package/dist/knowledge/skills/website-section-cta/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-faq/SKILL.md +917 -0
- package/dist/knowledge/skills/website-section-faq/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-feature-benefit-summary/SKILL.md +878 -0
- package/dist/knowledge/skills/website-section-feature-benefit-summary/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-feature-detail/SKILL.md +895 -0
- package/dist/knowledge/skills/website-section-feature-detail/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-footer-cta/SKILL.md +814 -0
- package/dist/knowledge/skills/website-section-footer-cta/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-hero/SKILL.md +944 -0
- package/dist/knowledge/skills/website-section-hero/references/define-website-section-api.md +583 -0
- package/dist/knowledge/skills/website-section-pricing/SKILL.md +934 -0
- package/dist/knowledge/skills/website-section-pricing/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-social-proof/SKILL.md +912 -0
- package/dist/knowledge/skills/website-section-social-proof/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/SKILL.md +624 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/references/aeo-api.md +633 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/references/geo-api.md +193 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/references/seo-api.md +790 -0
- package/dist/knowledge/topic-index.json +17510 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,1484 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: market-generation-cli
|
|
3
|
+
description: Drive the market-generation CLI — `wildo market generate --template=<ref>` — to render a `MarketMessageTemplate` against the live `MarketSnapshot` and invoke the LLM to produce final marketing copy (landing-page hero, objection-response email, in-app banner, comparison page, etc.). Covers `--template`, `--icp`, `--feature`, `--benefit`, `--channel`, `--objection`, `--language`, `--explain`, `--timeout`. Use when the user says "run the market generation agent", "generate marketing copy from a template", "wildo market generate", "render the landing-page template", "produce an objection email via LLM", "preview the rendered prompt", or "override the market generation timeout".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Drive the Market-Generation CLI (Phase 4.2)
|
|
7
|
+
|
|
8
|
+
### Target Application Framing
|
|
9
|
+
|
|
10
|
+
This knowledge is for configuring behavior in the target application.
|
|
11
|
+
Wildo is the framework surface being used, not the product being built.
|
|
12
|
+
|
|
13
|
+
Read and apply these patterns from the application-developer point of view:
|
|
14
|
+
|
|
15
|
+
- how the application should configure the relevant app-level file
|
|
16
|
+
- how the application should use framework-provided factories, enums, and helpers
|
|
17
|
+
- how the application should avoid mixing frontend, backend, and infrastructure concerns
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Overview
|
|
21
|
+
|
|
22
|
+
`wildo market generate` is the operator-facing surface of the
|
|
23
|
+
market-generation pipeline. It takes a `MarketMessageTemplate.ref`,
|
|
24
|
+
asks the dev-companion to render the template against the application's
|
|
25
|
+
`MarketSnapshot`, then asks the same companion to invoke the
|
|
26
|
+
`market.generation.agent` (GPT-4O, `GENERATE_TEXT`,
|
|
27
|
+
temperature 0.6) on the rendered prompt. The LLM output is printed
|
|
28
|
+
to stdout; the rendered prompt + trace are available behind
|
|
29
|
+
`--explain`.
|
|
30
|
+
|
|
31
|
+
The CLI is a **thin client** over POST `/api/companion/market/generate`.
|
|
32
|
+
All the substantive work — snapshot resolution, validation, template
|
|
33
|
+
lookup, `requiredInputs[]` enforcement, context-block rendering,
|
|
34
|
+
Mustache substitution, agent invocation — happens inside the
|
|
35
|
+
companion (one introspection subprocess for prompt assembly, the
|
|
36
|
+
parent process for the LLM call). The CLI's job is flag parsing,
|
|
37
|
+
HTTP, and printing.
|
|
38
|
+
|
|
39
|
+
## App Paths
|
|
40
|
+
|
|
41
|
+
Locate the surfaces this CLI gates against, reads, and points consumers at:
|
|
42
|
+
|
|
43
|
+
| Surface | Glob (relative to app root) |
|
|
44
|
+
|---------|------------------------------|
|
|
45
|
+
| Scope gate (CLI requires SAAS_APP cwd) | `wildo.saas.config.ts` |
|
|
46
|
+
| Snapshot the companion renders | `specifications/src/market/**/*.ts` |
|
|
47
|
+
| Templates the CLI consumes | `specifications/src/market/messaging/templates.ts` |
|
|
48
|
+
|
|
49
|
+
## When to Use
|
|
50
|
+
|
|
51
|
+
- One-shot generation of a marketing artifact for a specific
|
|
52
|
+
`MarketMessageTemplate` (operator command-line, demo session,
|
|
53
|
+
pre-publish smoke-test).
|
|
54
|
+
- Iterating on a template body — pair `--explain` with edits to the
|
|
55
|
+
template's `promptTemplate` to see exactly how the substitution
|
|
56
|
+
+ context block resolve before re-running the LLM.
|
|
57
|
+
- Producing the same template's output across multiple ICPs by
|
|
58
|
+
varying `--icp` (and re-running per ICP) — the same template
|
|
59
|
+
ref produces per-ICP copy without authoring a new template.
|
|
60
|
+
- Producing localized output via `--language=fr` (or any human
|
|
61
|
+
language label) — the LLM produces the final output in that
|
|
62
|
+
language while the template body stays English.
|
|
63
|
+
|
|
64
|
+
## When NOT to Use
|
|
65
|
+
|
|
66
|
+
- Authoring a new `MarketMessageTemplate` — see
|
|
67
|
+
`market-message-templates-authoring`. The CLI consumes templates
|
|
68
|
+
but does not author them.
|
|
69
|
+
- Rendering only the prompt without the LLM call — there is no
|
|
70
|
+
`--prompt-only` flag today. Use `--explain` to inspect the
|
|
71
|
+
rendered prompt + the LLM output side-by-side. If repeatedly
|
|
72
|
+
iterating on prompt-only is becoming friction, raise it in the
|
|
73
|
+
Phase-4 plan.
|
|
74
|
+
- Calling the underlying companion behaviors directly from
|
|
75
|
+
another tool — see `market-companion-prompt-enrichment` for the
|
|
76
|
+
`market-context-for-feature` / `market-context-for-icp` surface.
|
|
77
|
+
`wildo market generate` is the only consumer that pairs the
|
|
78
|
+
rendered prompt with the LLM call.
|
|
79
|
+
- Production publishing of marketing assets — the CLI prints to
|
|
80
|
+
stdout; downstream piping into a static-site generator or CMS is
|
|
81
|
+
out of scope for Phase 4.2.
|
|
82
|
+
|
|
83
|
+
## Workflow
|
|
84
|
+
|
|
85
|
+
### Step 1 — Confirm the SaaS-app scope
|
|
86
|
+
|
|
87
|
+
The command is gated by `WorkspaceScope.SAAS_APP`. Run it from a
|
|
88
|
+
directory containing `wildo.saas.config.ts` (or any nested folder).
|
|
89
|
+
The CLI prints a precise scope error and exits non-zero otherwise.
|
|
90
|
+
|
|
91
|
+
### Step 2 — Pick the template
|
|
92
|
+
|
|
93
|
+
Identify the `MarketMessageTemplate.ref` you want to render — this
|
|
94
|
+
is the only **mandatory** flag. The template body and its
|
|
95
|
+
`requiredInputs[]` declaration drive every other flag:
|
|
96
|
+
|
|
97
|
+
| Template `requiredInputs` declares | CLI flag the operator MUST pass |
|
|
98
|
+
|------------------------------------|---------------------------------|
|
|
99
|
+
| `ICP_REF` | `--icp <market-icp-ref>` |
|
|
100
|
+
| `BENEFIT_REF` | `--benefit <feature-benefit-ref>` |
|
|
101
|
+
| `CHANNEL_REF` | `--channel <market-channel-ref>` |
|
|
102
|
+
| `OBJECTION_REF` | `--objection <market-objection-ref>` |
|
|
103
|
+
|
|
104
|
+
`--feature` is a separate concern: it anchors the *context block's*
|
|
105
|
+
intent picker (feature-scoped vs ICP-scoped sections). It is
|
|
106
|
+
**never** consumed for placeholder substitution and is not gated by
|
|
107
|
+
`requiredInputs[]`.
|
|
108
|
+
|
|
109
|
+
If a required flag is missing, the renderer (subprocess) returns a
|
|
110
|
+
typed `MarketPromptMissingRequiredInputError` with the exact missing
|
|
111
|
+
input name — surfaces precisely on the CLI as `Market generation
|
|
112
|
+
failed: …`. There is no "guess based on the snapshot"
|
|
113
|
+
fallback by design (D17 / framework-mindset).
|
|
114
|
+
|
|
115
|
+
### Step 3 — Pick the output language
|
|
116
|
+
|
|
117
|
+
`--language` substitutes the `{{output_language}}` placeholder the
|
|
118
|
+
template body must end with. Defaults to `English` when absent.
|
|
119
|
+
Pass any human language label the LLM understands
|
|
120
|
+
(`French`, `Deutsch`, `Polski`) — the LLM produces the final output
|
|
121
|
+
in that language while the template body stays English (D15 / §12
|
|
122
|
+
of the market-spec plan).
|
|
123
|
+
|
|
124
|
+
### Step 4 — Inspect the rendered prompt with `--explain`
|
|
125
|
+
|
|
126
|
+
`--explain` prints, in order: the resolved trace (template ref +
|
|
127
|
+
output kind, language, voice used, agent ref, consumed inputs,
|
|
128
|
+
ICPs in context, benefits in context), the rendered market-context
|
|
129
|
+
block, the rendered template body, then the LLM output. Use it to
|
|
130
|
+
diagnose drift ("why did benefit X not appear?"), confirm voice
|
|
131
|
+
selection, and audit the substitutions before sharing the LLM
|
|
132
|
+
output with stakeholders.
|
|
133
|
+
|
|
134
|
+
Without `--explain`, only the trace headline and the LLM output
|
|
135
|
+
are printed — quieter for batch scripting.
|
|
136
|
+
|
|
137
|
+
### Step 5 — Override the timeout for slow generations
|
|
138
|
+
|
|
139
|
+
The default companion-client timeout is **90 s**
|
|
140
|
+
(`MARKET_COMPANION_DEFAULT_TIMEOUT_MS`). The LLM call is the
|
|
141
|
+
dominant cost; the renderer itself is single-digit ms. When a
|
|
142
|
+
template asks for a long objection-response email or a multi-pillar
|
|
143
|
+
landing page, GPT-4O can run past 60 s. Pass
|
|
144
|
+
`--timeout <seconds>` to override (e.g. `--timeout 180` for 3 min).
|
|
145
|
+
Negative / zero / non-numeric values silently fall back to the
|
|
146
|
+
default — the CLI never lets the operator disable the timeout
|
|
147
|
+
outright; that surface belongs to the companion service.
|
|
148
|
+
|
|
149
|
+
### Step 6 — Read the soft "ignored flags" warning
|
|
150
|
+
|
|
151
|
+
When the operator passes an entity flag that the template does not
|
|
152
|
+
declare in `requiredInputs[]`, the renderer ignores the flag and
|
|
153
|
+
the CLI surfaces a `Template "<ref>" did not consume: --benefit,
|
|
154
|
+
--channel — these flags were ignored.` warning. The warning is
|
|
155
|
+
informational — generation still succeeds; the operator can simplify
|
|
156
|
+
the next invocation.
|
|
157
|
+
|
|
158
|
+
`--feature` is intentionally excluded from the warning: it anchors
|
|
159
|
+
the context-block intent picker, not template substitution, so it
|
|
160
|
+
never appears in `consumedInputs` even when used.
|
|
161
|
+
|
|
162
|
+
## Command surface (source)
|
|
163
|
+
|
|
164
|
+
The command class itself, including the full flag table, the LLM
|
|
165
|
+
output rendering, and the `warnAboutIgnoredRefs(...)` soft-warning
|
|
166
|
+
helper:
|
|
167
|
+
|
|
168
|
+
## Import Origins
|
|
169
|
+
|
|
170
|
+
- `@wildo-ai/wildo-cli`
|
|
171
|
+
|
|
172
|
+
## Source Excerpts
|
|
173
|
+
|
|
174
|
+
### Origin Package: `@wildo-ai/wildo-cli`
|
|
175
|
+
|
|
176
|
+
```typescript
|
|
177
|
+
*
|
|
178
|
+
* `wildo market generate` — Market generation CLI surface (Phase 4.2).
|
|
179
|
+
*
|
|
180
|
+
* Renders one `MarketMessageTemplate` against the application's
|
|
181
|
+
* authored `MarketSnapshot` and invokes the
|
|
182
|
+
* `market.generation.agent` LLM agent to produce final
|
|
183
|
+
* marketing copy. The CLI is a thin client over POST
|
|
184
|
+
* `/api/companion/market/generate`; the dev-companion does the work.
|
|
185
|
+
*
|
|
186
|
+
* Flags:
|
|
187
|
+
* - `--template` (required) — `MarketMessageTemplate.ref`
|
|
188
|
+
* - `--icp`, `--feature`, `--benefit`, `--channel`, `--objection` —
|
|
189
|
+
* ref of the corresponding entity. Each is optional at the CLI
|
|
190
|
+
* layer, but the *template's* `requiredInputs` decides which ones
|
|
191
|
+
* become mandatory: an under-specified call surfaces a precise
|
|
192
|
+
* "missing required input" error from the subprocess instead of a
|
|
193
|
+
* confusing LLM hallucination. Refs that the template does not
|
|
194
|
+
* declare are silently ignored — the CLI surfaces a soft warning
|
|
195
|
+
* so the operator can simplify the command line.
|
|
196
|
+
* - `--language` — overrides `output_language` substitution
|
|
197
|
+
* (default: English).
|
|
198
|
+
* - `--explain` — prints the rendered prompt + trace alongside the
|
|
199
|
+
* LLM output. Useful for debugging templates and context-block
|
|
200
|
+
* ranking.
|
|
201
|
+
* - `--timeout` — override the default 90 s companion-client
|
|
202
|
+
* timeout (in seconds). Useful for long objection-response emails
|
|
203
|
+
* on slow GPT-4O windows.
|
|
204
|
+
*/
|
|
205
|
+
|
|
206
|
+
import chalk from 'chalk';
|
|
207
|
+
|
|
208
|
+
import { BaseCommand } from '~wildo-cli/kernel/base-command';
|
|
209
|
+
import { CommandCategory } from '~wildo-cli/kernel/types';
|
|
210
|
+
import type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';
|
|
211
|
+
import { ensureSaasAppScope } from '~wildo-cli/kernel/command-scope-utils';
|
|
212
|
+
import { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';
|
|
213
|
+
|
|
214
|
+
import {
|
|
215
|
+
companionPost,
|
|
216
|
+
MARKET_SAAS_SCOPE_REQUIRED_MESSAGE,
|
|
217
|
+
optionalStringFlag,
|
|
218
|
+
requireStringFlag,
|
|
219
|
+
type MarketGenerateCliResult,
|
|
220
|
+
} from './market-command.utils';
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* CLI flag → `MarketMessageRequiredInput`-equivalent kind name pairs.
|
|
224
|
+
*
|
|
225
|
+
* Used for the soft "you passed --benefit but the template didn't
|
|
226
|
+
* declare BENEFIT_REF, so it was ignored" warning. Kept in sync with
|
|
227
|
+
* the renderer's switch in `renderMarketPrompt(...)` (subprocess).
|
|
228
|
+
*/
|
|
229
|
+
const FLAG_TO_CONSUMED_KIND: Record<string, string> = {
|
|
230
|
+
icp: 'icp',
|
|
231
|
+
benefit: 'benefit',
|
|
232
|
+
channel: 'channel',
|
|
233
|
+
objection: 'objection',
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
export default class MarketGenerateCommand extends BaseCommand {
|
|
237
|
+
readonly meta: CommandMeta = {
|
|
238
|
+
name: 'market generate',
|
|
239
|
+
description: 'Render a market message template + invoke the generation agent',
|
|
240
|
+
category: CommandCategory.Market,
|
|
241
|
+
flags: {
|
|
242
|
+
template: {
|
|
243
|
+
type: 'string',
|
|
244
|
+
description: 'MarketMessageTemplate ref to render',
|
|
245
|
+
required: true,
|
|
246
|
+
},
|
|
247
|
+
icp: {
|
|
248
|
+
type: 'string',
|
|
249
|
+
description: 'MarketICP ref (required when the template declares ICP_REF)',
|
|
250
|
+
},
|
|
251
|
+
feature: {
|
|
252
|
+
type: 'string',
|
|
253
|
+
description: 'AppFeature ref to anchor the context block (used for intent picking, not substitution)',
|
|
254
|
+
},
|
|
255
|
+
benefit: {
|
|
256
|
+
type: 'string',
|
|
257
|
+
description: 'FeatureBenefit ref (required when the template declares BENEFIT_REF)',
|
|
258
|
+
},
|
|
259
|
+
channel: {
|
|
260
|
+
type: 'string',
|
|
261
|
+
description: 'MarketChannel ref (required when the template declares CHANNEL_REF)',
|
|
262
|
+
},
|
|
263
|
+
objection: {
|
|
264
|
+
type: 'string',
|
|
265
|
+
description: 'MarketObjection ref (required when the template declares OBJECTION_REF)',
|
|
266
|
+
},
|
|
267
|
+
language: {
|
|
268
|
+
type: 'string',
|
|
269
|
+
description: 'Output language label substituted into {{output_language}} (default: English)',
|
|
270
|
+
},
|
|
271
|
+
explain: {
|
|
272
|
+
type: 'boolean',
|
|
273
|
+
description: 'Print the rendered prompt + trace alongside the LLM output',
|
|
274
|
+
default: false,
|
|
275
|
+
},
|
|
276
|
+
timeout: {
|
|
277
|
+
type: 'number',
|
|
278
|
+
description: 'Override the default 90s companion-client timeout (in seconds)',
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
async run(ctx: CommandContext): Promise<CommandResult> {
|
|
284
|
+
if (!ensureSaasAppScope(ctx, MARKET_SAAS_SCOPE_REQUIRED_MESSAGE)) {
|
|
285
|
+
return { success: false };
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const templateRef = requireStringFlag(ctx, 'template', 'MarketMessageTemplate ref');
|
|
289
|
+
if (!templateRef) {
|
|
290
|
+
return { success: false };
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
try {
|
|
294
|
+
ctx.log.info(chalk.cyan('\n Generating market copy via dev companion...\n'));
|
|
295
|
+
|
|
296
|
+
const result = await companionPost<MarketGenerateCliResult>(
|
|
297
|
+
ctx,
|
|
298
|
+
'/api/companion/market/generate',
|
|
299
|
+
{
|
|
300
|
+
templateRef,
|
|
301
|
+
icpRef: optionalStringFlag(ctx, 'icp'),
|
|
302
|
+
featureRef: optionalStringFlag(ctx, 'feature'),
|
|
303
|
+
benefitRef: optionalStringFlag(ctx, 'benefit'),
|
|
304
|
+
channelRef: optionalStringFlag(ctx, 'channel'),
|
|
305
|
+
objectionRef: optionalStringFlag(ctx, 'objection'),
|
|
306
|
+
outputLanguage: optionalStringFlag(ctx, 'language'),
|
|
307
|
+
},
|
|
308
|
+
);
|
|
309
|
+
|
|
310
|
+
this.warnAboutIgnoredRefs(ctx, result);
|
|
311
|
+
|
|
312
|
+
ctx.log.success(' Market generation output ready.');
|
|
313
|
+
ctx.log.info(chalk.dim(` Template: ${result.trace.template.ref} (${result.trace.template.name})`));
|
|
314
|
+
ctx.log.info(chalk.dim(` Output kind: ${result.trace.template.outputKind}`));
|
|
315
|
+
ctx.log.info(chalk.dim(` Language: ${result.trace.outputLanguage}`));
|
|
316
|
+
ctx.log.info(chalk.dim(` Voice used: ${result.trace.contextVoiceUsed ?? '(none)'}`));
|
|
317
|
+
ctx.log.info(chalk.dim(` Agent: ${result.trace.agentRef}`));
|
|
318
|
+
|
|
319
|
+
if (result.trace.consumedInputs.length > 0) {
|
|
320
|
+
ctx.log.info(chalk.dim(' Inputs consumed:'));
|
|
321
|
+
for (const input of result.trace.consumedInputs) {
|
|
322
|
+
ctx.log.info(chalk.dim(` - ${input.kind}: ${input.ref}`));
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
if (result.trace.contextIcpsConsidered.length > 0) {
|
|
327
|
+
ctx.log.info(chalk.dim(` ICPs in context: ${result.trace.contextIcpsConsidered.join(', ')}`));
|
|
328
|
+
}
|
|
329
|
+
if (result.trace.contextBenefitsConsidered.length > 0) {
|
|
330
|
+
ctx.log.info(chalk.dim(` Benefits in context: ${result.trace.contextBenefitsConsidered.join(', ')}`));
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const explain = Boolean(ctx.flags.explain);
|
|
334
|
+
if (explain) {
|
|
335
|
+
ctx.log.info('');
|
|
336
|
+
ctx.log.info(chalk.bold(' Market-context block'));
|
|
337
|
+
for (const line of result.contextBlock.split('\n')) {
|
|
338
|
+
ctx.log.info(` ${line}`);
|
|
339
|
+
}
|
|
340
|
+
ctx.log.info('');
|
|
341
|
+
ctx.log.info(chalk.bold(' Rendered template body'));
|
|
342
|
+
for (const line of result.renderedTemplate.split('\n')) {
|
|
343
|
+
ctx.log.info(` ${line}`);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
ctx.log.info('');
|
|
348
|
+
ctx.log.info(chalk.bold(' LLM output'));
|
|
349
|
+
for (const line of result.output.split('\n')) {
|
|
350
|
+
ctx.log.info(` ${line}`);
|
|
351
|
+
}
|
|
352
|
+
ctx.log.info('');
|
|
353
|
+
|
|
354
|
+
return { success: true };
|
|
355
|
+
} catch (error) {
|
|
356
|
+
ctx.log.error(
|
|
357
|
+
`Market generation failed: ${ErrorUtils.extractErrorMessage(error)}`,
|
|
358
|
+
);
|
|
359
|
+
return { success: false };
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Surface a soft warning when the operator passed an entity ref
|
|
365
|
+
* that the chosen template did not consume.
|
|
366
|
+
*
|
|
367
|
+
* The renderer (subprocess) is the source of truth for "what the
|
|
368
|
+
* template actually used" — `result.trace.consumedInputs` lists
|
|
369
|
+
* every ref the renderer consumed for substitution. If the
|
|
370
|
+
* operator passed `--benefit X` but the template's
|
|
371
|
+
* `requiredInputs` did not declare `BENEFIT_REF`, the ref is
|
|
372
|
+
* silently ignored. Surfacing a warning lets the operator
|
|
373
|
+
* simplify their command line without us hard-failing (templates
|
|
374
|
+
* may legitimately accept optional contextual hints later).
|
|
375
|
+
*
|
|
376
|
+
* `--feature` is intentionally excluded: it currently anchors
|
|
377
|
+
* the context-block intent picker, not template substitution, so
|
|
378
|
+
* it never appears in `consumedInputs` even when used.
|
|
379
|
+
*/
|
|
380
|
+
private warnAboutIgnoredRefs(ctx: CommandContext, result: MarketGenerateCliResult): void {
|
|
381
|
+
const consumedKinds = new Set(result.trace.consumedInputs.map((entry) => entry.kind));
|
|
382
|
+
const ignored: string[] = [];
|
|
383
|
+
for (const [flag, kind] of Object.entries(FLAG_TO_CONSUMED_KIND)) {
|
|
384
|
+
if (optionalStringFlag(ctx, flag) && !consumedKinds.has(kind)) {
|
|
385
|
+
ignored.push(`--${flag}`);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
if (ignored.length > 0) {
|
|
389
|
+
ctx.log.warn(
|
|
390
|
+
`Template "${result.trace.template.ref}" did not consume: ${ignored.join(', ')} — these flags were ignored.`,
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
The shared CLI utilities the command leans on (companion HTTP
|
|
398
|
+
client, flag parsers, timeout resolver, and default constants —
|
|
399
|
+
including the market-specific scope-gate message):
|
|
400
|
+
|
|
401
|
+
## Import Origins
|
|
402
|
+
|
|
403
|
+
- `@wildo-ai/wildo-cli`
|
|
404
|
+
|
|
405
|
+
## Source Excerpts
|
|
406
|
+
|
|
407
|
+
### Origin Package: `@wildo-ai/wildo-cli`
|
|
408
|
+
|
|
409
|
+
```typescript
|
|
410
|
+
*
|
|
411
|
+
* Market generation CLI shared utilities (Phase 4.2).
|
|
412
|
+
*
|
|
413
|
+
* Mirrors the shape of `commands/generate/email-command.utils.ts` —
|
|
414
|
+
* each command surface gets its own small utils file so we don't
|
|
415
|
+
* cross-couple the `generate` and `market` categories. The two
|
|
416
|
+
* helpers we genuinely share (companion HTTP client + service-address
|
|
417
|
+
* resolution) live in `~wildo-cli/services/companion/...` and are
|
|
418
|
+
* imported here directly.
|
|
419
|
+
*/
|
|
420
|
+
|
|
421
|
+
import type { MarketGenerationResponse } from '@wildo-ai/saas-specifications';
|
|
422
|
+
|
|
423
|
+
import { CompanionClient } from '~wildo-cli/services/companion/companion-client.service';
|
|
424
|
+
import { loadAppLocalRuntimeServiceAddresses } from '~wildo-cli/services/application/app-local-runtime-addresses.service';
|
|
425
|
+
import type { CompanionClientOptions } from '~wildo-cli/services/companion/companion.schemas';
|
|
426
|
+
import type { CommandContext } from '~wildo-cli/kernel/types';
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Default companion-client timeout for `wildo market generate`.
|
|
430
|
+
*
|
|
431
|
+
* 90 s matches `EMAIL_COMPANION_TIMEOUT_MS` plus headroom for the
|
|
432
|
+
* two-step (introspection subprocess + LLM call) market generation
|
|
433
|
+
* flow. The LLM call is the dominant cost; the renderer itself
|
|
434
|
+
* completes in single-digit ms. Operators can override via
|
|
435
|
+
* `--timeout <seconds>` on the CLI for long objection-response
|
|
436
|
+
* emails or batch generations.
|
|
437
|
+
*/
|
|
438
|
+
export const MARKET_COMPANION_DEFAULT_TIMEOUT_MS = 90_000;
|
|
439
|
+
|
|
440
|
+
export interface MarketGenerateCliRequest {
|
|
441
|
+
templateRef: string;
|
|
442
|
+
icpRef?: string;
|
|
443
|
+
featureRef?: string;
|
|
444
|
+
benefitRef?: string;
|
|
445
|
+
channelRef?: string;
|
|
446
|
+
objectionRef?: string;
|
|
447
|
+
outputLanguage?: string;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* CLI-side alias for `MarketGenerationResponse` (canonical shape
|
|
452
|
+
* authored once in `@wildo-ai/saas-specifications`,
|
|
453
|
+
* `market-generation.schemas.ts`). F-2 + F-6 from the Phase-4.2 audit
|
|
454
|
+
* consolidated three formerly hand-authored definitions (CLI
|
|
455
|
+
* interface, service interface, inline service Zod) into this one
|
|
456
|
+
* shared schema.
|
|
457
|
+
*/
|
|
458
|
+
export type MarketGenerateCliResult = MarketGenerationResponse;
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* Operator-facing message for the saas-app scope gate on `market`
|
|
462
|
+
* commands. More specific than the shared kernel default — it names
|
|
463
|
+
* `wildo.saas.config.ts` so the operator knows exactly what marks a
|
|
464
|
+
* SaaS application root. Passed to the shared `ensureSaasAppScope`
|
|
465
|
+
* kernel helper (`~wildo-cli/kernel/command-scope-utils`) at the
|
|
466
|
+
* command call site; kept here so the market surface owns its own
|
|
467
|
+
* wording and the `market` command tree need not import the message
|
|
468
|
+
* from another command category.
|
|
469
|
+
*/
|
|
470
|
+
export const MARKET_SAAS_SCOPE_REQUIRED_MESSAGE =
|
|
471
|
+
'Market commands require a SaaS application. Run from within a directory containing wildo.saas.config.ts.';
|
|
472
|
+
|
|
473
|
+
export function requireStringFlag(
|
|
474
|
+
ctx: CommandContext,
|
|
475
|
+
flagName: string,
|
|
476
|
+
label: string,
|
|
477
|
+
): string | null {
|
|
478
|
+
const value = ctx.flags[flagName];
|
|
479
|
+
if (typeof value === 'string' && value.trim().length > 0) {
|
|
480
|
+
return value.trim();
|
|
481
|
+
}
|
|
482
|
+
ctx.log.error(`Missing required flag --${flagName} (${label}).`);
|
|
483
|
+
return null;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
export function optionalStringFlag(
|
|
487
|
+
ctx: CommandContext,
|
|
488
|
+
flagName: string,
|
|
489
|
+
): string | undefined {
|
|
490
|
+
const value = ctx.flags[flagName];
|
|
491
|
+
if (typeof value === 'string' && value.trim().length > 0) {
|
|
492
|
+
return value.trim();
|
|
493
|
+
}
|
|
494
|
+
return undefined;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Resolve a per-call `--timeout` flag (in seconds) into milliseconds.
|
|
499
|
+
*
|
|
500
|
+
* Returns `MARKET_COMPANION_DEFAULT_TIMEOUT_MS` when the flag is
|
|
501
|
+
* absent, missing, or invalid. Negative or zero values fall back to
|
|
502
|
+
* the default (the CLI never lets the operator disable the timeout
|
|
503
|
+
* outright — that surface belongs to the companion service).
|
|
504
|
+
*/
|
|
505
|
+
export function resolveTimeoutMs(ctx: CommandContext): number {
|
|
506
|
+
const raw = ctx.flags.timeout;
|
|
507
|
+
if (raw === undefined || raw === null || raw === '') {
|
|
508
|
+
return MARKET_COMPANION_DEFAULT_TIMEOUT_MS;
|
|
509
|
+
}
|
|
510
|
+
const seconds = typeof raw === 'number' ? raw : Number(raw);
|
|
511
|
+
if (!Number.isFinite(seconds) || seconds <= 0) {
|
|
512
|
+
return MARKET_COMPANION_DEFAULT_TIMEOUT_MS;
|
|
513
|
+
}
|
|
514
|
+
return Math.floor(seconds * 1000);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
async function resolveCompanionClientOptions(
|
|
518
|
+
ctx: CommandContext,
|
|
519
|
+
timeoutMs: number,
|
|
520
|
+
): Promise<CompanionClientOptions> {
|
|
521
|
+
const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;
|
|
522
|
+
if (!saasRoot) {
|
|
523
|
+
return { timeoutMs };
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
const serviceAddresses = await loadAppLocalRuntimeServiceAddresses(saasRoot);
|
|
527
|
+
const devCompanion = serviceAddresses?.devCompanion;
|
|
528
|
+
|
|
529
|
+
return {
|
|
530
|
+
baseUrl: devCompanion?.url,
|
|
531
|
+
port: devCompanion?.port,
|
|
532
|
+
timeoutMs,
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
export async function companionPost<T>(
|
|
537
|
+
ctx: CommandContext,
|
|
538
|
+
pathname: string,
|
|
539
|
+
body?: unknown,
|
|
540
|
+
options?: { timeoutMs?: number },
|
|
541
|
+
): Promise<T> {
|
|
542
|
+
const timeoutMs = options?.timeoutMs ?? resolveTimeoutMs(ctx);
|
|
543
|
+
return CompanionClient.post<T>(pathname, body, await resolveCompanionClientOptions(ctx, timeoutMs));
|
|
544
|
+
}
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
## Companion-side wiring (source)
|
|
548
|
+
|
|
549
|
+
The introspection subprocess that renders the prompt — snapshot
|
|
550
|
+
load + validation + template lookup + `requiredInputs[]`
|
|
551
|
+
enforcement + context-block rendering + Mustache substitution:
|
|
552
|
+
|
|
553
|
+
## Import Origins
|
|
554
|
+
|
|
555
|
+
- `@wildo-ai/dev-companion`
|
|
556
|
+
|
|
557
|
+
## Source Excerpts
|
|
558
|
+
|
|
559
|
+
### Origin Package: `@wildo-ai/dev-companion`
|
|
560
|
+
|
|
561
|
+
```typescript
|
|
562
|
+
*
|
|
563
|
+
* Phase-4.2 market generation prompt renderer.
|
|
564
|
+
*
|
|
565
|
+
* Pure, deterministic, snapshot-in / prompt-out. Lives in the
|
|
566
|
+
* introspection subprocess (the same process that owns
|
|
567
|
+
* `buildMarketContextBlock`) so the parent companion process never
|
|
568
|
+
* has to load `marketSpecification` to compose a prompt.
|
|
569
|
+
*
|
|
570
|
+
* Pipeline (no LLM, no I/O):
|
|
571
|
+
*
|
|
572
|
+
* 1. **Look up the template** by `templateRef`. Throw if absent.
|
|
573
|
+
* 2. **Resolve every `requiredInputs[]` ref** the template declares
|
|
574
|
+
* against the snapshot — throw if any required input is missing
|
|
575
|
+
* from the caller's payload, or if a provided ref is unknown.
|
|
576
|
+
* 3. **Pick the context-block intent**:
|
|
577
|
+
* - `featureRef` provided → `{ kind: 'feature', featureRef }` (the
|
|
578
|
+
* builder already filters benefits-in-scope correctly).
|
|
579
|
+
* - else `icpRef` provided → `{ kind: 'icp', icpRef }`.
|
|
580
|
+
* - else throw — every Phase-4.2 template needs at least one
|
|
581
|
+
* anchor for the context block.
|
|
582
|
+
* 4. **Call `buildMarketContextBlock(...)`** to get the English
|
|
583
|
+
* context block + trace.
|
|
584
|
+
* 5. **Substitute Mustache placeholders** in `template.promptTemplate`
|
|
585
|
+
* using a tiny single-pass `{{path}}` resolver that walks
|
|
586
|
+
* dot-paths against the resolved entity map. `{{output_language}}`
|
|
587
|
+
* is wired specifically (the value comes from the CLI flag, not
|
|
588
|
+
* from a snapshot entity). Unknown placeholders surface a
|
|
589
|
+
* `MarketPromptUnknownPlaceholderError` so authoring drift is
|
|
590
|
+
* caught loudly rather than rendered as the empty string.
|
|
591
|
+
* 6. **Concatenate**: `<context block>\n\n<rendered template body>`.
|
|
592
|
+
*
|
|
593
|
+
* The renderer intentionally does NOT call `validateMarketSnapshot`
|
|
594
|
+
* — the caller (`resolveMarketSnapshot` in the handler) already did
|
|
595
|
+
* that with WARN-vs-ERROR semantics. Calling it again here would
|
|
596
|
+
* either duplicate WARN logging or risk a different validation
|
|
597
|
+
* surface drifting from the canonical entry point.
|
|
598
|
+
*/
|
|
599
|
+
|
|
600
|
+
/** Maximum length of the BCP-47 `outputLanguage` tag — defensive guard
|
|
601
|
+
* mirroring `MAX_OUTPUT_LANGUAGE_LENGTH` in `market-context-block.builder.ts`.
|
|
602
|
+
* Long values almost always indicate the operator pasted a sentence
|
|
603
|
+
* instead of a tag (e.g. "translate the result into Brazilian Portuguese"). */
|
|
604
|
+
const MAX_OUTPUT_LANGUAGE_LENGTH = 64;
|
|
605
|
+
|
|
606
|
+
/** Default `output_language` used when the CLI does not pass `--output-language`.
|
|
607
|
+
* Keeps every template's `{{output_language}}` placeholder render-safe and
|
|
608
|
+
* defaults to the English-authoring contract (D15). */
|
|
609
|
+
const DEFAULT_OUTPUT_LANGUAGE = 'English';
|
|
610
|
+
|
|
611
|
+
export interface MarketPromptRequest {
|
|
612
|
+
/** Required — every render is anchored on exactly one template. */
|
|
613
|
+
templateRef: string;
|
|
614
|
+
/** ICP ref — required when the template declares `ICP_REF`. */
|
|
615
|
+
icpRef?: string;
|
|
616
|
+
/** Feature ref — drives the context-block intent when provided. */
|
|
617
|
+
featureRef?: string;
|
|
618
|
+
/** Benefit ref — required when the template declares `BENEFIT_REF`. */
|
|
619
|
+
benefitRef?: string;
|
|
620
|
+
/** Channel ref — required when the template declares `CHANNEL_REF`. */
|
|
621
|
+
channelRef?: string;
|
|
622
|
+
/** Objection ref — required when the template declares `OBJECTION_REF`. */
|
|
623
|
+
objectionRef?: string;
|
|
624
|
+
/** BCP-47 tag for the LLM's `{{output_language}}` placeholder. */
|
|
625
|
+
outputLanguage?: string;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
export interface MarketPromptTemplateTrace {
|
|
629
|
+
ref: string;
|
|
630
|
+
name: string;
|
|
631
|
+
outputKind: string;
|
|
632
|
+
requiredInputs: string[];
|
|
633
|
+
preferredVoiceRef?: string;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
export interface MarketPromptResult {
|
|
637
|
+
/** Final prompt: `<context block>\n\n<rendered template body>`. */
|
|
638
|
+
prompt: string;
|
|
639
|
+
/** Just the rendered template body, post-substitution (useful for trace). */
|
|
640
|
+
renderedTemplate: string;
|
|
641
|
+
/** Just the context block (useful for trace + dry-run / `--explain`). */
|
|
642
|
+
contextBlock: string;
|
|
643
|
+
trace: {
|
|
644
|
+
template: MarketPromptTemplateTrace;
|
|
645
|
+
context: ReturnType<typeof buildMarketContextBlock>['trace'];
|
|
646
|
+
/** The exact `output_language` value that was substituted. */
|
|
647
|
+
outputLanguage: string;
|
|
648
|
+
/** Refs the renderer actually consumed (subset of `MarketMessageRequiredInput`). */
|
|
649
|
+
consumedInputs: { kind: string; ref: string }[];
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
export class MarketPromptUnknownPlaceholderError extends Error {
|
|
654
|
+
public readonly placeholders: string[];
|
|
655
|
+
constructor(placeholders: string[]) {
|
|
656
|
+
super(
|
|
657
|
+
`Market generation prompt has unknown placeholder(s): ${placeholders.map(p => `\`{{${p}}}\``).join(', ')}. `
|
|
658
|
+
+ `Add the corresponding entity to the snapshot, fix the placeholder name, or remove it from the template body.`,
|
|
659
|
+
);
|
|
660
|
+
this.name = 'MarketPromptUnknownPlaceholderError';
|
|
661
|
+
this.placeholders = placeholders;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export class MarketPromptMissingRequiredInputError extends Error {
|
|
666
|
+
public readonly missing: MarketMessageRequiredInput[];
|
|
667
|
+
constructor(templateRef: string, missing: MarketMessageRequiredInput[]) {
|
|
668
|
+
super(
|
|
669
|
+
`Template \`${templateRef}\` declares requiredInputs ${missing.map(m => `\`${m}\``).join(', ')} `
|
|
670
|
+
+ `but the caller did not provide them. Pass the matching CLI flag(s) (e.g. \`--icp\`, \`--benefit\`, \`--objection\`, \`--channel\`).`,
|
|
671
|
+
);
|
|
672
|
+
this.name = 'MarketPromptMissingRequiredInputError';
|
|
673
|
+
this.missing = missing;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
export class MarketPromptUnknownRefError extends Error {
|
|
678
|
+
public readonly entityKind: string;
|
|
679
|
+
public readonly providedRef: string;
|
|
680
|
+
constructor(entityKind: string, providedRef: string, knownRefs: string[]) {
|
|
681
|
+
super(
|
|
682
|
+
`No ${entityKind} found with ref \`${providedRef}\` in the authored MarketSnapshot. `
|
|
683
|
+
+ `Known ${entityKind} refs: ${knownRefs.length > 0 ? knownRefs.map(r => `\`${r}\``).join(', ') : '(none)'}.`,
|
|
684
|
+
);
|
|
685
|
+
this.name = 'MarketPromptUnknownRefError';
|
|
686
|
+
this.entityKind = entityKind;
|
|
687
|
+
this.providedRef = providedRef;
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
export class MarketPromptTemplateNotFoundError extends Error {
|
|
692
|
+
constructor(templateRef: string, knownRefs: string[]) {
|
|
693
|
+
super(
|
|
694
|
+
`No MarketMessageTemplate found with ref \`${templateRef}\`. `
|
|
695
|
+
+ `Known templates: ${knownRefs.length > 0 ? knownRefs.map(r => `\`${r}\``).join(', ') : '(none — author one in `specifications/src/market/messaging/`)'}.`,
|
|
696
|
+
);
|
|
697
|
+
this.name = 'MarketPromptTemplateNotFoundError';
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export interface RenderMarketPromptInput {
|
|
702
|
+
snapshot: MarketSnapshot;
|
|
703
|
+
request: MarketPromptRequest;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export function renderMarketPrompt(input: RenderMarketPromptInput): MarketPromptResult {
|
|
707
|
+
const { snapshot, request } = input;
|
|
708
|
+
const template = lookupTemplate(snapshot, request.templateRef);
|
|
709
|
+
const outputLanguage = normalizeOutputLanguage(request.outputLanguage);
|
|
710
|
+
|
|
711
|
+
// Resolve only the entities referenced by `requiredInputs`. Extra
|
|
712
|
+
// refs the caller passes (e.g. `--feature` purely for context-block
|
|
713
|
+
// intent) are not enforced as required and are NOT placed into the
|
|
714
|
+
// Mustache substitution map.
|
|
715
|
+
const resolvedEntities: PlaceholderEntities = {};
|
|
716
|
+
const consumedInputs: { kind: string; ref: string }[] = [];
|
|
717
|
+
const missing: MarketMessageRequiredInput[] = [];
|
|
718
|
+
|
|
719
|
+
for (const requiredInput of template.requiredInputs ?? []) {
|
|
720
|
+
switch (requiredInput) {
|
|
721
|
+
case MarketMessageRequiredInput.ICP_REF: {
|
|
722
|
+
if (!request.icpRef) { missing.push(requiredInput); break; }
|
|
723
|
+
resolvedEntities.icp = lookupIcp(snapshot, request.icpRef);
|
|
724
|
+
resolvedEntities.icpRef = request.icpRef;
|
|
725
|
+
consumedInputs.push({ kind: 'icp', ref: request.icpRef });
|
|
726
|
+
break;
|
|
727
|
+
}
|
|
728
|
+
case MarketMessageRequiredInput.BENEFIT_REF: {
|
|
729
|
+
if (!request.benefitRef) { missing.push(requiredInput); break; }
|
|
730
|
+
resolvedEntities.benefit = lookupBenefit(snapshot, request.benefitRef);
|
|
731
|
+
resolvedEntities.benefitRef = request.benefitRef;
|
|
732
|
+
consumedInputs.push({ kind: 'benefit', ref: request.benefitRef });
|
|
733
|
+
break;
|
|
734
|
+
}
|
|
735
|
+
case MarketMessageRequiredInput.CHANNEL_REF: {
|
|
736
|
+
if (!request.channelRef) { missing.push(requiredInput); break; }
|
|
737
|
+
resolvedEntities.channel = lookupChannel(snapshot, request.channelRef);
|
|
738
|
+
resolvedEntities.channelRef = request.channelRef;
|
|
739
|
+
consumedInputs.push({ kind: 'channel', ref: request.channelRef });
|
|
740
|
+
break;
|
|
741
|
+
}
|
|
742
|
+
case MarketMessageRequiredInput.OBJECTION_REF: {
|
|
743
|
+
if (!request.objectionRef) { missing.push(requiredInput); break; }
|
|
744
|
+
resolvedEntities.objection = lookupObjection(snapshot, request.objectionRef);
|
|
745
|
+
resolvedEntities.objectionRef = request.objectionRef;
|
|
746
|
+
consumedInputs.push({ kind: 'objection', ref: request.objectionRef });
|
|
747
|
+
break;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
if (missing.length > 0) {
|
|
753
|
+
throw new MarketPromptMissingRequiredInputError(template.ref, missing);
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
// Context-block intent — feature wins over icp when both are
|
|
757
|
+
// provided, mirroring `buildMarketContextBlock`'s feature-first
|
|
758
|
+
// semantics (a feature anchor produces a tighter benefit set).
|
|
759
|
+
const intent = pickContextIntent(request);
|
|
760
|
+
const contextBuilt = buildMarketContextBlock({
|
|
761
|
+
snapshot,
|
|
762
|
+
intent,
|
|
763
|
+
outputLanguage: request.outputLanguage,
|
|
764
|
+
});
|
|
765
|
+
|
|
766
|
+
const renderedTemplate = renderMustache(
|
|
767
|
+
template.promptTemplate,
|
|
768
|
+
{
|
|
769
|
+
...resolvedEntities,
|
|
770
|
+
output_language: outputLanguage,
|
|
771
|
+
},
|
|
772
|
+
);
|
|
773
|
+
|
|
774
|
+
const prompt = `${contextBuilt.block}\n\n${renderedTemplate}`;
|
|
775
|
+
|
|
776
|
+
return {
|
|
777
|
+
prompt,
|
|
778
|
+
renderedTemplate,
|
|
779
|
+
contextBlock: contextBuilt.block,
|
|
780
|
+
trace: {
|
|
781
|
+
template: {
|
|
782
|
+
ref: template.ref,
|
|
783
|
+
name: template.name,
|
|
784
|
+
outputKind: String(template.outputKind),
|
|
785
|
+
requiredInputs: (template.requiredInputs ?? []).map(String),
|
|
786
|
+
...(template.preferredVoiceRef ? { preferredVoiceRef: template.preferredVoiceRef } : {}),
|
|
787
|
+
},
|
|
788
|
+
context: contextBuilt.trace,
|
|
789
|
+
outputLanguage,
|
|
790
|
+
consumedInputs,
|
|
791
|
+
},
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
The parent-process service that consumes the rendered prompt and
|
|
797
|
+
invokes the LLM agent:
|
|
798
|
+
|
|
799
|
+
## Import Origins
|
|
800
|
+
|
|
801
|
+
- `@wildo-ai/dev-companion`
|
|
802
|
+
|
|
803
|
+
## Source Excerpts
|
|
804
|
+
|
|
805
|
+
### Origin Package: `@wildo-ai/dev-companion`
|
|
806
|
+
|
|
807
|
+
```typescript
|
|
808
|
+
*
|
|
809
|
+
* Market generation companion service (Phase 4.2).
|
|
810
|
+
*
|
|
811
|
+
* Two-step orchestrator that bridges the introspection subprocess
|
|
812
|
+
* (which owns snapshot + template + context-block + Mustache
|
|
813
|
+
* substitution) and the in-process `AgentsBackendService` (which
|
|
814
|
+
* owns the LLM call):
|
|
815
|
+
*
|
|
816
|
+
* 1. **Subprocess (`market-render-prompt`)** — pure prompt assembly.
|
|
817
|
+
* Resolves `marketSpecification`, runs `validateMarketSnapshot`,
|
|
818
|
+
* looks up the `MarketMessageTemplate` by ref, enforces every
|
|
819
|
+
* declared `requiredInputs` ref, calls `buildMarketContextBlock`,
|
|
820
|
+
* and substitutes Mustache placeholders. Output: `{ prompt,
|
|
821
|
+
* contextBlock, renderedTemplate, trace }`.
|
|
822
|
+
* 2. **Parent (`AgentsBackendService.invokeAgent`)** — feeds the
|
|
823
|
+
* final prompt to `market.generation.agent` (a
|
|
824
|
+
* `GENERATE_TEXT` agent) and unwraps `{ text }`. The optional
|
|
825
|
+
* `traceContext` (built by the caller from its request session +
|
|
826
|
+
* a dedicated agent step) is threaded straight into `invokeAgent`,
|
|
827
|
+
* so the engine-level agent-call trace sink records this call's
|
|
828
|
+
* prompt, output, and token-usage/latency. This is the canonical
|
|
829
|
+
* way a companion service makes its LLM calls observable — pass the
|
|
830
|
+
* `traceContext` through; the engine owns the per-call record.
|
|
831
|
+
*
|
|
832
|
+
* Why split across two boundaries instead of doing it all in one
|
|
833
|
+
* place:
|
|
834
|
+
*
|
|
835
|
+
* - The dev-companion subprocess is the *only* place that can load
|
|
836
|
+
* `marketSpecification` (it lives in the application's
|
|
837
|
+
* specifications package, which is loaded via `pathToFileURL`
|
|
838
|
+
* into the spawned child).
|
|
839
|
+
* - `AgentsBackendService` lives in the parent companion process
|
|
840
|
+
* (it depends on the saas-backend-lib DI container, which is
|
|
841
|
+
* bootstrapped exactly once at companion startup).
|
|
842
|
+
* - Doing both in the subprocess would force every introspection
|
|
843
|
+
* call to spin up a brand-new `AgentsBackendService` instance —
|
|
844
|
+
* wasteful, and worse, would lose the unified LLM-quota and
|
|
845
|
+
* provider-cache surface that lives in the parent container.
|
|
846
|
+
*
|
|
847
|
+
* Service-key picking: the market generation behaviors route to the
|
|
848
|
+
* `specifications` target which every SaaS service declares. We
|
|
849
|
+
* deliberately reuse the same "any backend service key" picker as
|
|
850
|
+
* `getResourcesRegistry` (see `pickResourcesRegistryCarrierServiceKey`
|
|
851
|
+
* in `companion.controller.ts`) — the choice is uniform across
|
|
852
|
+
* backends because the spec-package target is identical for every
|
|
853
|
+
* service of a given app.
|
|
854
|
+
*/
|
|
855
|
+
|
|
856
|
+
import { inject, injectable } from 'inversify';
|
|
857
|
+
import {
|
|
858
|
+
ErrorBuilderBackendService,
|
|
859
|
+
LoggerService,
|
|
860
|
+
MARKET_GENERATION_AGENT_REF,
|
|
861
|
+
SAAS_SERVICE_TYPES,
|
|
862
|
+
type AgentsBackendService,
|
|
863
|
+
describeCaughtError,
|
|
864
|
+
} from '@wildo-ai/saas-backend-lib';
|
|
865
|
+
import {
|
|
866
|
+
ErrorCustomMessageReference,
|
|
867
|
+
ErrorType,
|
|
868
|
+
type AgentTraceContext,
|
|
869
|
+
type FlowsActors_Agent_Invocation,
|
|
870
|
+
} from '@wildo-ai/saas-models';
|
|
871
|
+
import {
|
|
872
|
+
LLMProvider_GenerateTextInputSchema,
|
|
873
|
+
LLMProvider_GenerateTextOutputSchema,
|
|
874
|
+
LLMProvider_OperationContext_BaseSchema,
|
|
875
|
+
} from '@wildo-ai/external-connectors-models';
|
|
876
|
+
import {
|
|
877
|
+
MarketRenderPromptResponseSchema,
|
|
878
|
+
type MarketGenerationResponse,
|
|
879
|
+
} from '@wildo-ai/saas-specifications';
|
|
880
|
+
|
|
881
|
+
import { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';
|
|
882
|
+
import type { CompanionContext } from '../../core/context/companion-context';
|
|
883
|
+
import { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';
|
|
884
|
+
|
|
885
|
+
export interface MarketGenerationRequest {
|
|
886
|
+
templateRef: string;
|
|
887
|
+
icpRef?: string;
|
|
888
|
+
featureRef?: string;
|
|
889
|
+
benefitRef?: string;
|
|
890
|
+
channelRef?: string;
|
|
891
|
+
objectionRef?: string;
|
|
892
|
+
outputLanguage?: string;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Service-level alias for `MarketGenerationResponse`.
|
|
897
|
+
*
|
|
898
|
+
* The canonical shape (Zod schema + inferred type) lives in
|
|
899
|
+
* `@wildo-ai/saas-specifications` (`market-generation.schemas.ts`) so
|
|
900
|
+
* that the subprocess HTTP boundary, the parent-process service, and
|
|
901
|
+
* the CLI all parse against the same single source of truth. F-2 +
|
|
902
|
+
* F-6 from the Phase-4.2 audit consolidated three formerly
|
|
903
|
+
* hand-authored definitions into this one.
|
|
904
|
+
*/
|
|
905
|
+
export type MarketGenerationResult = MarketGenerationResponse;
|
|
906
|
+
|
|
907
|
+
@injectable()
|
|
908
|
+
export class MarketGenerationCompanionService {
|
|
909
|
+
private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;
|
|
910
|
+
|
|
911
|
+
constructor(
|
|
912
|
+
@inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,
|
|
913
|
+
@inject(SAAS_SERVICE_TYPES.ErrorBuilderService)
|
|
914
|
+
private readonly errorBuilder: ErrorBuilderBackendService,
|
|
915
|
+
@inject(SAAS_SERVICE_TYPES.AgentsBackendService)
|
|
916
|
+
private readonly agentsService: AgentsBackendService,
|
|
917
|
+
@inject(COMPANION_SERVICE_TYPES.CompanionContext)
|
|
918
|
+
private readonly companionContext: CompanionContext,
|
|
919
|
+
@inject(COMPANION_SERVICE_TYPES.IntrospectionService)
|
|
920
|
+
private readonly companionIntrospectionService: CompanionIntrospectionService,
|
|
921
|
+
) {
|
|
922
|
+
this.logDebug = this.logger.debugByType('MarketGenerationCompanionService');
|
|
923
|
+
this.logger.setDebugTypeLogging('MarketGenerationCompanionService', true);
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
public async generate(
|
|
927
|
+
request: MarketGenerationRequest,
|
|
928
|
+
traceContext?: AgentTraceContext,
|
|
929
|
+
): Promise<MarketGenerationResult> {
|
|
930
|
+
if (!request.templateRef || typeof request.templateRef !== 'string') {
|
|
931
|
+
throw this.errorBuilder.buildError(ErrorType.VALIDATION, undefined, {
|
|
932
|
+
customMessageReference: ErrorCustomMessageReference.VALIDATION,
|
|
933
|
+
context: { message: '`templateRef` is required and must be a non-empty string.' },
|
|
934
|
+
});
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
this.logDebug('market generation — start', {
|
|
938
|
+
templateRef: request.templateRef,
|
|
939
|
+
icpRef: request.icpRef,
|
|
940
|
+
featureRef: request.featureRef,
|
|
941
|
+
benefitRef: request.benefitRef,
|
|
942
|
+
channelRef: request.channelRef,
|
|
943
|
+
objectionRef: request.objectionRef,
|
|
944
|
+
outputLanguage: request.outputLanguage,
|
|
945
|
+
});
|
|
946
|
+
|
|
947
|
+
// ── 1. Subprocess prompt assembly ──────────────────────────
|
|
948
|
+
const introspection = await this.companionIntrospectionService.requestInfo({
|
|
949
|
+
serviceKey: this.pickMarketCarrierServiceKey(),
|
|
950
|
+
behavior: 'market-render-prompt',
|
|
951
|
+
input: this.buildSubprocessPayload(request),
|
|
952
|
+
});
|
|
953
|
+
|
|
954
|
+
if (introspection.success === false) {
|
|
955
|
+
const failure = introspection;
|
|
956
|
+
throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {
|
|
957
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
958
|
+
context: {
|
|
959
|
+
message: failure.error.message,
|
|
960
|
+
serviceKey: failure.serviceKey,
|
|
961
|
+
behavior: failure.behavior,
|
|
962
|
+
targetId: failure.targetId,
|
|
963
|
+
},
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
let renderResult;
|
|
968
|
+
try {
|
|
969
|
+
renderResult = MarketRenderPromptResponseSchema.parse(introspection.data);
|
|
970
|
+
} catch (error) {
|
|
971
|
+
throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {
|
|
972
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
973
|
+
context: {
|
|
974
|
+
message: `market-render-prompt subprocess returned an unexpected payload shape: ${describeCaughtError(error)}`,
|
|
975
|
+
},
|
|
976
|
+
});
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
// ── 2. Parent-process LLM call ─────────────────────────────
|
|
980
|
+
const invocation: FlowsActors_Agent_Invocation<
|
|
981
|
+
typeof LLMProvider_GenerateTextInputSchema,
|
|
982
|
+
typeof LLMProvider_GenerateTextOutputSchema,
|
|
983
|
+
typeof LLMProvider_OperationContext_BaseSchema
|
|
984
|
+
> = {
|
|
985
|
+
agentRef: MARKET_GENERATION_AGENT_REF,
|
|
986
|
+
initiator: {},
|
|
987
|
+
invocationContext: [],
|
|
988
|
+
input: { prompt: renderResult.prompt },
|
|
989
|
+
output: { text: '' },
|
|
990
|
+
executionContext: { callTimestamp: new Date().toISOString() },
|
|
991
|
+
artifactBindings: [],
|
|
992
|
+
};
|
|
993
|
+
|
|
994
|
+
const llmResult = await this.agentsService.invokeAgent(invocation, traceContext);
|
|
995
|
+
const outputText = (llmResult.output as { text?: string })?.text;
|
|
996
|
+
if (typeof outputText !== 'string' || outputText.trim().length === 0) {
|
|
997
|
+
throw this.errorBuilder.buildError(ErrorType.INTERNAL, undefined, {
|
|
998
|
+
customMessageReference: ErrorCustomMessageReference.INTERNAL,
|
|
999
|
+
context: {
|
|
1000
|
+
message: 'Market generation agent returned empty output. Check provider connectivity and prompt validity.',
|
|
1001
|
+
},
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
return {
|
|
1006
|
+
prompt: renderResult.prompt,
|
|
1007
|
+
renderedTemplate: renderResult.renderedTemplate,
|
|
1008
|
+
contextBlock: renderResult.contextBlock,
|
|
1009
|
+
output: outputText,
|
|
1010
|
+
trace: {
|
|
1011
|
+
template: renderResult.trace.template,
|
|
1012
|
+
consumedInputs: renderResult.trace.consumedInputs,
|
|
1013
|
+
outputLanguage: renderResult.trace.outputLanguage,
|
|
1014
|
+
contextIcpsConsidered: renderResult.trace.context.icpsConsidered,
|
|
1015
|
+
contextBenefitsConsidered: renderResult.trace.context.benefitsConsidered,
|
|
1016
|
+
contextVoiceUsed: renderResult.trace.context.voiceUsed,
|
|
1017
|
+
agentRef: MARKET_GENERATION_AGENT_REF,
|
|
1018
|
+
},
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Build the wire payload sent into the subprocess. We strip
|
|
1024
|
+
* `undefined`-valued keys so the subprocess parser sees the
|
|
1025
|
+
* minimal object — this keeps the JSON in IPC small and
|
|
1026
|
+
* avoids spurious "key X is not a string" guards.
|
|
1027
|
+
*/
|
|
1028
|
+
private buildSubprocessPayload(
|
|
1029
|
+
request: MarketGenerationRequest,
|
|
1030
|
+
): Record<string, string> {
|
|
1031
|
+
const payload: Record<string, string> = { templateRef: request.templateRef };
|
|
1032
|
+
if (request.icpRef) payload.icpRef = request.icpRef;
|
|
1033
|
+
if (request.featureRef) payload.featureRef = request.featureRef;
|
|
1034
|
+
if (request.benefitRef) payload.benefitRef = request.benefitRef;
|
|
1035
|
+
if (request.channelRef) payload.channelRef = request.channelRef;
|
|
1036
|
+
if (request.objectionRef) payload.objectionRef = request.objectionRef;
|
|
1037
|
+
if (request.outputLanguage) payload.outputLanguage = request.outputLanguage;
|
|
1038
|
+
return payload;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
/**
|
|
1042
|
+
* Pick the first backend service available in the companion
|
|
1043
|
+
* context. Mirrors `pickResourcesRegistryCarrierServiceKey`
|
|
1044
|
+
* (companion.controller.ts) — the market generation behaviors
|
|
1045
|
+
* route to `specifications` which every backend service
|
|
1046
|
+
* declares, so the choice is uniform.
|
|
1047
|
+
*/
|
|
1048
|
+
private pickMarketCarrierServiceKey(): string {
|
|
1049
|
+
const backendServiceKey = Object.entries(this.companionContext.servicesByKey)
|
|
1050
|
+
.find(([, service]) => !service.frontendType)?.[0];
|
|
1051
|
+
|
|
1052
|
+
if (!backendServiceKey) {
|
|
1053
|
+
throw this.errorBuilder.buildError(ErrorType.CONFIGURATION, undefined, {
|
|
1054
|
+
customMessageReference: ErrorCustomMessageReference.CONFIGURATION,
|
|
1055
|
+
context: {
|
|
1056
|
+
message: 'No backend service is available to resolve the market generation behavior. '
|
|
1057
|
+
+ 'The market-render-prompt behavior routes to the `specifications` target, which is '
|
|
1058
|
+
+ 'declared on every backend service — but the companion context has none.',
|
|
1059
|
+
},
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
return backendServiceKey;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
```
|
|
1067
|
+
|
|
1068
|
+
The framework-default actors-system definition for
|
|
1069
|
+
`market.generation.agent` (GPT-4O / `GENERATE_TEXT` / temperature 0.6),
|
|
1070
|
+
shipped from `@wildo-ai/saas-backend-lib`. An application overrides the
|
|
1071
|
+
provider/model/persona by exporting a `marketGenerationAgentOverride`
|
|
1072
|
+
on its backend companion-exports (same fixed ref):
|
|
1073
|
+
|
|
1074
|
+
## Import Origins
|
|
1075
|
+
|
|
1076
|
+
- `@wildo-ai/saas-backend-lib`
|
|
1077
|
+
|
|
1078
|
+
## Source Excerpts
|
|
1079
|
+
|
|
1080
|
+
### Origin Package: `@wildo-ai/saas-backend-lib`
|
|
1081
|
+
|
|
1082
|
+
```typescript
|
|
1083
|
+
*
|
|
1084
|
+
* Market generation agent — framework default (Phase 4.2).
|
|
1085
|
+
*
|
|
1086
|
+
* The market generation agent is a free-form text-generation LLM agent
|
|
1087
|
+
* driven by the `wildo market generate` CLI. It receives a fully
|
|
1088
|
+
* rendered prompt (market-context block + Mustache-substituted
|
|
1089
|
+
* `MarketMessageTemplate` body) and returns the LLM's prose output as a
|
|
1090
|
+
* single string.
|
|
1091
|
+
*
|
|
1092
|
+
* Import path: `@wildo-ai/saas-backend-lib`.
|
|
1093
|
+
*
|
|
1094
|
+
* **Framework default + application override.** This constant is the
|
|
1095
|
+
* default agent the dev companion registers under
|
|
1096
|
+
* `MARKET_GENERATION_AGENT_REF` when the application authors no
|
|
1097
|
+
* override. An application chooses its own LLM provider / model /
|
|
1098
|
+
* persona by exporting a `marketGenerationAgentOverride` on its backend
|
|
1099
|
+
* companion-exports (`BackendCompanionExports.marketGenerationAgentOverride`);
|
|
1100
|
+
* the companion registers the override in place of this default. The
|
|
1101
|
+
* override MUST keep `ref: MARKET_GENERATION_AGENT_REF` — the companion's
|
|
1102
|
+
* market service invokes the agent by that fixed ref, so the override
|
|
1103
|
+
* replaces the default under the same identity (an override under a
|
|
1104
|
+
* different ref would never be reached). The ref is authored here (not
|
|
1105
|
+
* in the companion) precisely so an application's `backend-api` can
|
|
1106
|
+
* import it to author a valid override.
|
|
1107
|
+
*
|
|
1108
|
+
* Why `GENERATE_TEXT` instead of `GENERATE_STRUCTURED`: Phase-4.2
|
|
1109
|
+
* outputs are always free-form prose (landing-page hero copy,
|
|
1110
|
+
* objection-response email body, etc.). A structured schema would force
|
|
1111
|
+
* every template author to also author a matching Zod schema per
|
|
1112
|
+
* variant. Mirrors the companion's `emailTemplateGenerationAgent`
|
|
1113
|
+
* pattern (a build-time `GENERATE_TEXT` scaffolding agent).
|
|
1114
|
+
*
|
|
1115
|
+
* Temperature note: 0.6 is intentionally higher than
|
|
1116
|
+
* `email-template.generation.agent` (0.4) because marketing copy
|
|
1117
|
+
* benefits from more creative latitude than email-template TSX
|
|
1118
|
+
* scaffolding. An application that wants deterministic reruns authors an
|
|
1119
|
+
* override with a lower temperature.
|
|
1120
|
+
*/
|
|
1121
|
+
|
|
1122
|
+
import {
|
|
1123
|
+
FlowsActors_Agent,
|
|
1124
|
+
FlowsActors_Agent_Skill_Type,
|
|
1125
|
+
FlowsActors_Agent_Status,
|
|
1126
|
+
ResourceOperationRiskLevel,
|
|
1127
|
+
ResourcePrimaryScope,
|
|
1128
|
+
} from '@wildo-ai/saas-models';
|
|
1129
|
+
import {
|
|
1130
|
+
LLMProvider_GenerateTextInputSchema,
|
|
1131
|
+
LLMProvider_GenerateTextOutputSchema,
|
|
1132
|
+
LLMProvider_OperationContext_BaseSchema,
|
|
1133
|
+
LLMProvider_OperationDefinitionBase,
|
|
1134
|
+
LLMProvider_OperationKey,
|
|
1135
|
+
LLM_Model,
|
|
1136
|
+
} from '@wildo-ai/external-connectors-models';
|
|
1137
|
+
|
|
1138
|
+
export const MARKET_GENERATION_AGENT_REF = 'market.generation.agent' as const;
|
|
1139
|
+
|
|
1140
|
+
export const marketGenerationAgent: FlowsActors_Agent = {
|
|
1141
|
+
ref: MARKET_GENERATION_AGENT_REF,
|
|
1142
|
+
displayName: 'Market Generation Agent',
|
|
1143
|
+
status: FlowsActors_Agent_Status.ACTIVE,
|
|
1144
|
+
config: {
|
|
1145
|
+
providerRef: 'openai',
|
|
1146
|
+
model: LLM_Model.OPEN_AI_GPT_5_6_TERRA,
|
|
1147
|
+
operationKey: LLMProvider_OperationKey.GENERATE_TEXT,
|
|
1148
|
+
// No sampling params: the GPT-5.6 family rejects non-default temperature (verified live 2026-07-16).
|
|
1149
|
+
accessControl: [{
|
|
1150
|
+
primaryScope: ResourcePrimaryScope.APPLICATION,
|
|
1151
|
+
requiresApproval: false,
|
|
1152
|
+
}],
|
|
1153
|
+
riskLevel: ResourceOperationRiskLevel.LOW,
|
|
1154
|
+
},
|
|
1155
|
+
operationDefinition: {
|
|
1156
|
+
operationKey: LLMProvider_OperationKey.GENERATE_TEXT,
|
|
1157
|
+
providerRef: 'openai',
|
|
1158
|
+
inputSchema: LLMProvider_GenerateTextInputSchema,
|
|
1159
|
+
outputSchema: LLMProvider_GenerateTextOutputSchema,
|
|
1160
|
+
operationContextSchema: LLMProvider_OperationContext_BaseSchema,
|
|
1161
|
+
} satisfies LLMProvider_OperationDefinitionBase,
|
|
1162
|
+
promptSpec: {
|
|
1163
|
+
role: 'You are a senior B2B SaaS marketing writer. You receive an English market-context '
|
|
1164
|
+
+ 'briefing followed by a single concrete writing task. The briefing is the source of truth '
|
|
1165
|
+
+ 'for ICP, benefits, voice, and any objections — never invent facts that contradict it.',
|
|
1166
|
+
persona: 'You write tight, customer-led copy. You favour the reader\'s outcomes over feature lists, '
|
|
1167
|
+
+ 'never use marketing clichés ("game-changer", "revolutionary", "synergy"), and respect the '
|
|
1168
|
+
+ 'preferred tone of voice from the briefing. When the task asks for a specific output language, '
|
|
1169
|
+
+ 'you write the entire response in that language while keeping proper nouns and product names intact.',
|
|
1170
|
+
skillType: FlowsActors_Agent_Skill_Type.GENERATION,
|
|
1171
|
+
instructions: [],
|
|
1172
|
+
},
|
|
1173
|
+
createdAt: '2026-04-17T00:00:00.000Z',
|
|
1174
|
+
};
|
|
1175
|
+
```
|
|
1176
|
+
|
|
1177
|
+
The shared HTTP response schema (`MarketGenerationResponse`)
|
|
1178
|
+
the CLI parses against and the service emits — single source of
|
|
1179
|
+
truth across the process boundary:
|
|
1180
|
+
|
|
1181
|
+
## Import Origins
|
|
1182
|
+
|
|
1183
|
+
- `@wildo-ai/saas-specifications`
|
|
1184
|
+
|
|
1185
|
+
## Source Excerpts
|
|
1186
|
+
|
|
1187
|
+
### Origin Package: `@wildo-ai/saas-specifications`
|
|
1188
|
+
|
|
1189
|
+
```typescript
|
|
1190
|
+
*
|
|
1191
|
+
* Phase-4.2 contract surface for the result returned by the
|
|
1192
|
+
* market generation pipeline:
|
|
1193
|
+
*
|
|
1194
|
+
* - **Subprocess** (`market-render-prompt` introspection behavior)
|
|
1195
|
+
* produces `MarketRenderPromptResponse` — pure prompt assembly,
|
|
1196
|
+
* no LLM call.
|
|
1197
|
+
* - **Parent process** (`MarketGenerationCompanionService`) consumes the
|
|
1198
|
+
* subprocess response, invokes `AgentsBackendService`, and produces
|
|
1199
|
+
* `MarketGenerationResponse` — the LLM-augmented variant
|
|
1200
|
+
* surfaced over `POST /api/companion/market/generate`.
|
|
1201
|
+
* - **CLI** (`wildo market generate`) consumes
|
|
1202
|
+
* `MarketGenerationResponse` over HTTP.
|
|
1203
|
+
*
|
|
1204
|
+
* Owning the contract here (rather than re-authoring it in the
|
|
1205
|
+
* dev-companion + the CLI) follows the same posture as
|
|
1206
|
+
* `market-context-block.schemas.ts` (Phase-4.1 audit closure F-13):
|
|
1207
|
+
* **anything that crosses a process boundary MUST be Zod-policed on
|
|
1208
|
+
* at least one side**. The single source of truth lives in
|
|
1209
|
+
* `saas-specifications` so both the subprocess HTTP boundary and the
|
|
1210
|
+
* CLI ↔ companion HTTP boundary can `parse()` against the same
|
|
1211
|
+
* schema, eliminating silent drift.
|
|
1212
|
+
*
|
|
1213
|
+
* The two response shapes intentionally share the same trace surface
|
|
1214
|
+
* (`MarketGenerationTemplateTraceSchema`) — the parent process passes the
|
|
1215
|
+
* subprocess trace through verbatim and only adds `agentRef`. Field
|
|
1216
|
+
* names match end-to-end (subprocess builder → handler → service →
|
|
1217
|
+
* CLI), so a refactor in any one layer surfaces a Zod parse error in
|
|
1218
|
+
* the next layer rather than a silent type drift.
|
|
1219
|
+
*/
|
|
1220
|
+
export const MarketGenerationTemplateTraceSchema = z.object({
|
|
1221
|
+
ref: z.string().min(1),
|
|
1222
|
+
name: z.string().min(1),
|
|
1223
|
+
outputKind: z.string().min(1),
|
|
1224
|
+
requiredInputs: z.array(z.string().min(1)),
|
|
1225
|
+
preferredVoiceRef: z.string().min(1).optional(),
|
|
1226
|
+
});
|
|
1227
|
+
|
|
1228
|
+
export type MarketGenerationTemplateTrace = z.infer<typeof MarketGenerationTemplateTraceSchema>;
|
|
1229
|
+
|
|
1230
|
+
export const MarketGenerationConsumedInputSchema = z.object({
|
|
1231
|
+
kind: z.string().min(1),
|
|
1232
|
+
ref: z.string().min(1),
|
|
1233
|
+
});
|
|
1234
|
+
|
|
1235
|
+
export type MarketGenerationConsumedInput = z.infer<typeof MarketGenerationConsumedInputSchema>;
|
|
1236
|
+
|
|
1237
|
+
/**
|
|
1238
|
+
* Subprocess (`market-render-prompt`) response.
|
|
1239
|
+
*
|
|
1240
|
+
* Composed shape: `{ prompt, renderedTemplate, contextBlock,
|
|
1241
|
+
* trace: { template, context, outputLanguage, consumedInputs } }`.
|
|
1242
|
+
*
|
|
1243
|
+
* `context` reuses the canonical `MarketContextBlockTraceSchema` so
|
|
1244
|
+
* the subprocess + parent-process trace shapes do not drift.
|
|
1245
|
+
*/
|
|
1246
|
+
export const MarketRenderPromptResponseSchema = z.object({
|
|
1247
|
+
prompt: z.string().min(1),
|
|
1248
|
+
renderedTemplate: z.string().min(1),
|
|
1249
|
+
contextBlock: z.string().min(1),
|
|
1250
|
+
trace: z.object({
|
|
1251
|
+
template: MarketGenerationTemplateTraceSchema,
|
|
1252
|
+
context: MarketContextBlockTraceSchema,
|
|
1253
|
+
outputLanguage: z.string().min(1),
|
|
1254
|
+
consumedInputs: z.array(MarketGenerationConsumedInputSchema),
|
|
1255
|
+
}),
|
|
1256
|
+
});
|
|
1257
|
+
|
|
1258
|
+
export type MarketRenderPromptResponse = z.infer<typeof MarketRenderPromptResponseSchema>;
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* Parent-process (`MarketGenerationCompanionService.generate`) response.
|
|
1262
|
+
*
|
|
1263
|
+
* Surfaced over `POST /api/companion/market/generate`. Adds the LLM
|
|
1264
|
+
* `output` text and a flat trace surface (the parent process
|
|
1265
|
+
* unpacks `trace.context` into `contextIcpsConsidered` /
|
|
1266
|
+
* `contextBenefitsConsidered` / `contextVoiceUsed` for CLI display
|
|
1267
|
+
* convenience, and adds the `agentRef` used for the call).
|
|
1268
|
+
*/
|
|
1269
|
+
export const MarketGenerationResponseSchema = z.object({
|
|
1270
|
+
prompt: z.string().min(1),
|
|
1271
|
+
renderedTemplate: z.string().min(1),
|
|
1272
|
+
contextBlock: z.string().min(1),
|
|
1273
|
+
output: z.string().min(1),
|
|
1274
|
+
trace: z.object({
|
|
1275
|
+
template: MarketGenerationTemplateTraceSchema,
|
|
1276
|
+
consumedInputs: z.array(MarketGenerationConsumedInputSchema),
|
|
1277
|
+
outputLanguage: z.string().min(1),
|
|
1278
|
+
contextIcpsConsidered: z.array(z.string().min(1)),
|
|
1279
|
+
contextBenefitsConsidered: z.array(z.string().min(1)),
|
|
1280
|
+
contextVoiceUsed: z.string().min(1).nullable(),
|
|
1281
|
+
agentRef: z.string().min(1),
|
|
1282
|
+
}),
|
|
1283
|
+
});
|
|
1284
|
+
|
|
1285
|
+
export type MarketGenerationResponse = z.infer<typeof MarketGenerationResponseSchema>;
|
|
1286
|
+
```
|
|
1287
|
+
|
|
1288
|
+
## Worked Example (templates the CLI generates against)
|
|
1289
|
+
|
|
1290
|
+
The CLI's `--template <ref>` resolves against the live
|
|
1291
|
+
`MarketMessageTemplate[]` on the snapshot. A reference application
|
|
1292
|
+
ships a representative seed set covering each
|
|
1293
|
+
`requiredInputs[]` shape (`ICP_REF`, `BENEFIT_REF`,
|
|
1294
|
+
`CHANNEL_REF`, `OBJECTION_REF`) and each `outputContentType`:
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
## Usage Example
|
|
1298
|
+
|
|
1299
|
+
```typescript
|
|
1300
|
+
*
|
|
1301
|
+
* Minimal application-owned message-template examples. They demonstrate how
|
|
1302
|
+
* a structured market fact set constrains an LLM request without pretending
|
|
1303
|
+
* that generated copy is already approved for publication. The examples:
|
|
1304
|
+
*
|
|
1305
|
+
* 1. Exercise the `MESSAGE_TEMPLATE_PLACEHOLDER_MISMATCH` validation rule.
|
|
1306
|
+
* 2. Provide one ICP-scoped landing-page template and one objection-response
|
|
1307
|
+
* email template for an application-managed generation workflow.
|
|
1308
|
+
* 3. Demonstrate the `{{output_language}}` runtime input: it is supplied by
|
|
1309
|
+
* the invocation context, not duplicated in `requiredInputs`.
|
|
1310
|
+
*
|
|
1311
|
+
* Recognised placeholder shapes (kept in sync with
|
|
1312
|
+
* `MarketMessageRequiredInput` ↔ `PLACEHOLDER_ENTITY_TO_REQUIRED_INPUT`
|
|
1313
|
+
* in the validated market snapshot):
|
|
1314
|
+
*
|
|
1315
|
+
* - `{{icp.name}}`, `{{icp.profile.geographies}}`, `{{icpRef}}`
|
|
1316
|
+
* → declares `MarketMessageRequiredInput.ICP_REF`.
|
|
1317
|
+
* - `{{benefit.claim}}`, `{{benefitRef}}`
|
|
1318
|
+
* → declares `MarketMessageRequiredInput.BENEFIT_REF`.
|
|
1319
|
+
* - `{{objection.claim}}`, `{{objectionRef}}`
|
|
1320
|
+
* → declares `MarketMessageRequiredInput.OBJECTION_REF`.
|
|
1321
|
+
* - `{{output_language}}` is invocation-supplied — never declared.
|
|
1322
|
+
*/
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* ICP-scoped landing-page hero. Consumed by the market-generation workflow to
|
|
1326
|
+
* render a per-ICP landing-page hero:
|
|
1327
|
+
* the LLM receives the `icp` and one in-scope `benefit`, plus the
|
|
1328
|
+
* ICP's `preferredVoiceRef`-resolved tone of voice context block.
|
|
1329
|
+
*/
|
|
1330
|
+
export const tmplLandingIcpHero: MarketMessageTemplateConfig = {
|
|
1331
|
+
ref: 'tmpl-landing-icp-hero',
|
|
1332
|
+
name: 'Landing — ICP hero block',
|
|
1333
|
+
description:
|
|
1334
|
+
'Single-paragraph hero for an ICP-scoped landing page, anchored on one '
|
|
1335
|
+
+ 'in-scope benefit. Output is rendered in {{output_language}} by the '
|
|
1336
|
+
+ 'market-generation CLI (--output-language flag).',
|
|
1337
|
+
outputKind: MarketMessageOutputKind.LANDING_PAGE,
|
|
1338
|
+
promptTemplate:
|
|
1339
|
+
'Write a single hero paragraph (maximum 60 words) for the '
|
|
1340
|
+
+ '{{icp.name}} landing page. Anchor the paragraph on the benefit '
|
|
1341
|
+
+ '"{{benefit.claim}}" and lead with the outcome the ICP recognises '
|
|
1342
|
+
+ 'from their own week, not from a feature list. Address the reader '
|
|
1343
|
+
+ 'directly. Produce the output in {{output_language}}.',
|
|
1344
|
+
requiredInputs: [
|
|
1345
|
+
MarketMessageRequiredInput.ICP_REF,
|
|
1346
|
+
MarketMessageRequiredInput.BENEFIT_REF,
|
|
1347
|
+
],
|
|
1348
|
+
preferredVoiceRef: 'voice-trusted-engineer',
|
|
1349
|
+
authored: {
|
|
1350
|
+
lastAuthoredAt: '2026-04-17T00:00:00Z',
|
|
1351
|
+
confidence: AuthoredConfidence.MEDIUM,
|
|
1352
|
+
reviewer: 'your-app@wildo.ai',
|
|
1353
|
+
notes:
|
|
1354
|
+
'Phase-4.1 mechanism seed. Realistic per-ICP variants (indie-maker, '
|
|
1355
|
+
+ 'small-team) land in Phase 4.2 once the CLI is wired.',
|
|
1356
|
+
},
|
|
1357
|
+
};
|
|
1358
|
+
|
|
1359
|
+
/**
|
|
1360
|
+
* Objection-response email. Consumed by the market-generation workflow to
|
|
1361
|
+
* draft a 1:1 sales / customer-success reply when a known objection is raised
|
|
1362
|
+
* — pairs the `objection` with the strongest related `benefit` and
|
|
1363
|
+
* the `icp` of the contact.
|
|
1364
|
+
*/
|
|
1365
|
+
export const tmplObjectionResponseEmail: MarketMessageTemplateConfig = {
|
|
1366
|
+
ref: 'tmpl-objection-response-email',
|
|
1367
|
+
name: 'Email — objection response',
|
|
1368
|
+
description:
|
|
1369
|
+
'Short reply email (≤120 words) addressing one named objection for an '
|
|
1370
|
+
+ 'ICP, citing one related benefit. Output is rendered in '
|
|
1371
|
+
+ '{{output_language}}.',
|
|
1372
|
+
outputKind: MarketMessageOutputKind.OBJECTION_RESPONSE,
|
|
1373
|
+
promptTemplate:
|
|
1374
|
+
'Draft a reply email (≤120 words) for a {{icp.name}} contact who raised '
|
|
1375
|
+
+ 'the objection "{{objection.claim}}". Acknowledge the concern in one '
|
|
1376
|
+
+ 'sentence, then ground the response in the benefit '
|
|
1377
|
+
+ '"{{benefit.claim}}". Close with one specific next action that does '
|
|
1378
|
+
+ 'not require a demo. Produce the output in {{output_language}}.',
|
|
1379
|
+
requiredInputs: [
|
|
1380
|
+
MarketMessageRequiredInput.ICP_REF,
|
|
1381
|
+
MarketMessageRequiredInput.BENEFIT_REF,
|
|
1382
|
+
MarketMessageRequiredInput.OBJECTION_REF,
|
|
1383
|
+
],
|
|
1384
|
+
preferredVoiceRef: 'voice-trusted-engineer',
|
|
1385
|
+
authored: {
|
|
1386
|
+
lastAuthoredAt: '2026-04-17T00:00:00Z',
|
|
1387
|
+
confidence: AuthoredConfidence.MEDIUM,
|
|
1388
|
+
reviewer: 'your-app@wildo.ai',
|
|
1389
|
+
notes:
|
|
1390
|
+
'Phase-4.1 mechanism seed. Coverage by objection family expands in '
|
|
1391
|
+
+ 'Phase 4.2 (per-objection variants) once the market-generation CLI ships.',
|
|
1392
|
+
},
|
|
1393
|
+
};
|
|
1394
|
+
|
|
1395
|
+
export const applicationMessageTemplates: MarketMessageTemplateConfig[] = [
|
|
1396
|
+
tmplLandingIcpHero,
|
|
1397
|
+
tmplObjectionResponseEmail,
|
|
1398
|
+
];
|
|
1399
|
+
```
|
|
1400
|
+
|
|
1401
|
+
Use this as the "what does a template the CLI can target look
|
|
1402
|
+
like?" reference when authoring new templates. The
|
|
1403
|
+
`requiredInputs[]` declaration on each template is the source of
|
|
1404
|
+
truth for which CLI flags must be passed (the
|
|
1405
|
+
`requiredInputs[]` ↔ flag mapping in the Verification checklist
|
|
1406
|
+
above is derived from this shape).
|
|
1407
|
+
|
|
1408
|
+
## Verification
|
|
1409
|
+
|
|
1410
|
+
- [ ] Command runs in a SaaS-app cwd (scope gate passes)
|
|
1411
|
+
- [ ] `--template` is passed and resolves to a real
|
|
1412
|
+
`MarketMessageTemplate.ref` on the live snapshot
|
|
1413
|
+
- [ ] Every `requiredInputs[]` entry on the chosen template has a
|
|
1414
|
+
matching CLI flag (`ICP_REF` → `--icp`, `BENEFIT_REF` →
|
|
1415
|
+
`--benefit`, `CHANNEL_REF` → `--channel`, `OBJECTION_REF` →
|
|
1416
|
+
`--objection`)
|
|
1417
|
+
- [ ] `--language` is passed when non-English output is desired
|
|
1418
|
+
(omit for English)
|
|
1419
|
+
- [ ] LLM output prints to stdout; trace headline appears even
|
|
1420
|
+
without `--explain`
|
|
1421
|
+
- [ ] Soft-warning surfaces when extra entity flags are passed
|
|
1422
|
+
(informational only — generation succeeds)
|
|
1423
|
+
- [ ] Long generations (objection emails, multi-pillar landings)
|
|
1424
|
+
complete inside `--timeout` or the 90 s default
|
|
1425
|
+
|
|
1426
|
+
### Grep invariants
|
|
1427
|
+
|
|
1428
|
+
| Invariant | Command |
|
|
1429
|
+
|------------------------------------------------------------------|----------------------------------------------------------------------------------------|
|
|
1430
|
+
| The CLI command class is registered in the `Market` category | `rg -n "category:\\s*CommandCategory\\.Market" --type ts` |
|
|
1431
|
+
| The companion HTTP route the CLI POSTs to | `rg -n "/api/companion/market/generate" --type ts` |
|
|
1432
|
+
| The default timeout constant has not drifted | `rg -n "MARKET_COMPANION_DEFAULT_TIMEOUT_MS\\s*=\\s*90_000" --type ts` |
|
|
1433
|
+
| The renderer's typed errors surface to the CLI | `rg -n "MarketPrompt(MissingRequiredInput\|UnknownRef\|UnknownPlaceholder\|TemplateNotFound)Error" --type ts` |
|
|
1434
|
+
|
|
1435
|
+
## Common Rationalizations
|
|
1436
|
+
|
|
1437
|
+
| Rationalization | Reality |
|
|
1438
|
+
|-----------------|---------|
|
|
1439
|
+
| "Pass every entity flag every time — it can't hurt." | The renderer ignores extras and surfaces a soft warning. Worse: passing the wrong `--benefit` ref alongside an unrelated template makes the warning misleading and trains the operator to ignore it. Pass only what the template's `requiredInputs[]` declares. |
|
|
1440
|
+
| "Drop `--language` and the LLM will pick from `--icp.profile.geographies`." | The agent does not infer language from geography. Without `--language`, `{{output_language}}` substitutes `English` and the LLM produces English output. Always pass `--language` explicitly when non-English output is desired. |
|
|
1441
|
+
| "Use `--explain` only when the LLM output looks wrong." | `--explain` is also the fastest authoring loop — render the prompt, edit the template's `promptTemplate`, re-render, repeat. Treating it as a debug-only flag wastes the cheapest iteration surface. |
|
|
1442
|
+
| "Bump `--timeout` to 600 — GPT can be slow." | 90 s is enough for representative shipped seed templates. A 10-minute timeout masks a runaway renderer, a wedged companion, or a template that asks the LLM for too much. If you need >180 s consistently, the template body itself is the problem. |
|
|
1443
|
+
| "Run the CLI from the repo root and pass `--cwd` everywhere." | The scope gate reads `WorkspaceScope.SAAS_APP` from the current `cliContext`. Run from inside the app folder; the gate's error message is the canonical fix. |
|
|
1444
|
+
|
|
1445
|
+
## Red Flags
|
|
1446
|
+
|
|
1447
|
+
- A wrapper script that calls `wildo market generate` with a
|
|
1448
|
+
hardcoded `--template` and a `--benefit` flag the template does
|
|
1449
|
+
not declare — the soft warning will fire on every run; either
|
|
1450
|
+
drop the flag or update the template's `requiredInputs[]`.
|
|
1451
|
+
- Sustained `--timeout 600+` overrides in operator scripts —
|
|
1452
|
+
the renderer + LLM should fit comfortably inside 90–180 s. Long
|
|
1453
|
+
overrides usually point at a template asking for too much output
|
|
1454
|
+
or a degraded GPT-4O window.
|
|
1455
|
+
- Using `--explain` to copy the rendered prompt into another tool
|
|
1456
|
+
and calling the LLM independently — the rendered prompt is an
|
|
1457
|
+
internal artefact (snapshot-shape sensitive). Re-running through
|
|
1458
|
+
the CLI keeps the trace + voice attribution honest.
|
|
1459
|
+
- A consumer that parses the CLI's stdout with regex to extract
|
|
1460
|
+
the LLM output — the printed shape is operator-facing. For
|
|
1461
|
+
programmatic consumption, call POST
|
|
1462
|
+
`/api/companion/market/generate` directly and parse the typed
|
|
1463
|
+
`MarketGenerationResponse` from `@wildo-ai/saas-specifications`.
|
|
1464
|
+
|
|
1465
|
+
## References
|
|
1466
|
+
|
|
1467
|
+
- `references/framework-market-generation-cli.md` — full CLI flag
|
|
1468
|
+
table, exit-code summary, and the request / response schema
|
|
1469
|
+
shapes the CLI sits on top of.
|
|
1470
|
+
|
|
1471
|
+
## Related Skills
|
|
1472
|
+
|
|
1473
|
+
- `market-message-templates-authoring` — author the templates the
|
|
1474
|
+
CLI consumes (`MarketMessageTemplate.ref`, `requiredInputs[]`,
|
|
1475
|
+
`promptTemplate`, `preferredVoiceRef`)
|
|
1476
|
+
- `market-companion-prompt-enrichment` — the underlying
|
|
1477
|
+
`market-context-for-feature` / `market-context-for-icp`
|
|
1478
|
+
companion behaviors that produce the context block paired with
|
|
1479
|
+
the template body
|
|
1480
|
+
- `market-snapshot-validation` — owns the
|
|
1481
|
+
`MESSAGE_TEMPLATE_PLACEHOLDER_MISMATCH` rule that polices the
|
|
1482
|
+
template / placeholder coherence the CLI relies on
|
|
1483
|
+
- `market-authoring-overview` — assembles the snapshot the CLI
|
|
1484
|
+
reads through the companion
|