@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
package/dist/knowledge/references/saas.specifications.assurance-document-blueprint.contract.md
ADDED
|
@@ -0,0 +1,1158 @@
|
|
|
1
|
+
# saas.specifications.assurance-document-blueprint.contract
|
|
2
|
+
|
|
3
|
+
## Import Origins
|
|
4
|
+
|
|
5
|
+
- `@wildo-ai/saas-specifications`
|
|
6
|
+
|
|
7
|
+
## Source Excerpts
|
|
8
|
+
|
|
9
|
+
### Origin Package: `@wildo-ai/saas-specifications`
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
*
|
|
13
|
+
* Blueprint input kinds are deliberately semantic rather than UI-shaped. A creation host may render these as any suitable
|
|
14
|
+
* control, but it must preserve the answer type and the authority boundary declared by the question.
|
|
15
|
+
*/
|
|
16
|
+
export enum AssuranceDocumentQuestionAnswerKind {
|
|
17
|
+
BOOLEAN = "BOOLEAN",
|
|
18
|
+
DATE = "DATE",
|
|
19
|
+
ENTITY_REF_LIST = "ENTITY_REF_LIST",
|
|
20
|
+
JURISDICTION_REF_LIST = "JURISDICTION_REF_LIST",
|
|
21
|
+
SEMANTIC_MULTI_SELECT = "SEMANTIC_MULTI_SELECT",
|
|
22
|
+
SEMANTIC_SINGLE_SELECT = "SEMANTIC_SINGLE_SELECT",
|
|
23
|
+
STRUCTURED_VALUE = "STRUCTURED_VALUE",
|
|
24
|
+
TEXT = "TEXT",
|
|
25
|
+
URL = "URL",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export enum AssuranceDocumentFactAuthorityKind {
|
|
29
|
+
APPLICATION_SPECIFICATION = "APPLICATION_SPECIFICATION",
|
|
30
|
+
CREATOR_DECISION = "CREATOR_DECISION",
|
|
31
|
+
QUALIFIED_REVIEW = "QUALIFIED_REVIEW",
|
|
32
|
+
RUNTIME_EVIDENCE = "RUNTIME_EVIDENCE",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export enum AssuranceDocumentClauseInclusionKind {
|
|
36
|
+
CONDITIONAL = "CONDITIONAL",
|
|
37
|
+
REQUIRED = "REQUIRED",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export enum AssuranceDocumentConditionOperator {
|
|
41
|
+
FACT_CONTAINS_SEMANTIC_OPTION = "FACT_CONTAINS_SEMANTIC_OPTION",
|
|
42
|
+
FACT_EQUALS_SEMANTIC_OPTION = "FACT_EQUALS_SEMANTIC_OPTION",
|
|
43
|
+
FACT_FALSE = "FACT_FALSE",
|
|
44
|
+
FACT_KNOWN = "FACT_KNOWN",
|
|
45
|
+
FACT_TRUE = "FACT_TRUE",
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export enum AssuranceDocumentClaimGuardFailureDisposition {
|
|
49
|
+
BLOCK_CANDIDATE = "BLOCK_CANDIDATE",
|
|
50
|
+
REQUIRE_QUALIFIED_REVIEW = "REQUIRE_QUALIFIED_REVIEW",
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export enum AssuranceDocumentReviewChecklistSubjectKind {
|
|
54
|
+
BLUEPRINT = "BLUEPRINT",
|
|
55
|
+
CLAIM_GUARD = "CLAIM_GUARD",
|
|
56
|
+
CLAUSE = "CLAUSE",
|
|
57
|
+
SECTION = "SECTION",
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Cardinality of one blueprint-declared candidate variant axis. */
|
|
61
|
+
export enum AssuranceDocumentVariantSelectionCardinality {
|
|
62
|
+
EXACTLY_ONE = "EXACTLY_ONE",
|
|
63
|
+
ONE_OR_MORE = "ONE_OR_MORE",
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export const AssuranceDocumentBlueprintVariantOptionSchema = z
|
|
67
|
+
.strictObject({
|
|
68
|
+
optionRef: AssuranceNamespacedRefSchema,
|
|
69
|
+
creatorMeaning: z.string().trim().min(1),
|
|
70
|
+
supportingFactRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
71
|
+
})
|
|
72
|
+
.superRefine((option, context) => {
|
|
73
|
+
addUniqueSortedIssue(option.supportingFactRefs, context, ["supportingFactRefs"], "supportingFactRefs");
|
|
74
|
+
});
|
|
75
|
+
export type AssuranceDocumentBlueprintVariantOption = z.infer<typeof AssuranceDocumentBlueprintVariantOptionSchema>;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* A source-neutral variant choice the candidate author must make from resolved
|
|
79
|
+
* facts. The axis supplies no prose and cannot infer its own selection.
|
|
80
|
+
*/
|
|
81
|
+
export const AssuranceDocumentBlueprintVariantAxisSchema = z
|
|
82
|
+
.strictObject({
|
|
83
|
+
axisRef: AssuranceNamespacedRefSchema,
|
|
84
|
+
axisVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
85
|
+
selectionCardinality: z.enum(AssuranceDocumentVariantSelectionCardinality),
|
|
86
|
+
creatorPrompt: z.string().trim().min(1),
|
|
87
|
+
options: z.array(AssuranceDocumentBlueprintVariantOptionSchema).min(2),
|
|
88
|
+
})
|
|
89
|
+
.superRefine((axis, context) => {
|
|
90
|
+
addUniqueSortedIssue(
|
|
91
|
+
axis.options.map((option) => option.optionRef),
|
|
92
|
+
context,
|
|
93
|
+
["options"],
|
|
94
|
+
"variant option references",
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
export type AssuranceDocumentBlueprintVariantAxis = z.infer<typeof AssuranceDocumentBlueprintVariantAxisSchema>;
|
|
98
|
+
|
|
99
|
+
export const AssuranceDocumentSemanticOptionSchema = z.strictObject({
|
|
100
|
+
optionRef: AssuranceNamespacedRefSchema,
|
|
101
|
+
creatorMeaning: z.string().trim().min(1),
|
|
102
|
+
});
|
|
103
|
+
export type AssuranceDocumentSemanticOption = z.infer<typeof AssuranceDocumentSemanticOptionSchema>;
|
|
104
|
+
|
|
105
|
+
/** Retained question contract used only by catalog v2 blueprints. */
|
|
106
|
+
export const AssuranceDocumentBlueprintQuestionV1Schema = z
|
|
107
|
+
.strictObject({
|
|
108
|
+
questionRef: AssuranceNamespacedRefSchema,
|
|
109
|
+
questionVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
110
|
+
factRef: AssuranceNamespacedRefSchema,
|
|
111
|
+
creatorPrompt: z.string().trim().min(1),
|
|
112
|
+
decisionPurpose: z.string().trim().min(1),
|
|
113
|
+
answerKind: z.enum([
|
|
114
|
+
AssuranceDocumentQuestionAnswerKind.BOOLEAN,
|
|
115
|
+
AssuranceDocumentQuestionAnswerKind.DATE,
|
|
116
|
+
AssuranceDocumentQuestionAnswerKind.ENTITY_REF_LIST,
|
|
117
|
+
AssuranceDocumentQuestionAnswerKind.JURISDICTION_REF_LIST,
|
|
118
|
+
AssuranceDocumentQuestionAnswerKind.SEMANTIC_MULTI_SELECT,
|
|
119
|
+
AssuranceDocumentQuestionAnswerKind.SEMANTIC_SINGLE_SELECT,
|
|
120
|
+
AssuranceDocumentQuestionAnswerKind.TEXT,
|
|
121
|
+
AssuranceDocumentQuestionAnswerKind.URL,
|
|
122
|
+
]),
|
|
123
|
+
factAuthorityKind: z.enum(AssuranceDocumentFactAuthorityKind),
|
|
124
|
+
sensitivityRef: AssuranceNamespacedRefSchema,
|
|
125
|
+
allowsNotApplicable: z.boolean(),
|
|
126
|
+
semanticOptions: z.array(AssuranceDocumentSemanticOptionSchema),
|
|
127
|
+
})
|
|
128
|
+
.superRefine((question, context) => {
|
|
129
|
+
addUniqueSortedIssue(
|
|
130
|
+
question.semanticOptions.map((option) => option.optionRef),
|
|
131
|
+
context,
|
|
132
|
+
["semanticOptions"],
|
|
133
|
+
"semantic option references",
|
|
134
|
+
);
|
|
135
|
+
const usesSemanticOptions =
|
|
136
|
+
question.answerKind === AssuranceDocumentQuestionAnswerKind.SEMANTIC_SINGLE_SELECT ||
|
|
137
|
+
question.answerKind === AssuranceDocumentQuestionAnswerKind.SEMANTIC_MULTI_SELECT;
|
|
138
|
+
if (usesSemanticOptions && question.semanticOptions.length === 0) {
|
|
139
|
+
context.addIssue({ code: "custom", message: "semantic-select questions require semanticOptions", path: ["semanticOptions"] });
|
|
140
|
+
}
|
|
141
|
+
if (!usesSemanticOptions && question.semanticOptions.length > 0) {
|
|
142
|
+
context.addIssue({ code: "custom", message: "only semantic-select questions may declare semanticOptions", path: ["semanticOptions"] });
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
const AssuranceDocumentBlueprintQuestionV2CommonSchema = z.strictObject({
|
|
147
|
+
schemaVersion: z.literal(2),
|
|
148
|
+
questionRef: AssuranceNamespacedRefSchema,
|
|
149
|
+
questionVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
150
|
+
factRef: AssuranceNamespacedRefSchema,
|
|
151
|
+
creatorPrompt: z.string().trim().min(1),
|
|
152
|
+
decisionPurpose: z.string().trim().min(1),
|
|
153
|
+
factAuthorityKind: z.enum(AssuranceDocumentFactAuthorityKind),
|
|
154
|
+
sensitivityRef: AssuranceNamespacedRefSchema,
|
|
155
|
+
allowsNotApplicable: z.boolean(),
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
const AssuranceDocumentBlueprintQuestionV2ScalarSchema = AssuranceDocumentBlueprintQuestionV2CommonSchema.extend({
|
|
159
|
+
answerKind: z.enum([
|
|
160
|
+
AssuranceDocumentQuestionAnswerKind.BOOLEAN,
|
|
161
|
+
AssuranceDocumentQuestionAnswerKind.DATE,
|
|
162
|
+
AssuranceDocumentQuestionAnswerKind.ENTITY_REF_LIST,
|
|
163
|
+
AssuranceDocumentQuestionAnswerKind.JURISDICTION_REF_LIST,
|
|
164
|
+
AssuranceDocumentQuestionAnswerKind.TEXT,
|
|
165
|
+
AssuranceDocumentQuestionAnswerKind.URL,
|
|
166
|
+
]),
|
|
167
|
+
semanticOptions: z.tuple([]),
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
const AssuranceDocumentBlueprintQuestionV2SemanticSchema = AssuranceDocumentBlueprintQuestionV2CommonSchema.extend({
|
|
171
|
+
answerKind: z.enum([AssuranceDocumentQuestionAnswerKind.SEMANTIC_MULTI_SELECT, AssuranceDocumentQuestionAnswerKind.SEMANTIC_SINGLE_SELECT]),
|
|
172
|
+
semanticOptions: z.array(AssuranceDocumentSemanticOptionSchema).min(1),
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
export const AssuranceDocumentStructuredValueContractIdentitySchema = z.strictObject({
|
|
176
|
+
contractRef: AssuranceNamespacedRefSchema,
|
|
177
|
+
contractVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
178
|
+
});
|
|
179
|
+
export type AssuranceDocumentStructuredValueContractIdentity = z.infer<typeof AssuranceDocumentStructuredValueContractIdentitySchema>;
|
|
180
|
+
|
|
181
|
+
const AssuranceDocumentBlueprintQuestionV2StructuredSchema = AssuranceDocumentBlueprintQuestionV2CommonSchema.extend({
|
|
182
|
+
answerKind: z.literal(AssuranceDocumentQuestionAnswerKind.STRUCTURED_VALUE),
|
|
183
|
+
semanticOptions: z.tuple([]),
|
|
184
|
+
structuredValueContract: AssuranceDocumentStructuredValueContractIdentitySchema,
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Current blueprint question. Its discriminated shape makes it impossible for scalar questions to smuggle a structured contract or for structured questions to
|
|
189
|
+
* fall back to an untyped JSON value.
|
|
190
|
+
*/
|
|
191
|
+
export const AssuranceDocumentBlueprintQuestionV2Schema = z
|
|
192
|
+
.discriminatedUnion("answerKind", [
|
|
193
|
+
AssuranceDocumentBlueprintQuestionV2ScalarSchema,
|
|
194
|
+
AssuranceDocumentBlueprintQuestionV2SemanticSchema,
|
|
195
|
+
AssuranceDocumentBlueprintQuestionV2StructuredSchema,
|
|
196
|
+
])
|
|
197
|
+
.superRefine((question, context) => {
|
|
198
|
+
if (
|
|
199
|
+
!valuesAreUnique(question.semanticOptions.map((option) => option.optionRef)) ||
|
|
200
|
+
!valuesAreLexicallySorted(question.semanticOptions.map((option) => option.optionRef))
|
|
201
|
+
) {
|
|
202
|
+
context.addIssue({ code: "custom", message: "semantic option references must be unique and lexically sorted", path: ["semanticOptions"] });
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
export const AssuranceDocumentBlueprintQuestionSchema = z.union([AssuranceDocumentBlueprintQuestionV1Schema, AssuranceDocumentBlueprintQuestionV2Schema]);
|
|
207
|
+
export type AssuranceDocumentBlueprintQuestion = z.infer<typeof AssuranceDocumentBlueprintQuestionSchema>;
|
|
208
|
+
|
|
209
|
+
const AssuranceDocumentFactConditionCommonSchema = z.strictObject({ factRef: AssuranceNamespacedRefSchema });
|
|
210
|
+
export const AssuranceDocumentFactConditionSchema = z.discriminatedUnion("operator", [
|
|
211
|
+
AssuranceDocumentFactConditionCommonSchema.extend({ operator: z.literal(AssuranceDocumentConditionOperator.FACT_KNOWN) }),
|
|
212
|
+
AssuranceDocumentFactConditionCommonSchema.extend({ operator: z.literal(AssuranceDocumentConditionOperator.FACT_TRUE) }),
|
|
213
|
+
AssuranceDocumentFactConditionCommonSchema.extend({ operator: z.literal(AssuranceDocumentConditionOperator.FACT_FALSE) }),
|
|
214
|
+
AssuranceDocumentFactConditionCommonSchema.extend({
|
|
215
|
+
operator: z.literal(AssuranceDocumentConditionOperator.FACT_EQUALS_SEMANTIC_OPTION),
|
|
216
|
+
semanticOptionRef: AssuranceNamespacedRefSchema,
|
|
217
|
+
}),
|
|
218
|
+
AssuranceDocumentFactConditionCommonSchema.extend({
|
|
219
|
+
operator: z.literal(AssuranceDocumentConditionOperator.FACT_CONTAINS_SEMANTIC_OPTION),
|
|
220
|
+
semanticOptionRef: AssuranceNamespacedRefSchema,
|
|
221
|
+
}),
|
|
222
|
+
]);
|
|
223
|
+
export type AssuranceDocumentFactCondition = z.infer<typeof AssuranceDocumentFactConditionSchema>;
|
|
224
|
+
|
|
225
|
+
/** Conditions inside one group are ANDed; groups are ORed. No executable expression is accepted. */
|
|
226
|
+
export const AssuranceDocumentConditionGroupSchema = z
|
|
227
|
+
.strictObject({
|
|
228
|
+
conditionGroupRef: AssuranceNamespacedRefSchema,
|
|
229
|
+
conditions: z.array(AssuranceDocumentFactConditionSchema).min(1),
|
|
230
|
+
})
|
|
231
|
+
.superRefine((group, context) => {
|
|
232
|
+
const conditionKeys = group.conditions.map((condition) =>
|
|
233
|
+
"semanticOptionRef" in condition
|
|
234
|
+
? `${condition.factRef}\0${condition.operator}\0${condition.semanticOptionRef}`
|
|
235
|
+
: `${condition.factRef}\0${condition.operator}`,
|
|
236
|
+
);
|
|
237
|
+
if (!valuesAreUnique(conditionKeys)) {
|
|
238
|
+
context.addIssue({ code: "custom", message: "condition groups cannot repeat an identical condition", path: ["conditions"] });
|
|
239
|
+
}
|
|
240
|
+
const operatorsByFactRef = new Map<string, Set<AssuranceDocumentConditionOperator>>();
|
|
241
|
+
const equalityOptionsByFactRef = new Map<string, Set<string>>();
|
|
242
|
+
group.conditions.forEach((condition) => {
|
|
243
|
+
const operators = operatorsByFactRef.get(condition.factRef) ?? new Set<AssuranceDocumentConditionOperator>();
|
|
244
|
+
operators.add(condition.operator);
|
|
245
|
+
operatorsByFactRef.set(condition.factRef, operators);
|
|
246
|
+
if (condition.operator === AssuranceDocumentConditionOperator.FACT_EQUALS_SEMANTIC_OPTION) {
|
|
247
|
+
const options = equalityOptionsByFactRef.get(condition.factRef) ?? new Set<string>();
|
|
248
|
+
options.add(condition.semanticOptionRef);
|
|
249
|
+
equalityOptionsByFactRef.set(condition.factRef, options);
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
operatorsByFactRef.forEach((operators, factRef) => {
|
|
253
|
+
if (operators.has(AssuranceDocumentConditionOperator.FACT_TRUE) && operators.has(AssuranceDocumentConditionOperator.FACT_FALSE)) {
|
|
254
|
+
context.addIssue({ code: "custom", message: `condition group contradicts itself for boolean fact ${factRef}`, path: ["conditions"] });
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
equalityOptionsByFactRef.forEach((options, factRef) => {
|
|
258
|
+
if (options.size > 1) {
|
|
259
|
+
context.addIssue({ code: "custom", message: `condition group requires mutually exclusive semantic options for fact ${factRef}`, path: ["conditions"] });
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
export type AssuranceDocumentConditionGroup = z.infer<typeof AssuranceDocumentConditionGroupSchema>;
|
|
264
|
+
|
|
265
|
+
export const AssuranceDocumentClauseVariableSchema = z.strictObject({
|
|
266
|
+
variableRef: AssuranceNamespacedRefSchema,
|
|
267
|
+
factRef: AssuranceNamespacedRefSchema,
|
|
268
|
+
});
|
|
269
|
+
export type AssuranceDocumentClauseVariable = z.infer<typeof AssuranceDocumentClauseVariableSchema>;
|
|
270
|
+
|
|
271
|
+
export const AssuranceDocumentBlueprintClauseSchema = z
|
|
272
|
+
.strictObject({
|
|
273
|
+
clauseRef: AssuranceNamespacedRefSchema,
|
|
274
|
+
clauseVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
275
|
+
sectionRef: AssuranceNamespacedRefSchema,
|
|
276
|
+
inclusionKind: z.enum(AssuranceDocumentClauseInclusionKind),
|
|
277
|
+
draftingPurpose: z.string().trim().min(1),
|
|
278
|
+
requiredFactRefs: z.array(AssuranceNamespacedRefSchema),
|
|
279
|
+
variables: z.array(AssuranceDocumentClauseVariableSchema),
|
|
280
|
+
sourcePolicyRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
281
|
+
claimGuardRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
282
|
+
conditionGroups: z.array(AssuranceDocumentConditionGroupSchema),
|
|
283
|
+
})
|
|
284
|
+
.superRefine((clause, context) => {
|
|
285
|
+
addUniqueSortedIssue(clause.requiredFactRefs, context, ["requiredFactRefs"], "requiredFactRefs");
|
|
286
|
+
addUniqueSortedIssue(
|
|
287
|
+
clause.variables.map((variable) => variable.variableRef),
|
|
288
|
+
context,
|
|
289
|
+
["variables"],
|
|
290
|
+
"variable references",
|
|
291
|
+
);
|
|
292
|
+
addUniqueSortedIssue(clause.sourcePolicyRefs, context, ["sourcePolicyRefs"], "sourcePolicyRefs");
|
|
293
|
+
addUniqueSortedIssue(clause.claimGuardRefs, context, ["claimGuardRefs"], "claimGuardRefs");
|
|
294
|
+
addUniqueSortedIssue(
|
|
295
|
+
clause.conditionGroups.map((group) => group.conditionGroupRef),
|
|
296
|
+
context,
|
|
297
|
+
["conditionGroups"],
|
|
298
|
+
"condition group references",
|
|
299
|
+
);
|
|
300
|
+
if (clause.inclusionKind === AssuranceDocumentClauseInclusionKind.REQUIRED && clause.conditionGroups.length > 0) {
|
|
301
|
+
context.addIssue({ code: "custom", message: "required clauses cannot declare inclusion conditions", path: ["conditionGroups"] });
|
|
302
|
+
}
|
|
303
|
+
if (clause.inclusionKind === AssuranceDocumentClauseInclusionKind.CONDITIONAL && clause.conditionGroups.length === 0) {
|
|
304
|
+
context.addIssue({ code: "custom", message: "conditional clauses require at least one condition group", path: ["conditionGroups"] });
|
|
305
|
+
}
|
|
306
|
+
const variableFactRefs = clause.variables.map((variable) => variable.factRef).sort(compareCanonicalText);
|
|
307
|
+
const requiredFactRefs = [...clause.requiredFactRefs].sort(compareCanonicalText);
|
|
308
|
+
if (!valuesAreUnique(variableFactRefs) || JSON.stringify(variableFactRefs) !== JSON.stringify(requiredFactRefs)) {
|
|
309
|
+
context.addIssue({ code: "custom", message: "clause variables must cover every required fact exactly once", path: ["variables"] });
|
|
310
|
+
}
|
|
311
|
+
clause.conditionGroups.forEach((group, groupIndex) => {
|
|
312
|
+
group.conditions.forEach((condition, conditionIndex) => {
|
|
313
|
+
if (!clause.requiredFactRefs.includes(condition.factRef)) {
|
|
314
|
+
context.addIssue({
|
|
315
|
+
code: "custom",
|
|
316
|
+
message: `condition fact ${condition.factRef} must be declared in requiredFactRefs`,
|
|
317
|
+
path: ["conditionGroups", groupIndex, "conditions", conditionIndex, "factRef"],
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
});
|
|
322
|
+
});
|
|
323
|
+
export type AssuranceDocumentBlueprintClause = z.infer<typeof AssuranceDocumentBlueprintClauseSchema>;
|
|
324
|
+
|
|
325
|
+
export const AssuranceDocumentBlueprintSectionSchema = z.strictObject({
|
|
326
|
+
sectionRef: AssuranceNamespacedRefSchema,
|
|
327
|
+
sectionVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
328
|
+
order: GovernedDocumentPositiveSafeIntegerSchema,
|
|
329
|
+
draftingPurpose: z.string().trim().min(1),
|
|
330
|
+
requiredFactRefs: z.array(AssuranceNamespacedRefSchema),
|
|
331
|
+
clauseRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
332
|
+
});
|
|
333
|
+
export type AssuranceDocumentBlueprintSection = z.infer<typeof AssuranceDocumentBlueprintSectionSchema>;
|
|
334
|
+
|
|
335
|
+
export const AssuranceDocumentClaimGuardSchema = z
|
|
336
|
+
.strictObject({
|
|
337
|
+
guardRef: AssuranceNamespacedRefSchema,
|
|
338
|
+
guardVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
339
|
+
claimPolicyRef: AssuranceNamespacedRefSchema,
|
|
340
|
+
prohibitedClaims: z.array(z.enum(AssuranceDocumentClaimProhibition)).min(1),
|
|
341
|
+
requiredFactRefs: z.array(AssuranceNamespacedRefSchema),
|
|
342
|
+
requiredEvidenceRefs: z.array(AssuranceNamespacedRefSchema),
|
|
343
|
+
requiredAuthorityRefs: z.array(AssuranceNamespacedRefSchema),
|
|
344
|
+
failureDisposition: z.enum(AssuranceDocumentClaimGuardFailureDisposition),
|
|
345
|
+
reviewerInstruction: z.string().trim().min(1),
|
|
346
|
+
})
|
|
347
|
+
.superRefine((guard, context) => {
|
|
348
|
+
addUniqueSortedIssue(guard.prohibitedClaims, context, ["prohibitedClaims"], "prohibitedClaims");
|
|
349
|
+
addUniqueSortedIssue(guard.requiredFactRefs, context, ["requiredFactRefs"], "requiredFactRefs");
|
|
350
|
+
addUniqueSortedIssue(guard.requiredEvidenceRefs, context, ["requiredEvidenceRefs"], "requiredEvidenceRefs");
|
|
351
|
+
addUniqueSortedIssue(guard.requiredAuthorityRefs, context, ["requiredAuthorityRefs"], "requiredAuthorityRefs");
|
|
352
|
+
if (guard.failureDisposition === AssuranceDocumentClaimGuardFailureDisposition.REQUIRE_QUALIFIED_REVIEW && guard.requiredAuthorityRefs.length === 0) {
|
|
353
|
+
context.addIssue({ code: "custom", message: "qualified-review claim guards require at least one authority ref", path: ["requiredAuthorityRefs"] });
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
export type AssuranceDocumentClaimGuard = z.infer<typeof AssuranceDocumentClaimGuardSchema>;
|
|
357
|
+
|
|
358
|
+
export const AssuranceDocumentReviewChecklistItemSchema = z.strictObject({
|
|
359
|
+
itemRef: AssuranceNamespacedRefSchema,
|
|
360
|
+
order: GovernedDocumentPositiveSafeIntegerSchema,
|
|
361
|
+
subjectKind: z.enum(AssuranceDocumentReviewChecklistSubjectKind),
|
|
362
|
+
subjectRef: AssuranceNamespacedRefSchema,
|
|
363
|
+
reviewPrompt: z.string().trim().min(1),
|
|
364
|
+
blocksApproval: z.boolean(),
|
|
365
|
+
});
|
|
366
|
+
export type AssuranceDocumentReviewChecklistItem = z.infer<typeof AssuranceDocumentReviewChecklistItemSchema>;
|
|
367
|
+
|
|
368
|
+
export const AssuranceDocumentReviewChecklistSchema = z
|
|
369
|
+
.strictObject({
|
|
370
|
+
checklistRef: AssuranceNamespacedRefSchema,
|
|
371
|
+
checklistVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
372
|
+
reviewPolicyRef: AssuranceNamespacedRefSchema,
|
|
373
|
+
reviewKind: z.enum(GovernedDocumentReviewKind),
|
|
374
|
+
items: z.array(AssuranceDocumentReviewChecklistItemSchema).min(1),
|
|
375
|
+
})
|
|
376
|
+
.superRefine((checklist, context) => {
|
|
377
|
+
addUniqueSortedIssue(
|
|
378
|
+
checklist.items.map((item) => item.itemRef),
|
|
379
|
+
context,
|
|
380
|
+
["items"],
|
|
381
|
+
"review checklist item references",
|
|
382
|
+
);
|
|
383
|
+
checklist.items.forEach((item, index) => {
|
|
384
|
+
if (item.order !== index + 1) {
|
|
385
|
+
context.addIssue({ code: "custom", message: "review checklist item order must be contiguous and match array order", path: ["items", index, "order"] });
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
});
|
|
389
|
+
export type AssuranceDocumentReviewChecklist = z.infer<typeof AssuranceDocumentReviewChecklistSchema>;
|
|
390
|
+
|
|
391
|
+
const AssuranceDocumentBlueprintIdentitySchema = z.strictObject({
|
|
392
|
+
blueprintRef: AssuranceNamespacedRefSchema,
|
|
393
|
+
blueprintVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
394
|
+
});
|
|
395
|
+
|
|
396
|
+
/*
|
|
397
|
+
* The structured-annex identities, re-declared HERE without their digests (2026-08-28).
|
|
398
|
+
*
|
|
399
|
+
* They came from `@wildo-ai/saas-models` and each carried a third member — a
|
|
400
|
+
* `valueSchemaDigest` / `implementationDigest` sealing the identity to exact bytes. Those went with
|
|
401
|
+
* the rest of the digest machinery (`.claude/rules/one-source-of-truth.md`, Rule 0); a ref and a
|
|
402
|
+
* version identify a contract perfectly well, and what changed it is a commit.
|
|
403
|
+
*
|
|
404
|
+
* The FEATURE was kept rather than deleted with the seal, because it carries real information: a
|
|
405
|
+
* document may hold a structured annex whose value is validated and rendered by one named contract,
|
|
406
|
+
* and a second renderer identity is deliberately absent so nothing can validate one row set and
|
|
407
|
+
* display another. That sentence is worth having; the hash was not.
|
|
408
|
+
*/
|
|
409
|
+
/** Portable identity of the declarative value schema selected by an authority catalog. */
|
|
410
|
+
export const AssuranceDocumentStructuredValueSchemaIdentitySchema = z.strictObject({
|
|
411
|
+
valueSchemaRef: GovernedDocumentRefSchema,
|
|
412
|
+
valueSchemaVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
413
|
+
});
|
|
414
|
+
export type AssuranceDocumentStructuredValueSchemaIdentity = z.infer<typeof AssuranceDocumentStructuredValueSchemaIdentitySchema>;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* The runtime implementation responsible for validating, canonicalizing, ordering and rendering a
|
|
418
|
+
* structured annex. There is deliberately NO independent renderer identity: a second implementation
|
|
419
|
+
* authority could validate one row set and display another.
|
|
420
|
+
*/
|
|
421
|
+
export const AssuranceDocumentStructuredContentProcessorIdentitySchema = z.strictObject({
|
|
422
|
+
processorRef: GovernedDocumentRefSchema,
|
|
423
|
+
processorVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
424
|
+
});
|
|
425
|
+
export type AssuranceDocumentStructuredContentProcessorIdentity = z.infer<typeof AssuranceDocumentStructuredContentProcessorIdentitySchema>;
|
|
426
|
+
|
|
427
|
+
/** Engine-catalog declaration that binds one portable value schema to exactly one runtime processor closure. */
|
|
428
|
+
export const AssuranceDocumentStructuredValueContractSchema = z
|
|
429
|
+
.strictObject({
|
|
430
|
+
schemaVersion: z.literal(1),
|
|
431
|
+
contractRef: AssuranceNamespacedRefSchema,
|
|
432
|
+
contractVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
433
|
+
valueSchema: AssuranceDocumentStructuredValueSchemaIdentitySchema,
|
|
434
|
+
processor: AssuranceDocumentStructuredContentProcessorIdentitySchema,
|
|
435
|
+
sensitivityRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
436
|
+
})
|
|
437
|
+
.superRefine((contract, context) => {
|
|
438
|
+
addUniqueSortedIssue(contract.sensitivityRefs, context, ["sensitivityRefs"], "sensitivityRefs");
|
|
439
|
+
});
|
|
440
|
+
export type AssuranceDocumentStructuredValueContract = z.infer<typeof AssuranceDocumentStructuredValueContractSchema>;
|
|
441
|
+
|
|
442
|
+
export const AssuranceDocumentAnnexBindingSchema = z.strictObject({
|
|
443
|
+
annexRef: AssuranceNamespacedRefSchema,
|
|
444
|
+
annexVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
445
|
+
factRef: AssuranceNamespacedRefSchema,
|
|
446
|
+
structuredValueContract: AssuranceDocumentStructuredValueContractIdentitySchema,
|
|
447
|
+
valueSchema: AssuranceDocumentStructuredValueSchemaIdentitySchema,
|
|
448
|
+
processor: AssuranceDocumentStructuredContentProcessorIdentitySchema,
|
|
449
|
+
});
|
|
450
|
+
export type AssuranceDocumentAnnexBinding = z.infer<typeof AssuranceDocumentAnnexBindingSchema>;
|
|
451
|
+
|
|
452
|
+
const AssuranceDocumentBlueprintV1BaseSchema = z.strictObject({
|
|
453
|
+
identity: AssuranceDocumentBlueprintIdentitySchema,
|
|
454
|
+
definition: GovernedDocumentDefinitionIdentitySchema,
|
|
455
|
+
questions: z.array(AssuranceDocumentBlueprintQuestionV1Schema).min(1),
|
|
456
|
+
sections: z.array(AssuranceDocumentBlueprintSectionSchema).min(1),
|
|
457
|
+
clauses: z.array(AssuranceDocumentBlueprintClauseSchema).min(1),
|
|
458
|
+
claimGuards: z.array(AssuranceDocumentClaimGuardSchema).min(1),
|
|
459
|
+
reviewChecklists: z.array(AssuranceDocumentReviewChecklistSchema).min(1),
|
|
460
|
+
/** Optional only so retained pre-Step-4 v2 catalog bytes replay unchanged. Current candidate-enabled blueprints author this field explicitly. */
|
|
461
|
+
variantAxes: z.array(AssuranceDocumentBlueprintVariantAxisSchema).optional(),
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
type AssuranceDocumentBlueprintRefinementInput = Omit<z.infer<typeof AssuranceDocumentBlueprintV1BaseSchema>, "questions"> & {
|
|
465
|
+
readonly questions: readonly AssuranceDocumentBlueprintQuestion[];
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
const refineAssuranceDocumentBlueprint = (blueprint: AssuranceDocumentBlueprintRefinementInput, context: z.RefinementCtx): void => {
|
|
469
|
+
addUniqueSortedIssue(
|
|
470
|
+
blueprint.questions.map((question) => question.questionRef),
|
|
471
|
+
context,
|
|
472
|
+
["questions"],
|
|
473
|
+
"question references",
|
|
474
|
+
);
|
|
475
|
+
addUniqueSortedIssue(
|
|
476
|
+
blueprint.questions.map((question) => question.factRef),
|
|
477
|
+
context,
|
|
478
|
+
["questions"],
|
|
479
|
+
"question fact references",
|
|
480
|
+
);
|
|
481
|
+
if (!valuesAreUnique(blueprint.sections.map((section) => section.sectionRef))) {
|
|
482
|
+
context.addIssue({ code: "custom", message: "section references must be unique", path: ["sections"] });
|
|
483
|
+
}
|
|
484
|
+
addUniqueSortedIssue(
|
|
485
|
+
blueprint.clauses.map((clause) => clause.clauseRef),
|
|
486
|
+
context,
|
|
487
|
+
["clauses"],
|
|
488
|
+
"clause references",
|
|
489
|
+
);
|
|
490
|
+
addUniqueSortedIssue(
|
|
491
|
+
blueprint.claimGuards.map((guard) => guard.guardRef),
|
|
492
|
+
context,
|
|
493
|
+
["claimGuards"],
|
|
494
|
+
"claim guard references",
|
|
495
|
+
);
|
|
496
|
+
addUniqueSortedIssue(
|
|
497
|
+
blueprint.reviewChecklists.map((checklist) => checklist.checklistRef),
|
|
498
|
+
context,
|
|
499
|
+
["reviewChecklists"],
|
|
500
|
+
"review checklist references",
|
|
501
|
+
);
|
|
502
|
+
addUniqueSortedIssue(
|
|
503
|
+
(blueprint.variantAxes ?? []).map((axis) => axis.axisRef),
|
|
504
|
+
context,
|
|
505
|
+
["variantAxes"],
|
|
506
|
+
"variant axis references",
|
|
507
|
+
);
|
|
508
|
+
|
|
509
|
+
const questionsByFactRef = new Map(blueprint.questions.map((question) => [question.factRef, question]));
|
|
510
|
+
const sectionsByRef = new Map(blueprint.sections.map((section) => [section.sectionRef, section]));
|
|
511
|
+
const clausesByRef = new Map(blueprint.clauses.map((clause) => [clause.clauseRef, clause]));
|
|
512
|
+
const claimGuardsByRef = new Map(blueprint.claimGuards.map((guard) => [guard.guardRef, guard]));
|
|
513
|
+
|
|
514
|
+
blueprint.sections.forEach((section, sectionIndex) => {
|
|
515
|
+
if (section.order !== sectionIndex + 1) {
|
|
516
|
+
context.addIssue({ code: "custom", message: "section order must be contiguous and match array order", path: ["sections", sectionIndex, "order"] });
|
|
517
|
+
}
|
|
518
|
+
if (!valuesAreUnique(section.requiredFactRefs)) {
|
|
519
|
+
context.addIssue({ code: "custom", message: "section requiredFactRefs must be unique", path: ["sections", sectionIndex, "requiredFactRefs"] });
|
|
520
|
+
}
|
|
521
|
+
if (!valuesAreUnique(section.clauseRefs)) {
|
|
522
|
+
context.addIssue({ code: "custom", message: "section clauseRefs must be unique", path: ["sections", sectionIndex, "clauseRefs"] });
|
|
523
|
+
}
|
|
524
|
+
section.requiredFactRefs.forEach((factRef) => {
|
|
525
|
+
if (!questionsByFactRef.has(factRef)) {
|
|
526
|
+
context.addIssue({ code: "custom", message: `section references unknown fact ${factRef}`, path: ["sections", sectionIndex, "requiredFactRefs"] });
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
section.clauseRefs.forEach((clauseRef) => {
|
|
530
|
+
const clause = clausesByRef.get(clauseRef);
|
|
531
|
+
if (!clause) {
|
|
532
|
+
context.addIssue({ code: "custom", message: `section references unknown clause ${clauseRef}`, path: ["sections", sectionIndex, "clauseRefs"] });
|
|
533
|
+
} else if (clause.sectionRef !== section.sectionRef) {
|
|
534
|
+
context.addIssue({ code: "custom", message: `clause ${clauseRef} declares a different section`, path: ["sections", sectionIndex, "clauseRefs"] });
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
const clauseFactRefs = section.clauseRefs
|
|
538
|
+
.flatMap((clauseRef) => clausesByRef.get(clauseRef)?.requiredFactRefs ?? [])
|
|
539
|
+
.filter((factRef, index, values) => values.indexOf(factRef) === index)
|
|
540
|
+
.sort(compareCanonicalText);
|
|
541
|
+
const sectionFactRefs = [...section.requiredFactRefs].sort(compareCanonicalText);
|
|
542
|
+
if (JSON.stringify(clauseFactRefs) !== JSON.stringify(sectionFactRefs)) {
|
|
543
|
+
context.addIssue({
|
|
544
|
+
code: "custom",
|
|
545
|
+
message: "section requiredFactRefs must equal the facts required by its clauses",
|
|
546
|
+
path: ["sections", sectionIndex, "requiredFactRefs"],
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
const assignedClauseRefs = blueprint.sections.flatMap((section) => section.clauseRefs);
|
|
552
|
+
if (
|
|
553
|
+
!valuesAreUnique(assignedClauseRefs) ||
|
|
554
|
+
assignedClauseRefs.length !== blueprint.clauses.length ||
|
|
555
|
+
assignedClauseRefs.some((ref) => !clausesByRef.has(ref))
|
|
556
|
+
) {
|
|
557
|
+
context.addIssue({ code: "custom", message: "every clause must be assigned to exactly one section", path: ["sections"] });
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
blueprint.clauses.forEach((clause, clauseIndex) => {
|
|
561
|
+
if (!sectionsByRef.has(clause.sectionRef)) {
|
|
562
|
+
context.addIssue({ code: "custom", message: `clause references unknown section ${clause.sectionRef}`, path: ["clauses", clauseIndex, "sectionRef"] });
|
|
563
|
+
}
|
|
564
|
+
[...clause.requiredFactRefs, ...clause.variables.map((variable) => variable.factRef)].forEach((factRef) => {
|
|
565
|
+
if (!questionsByFactRef.has(factRef)) {
|
|
566
|
+
context.addIssue({ code: "custom", message: `clause references unknown fact ${factRef}`, path: ["clauses", clauseIndex] });
|
|
567
|
+
}
|
|
568
|
+
});
|
|
569
|
+
clause.claimGuardRefs.forEach((guardRef) => {
|
|
570
|
+
if (!claimGuardsByRef.has(guardRef)) {
|
|
571
|
+
context.addIssue({ code: "custom", message: `clause references unknown claim guard ${guardRef}`, path: ["clauses", clauseIndex, "claimGuardRefs"] });
|
|
572
|
+
}
|
|
573
|
+
});
|
|
574
|
+
clause.conditionGroups.forEach((group, groupIndex) => {
|
|
575
|
+
group.conditions.forEach((condition, conditionIndex) => {
|
|
576
|
+
const question = questionsByFactRef.get(condition.factRef);
|
|
577
|
+
if (!question) {
|
|
578
|
+
context.addIssue({
|
|
579
|
+
code: "custom",
|
|
580
|
+
message: `condition references unknown fact ${condition.factRef}`,
|
|
581
|
+
path: ["clauses", clauseIndex, "conditionGroups", groupIndex, "conditions", conditionIndex, "factRef"],
|
|
582
|
+
});
|
|
583
|
+
return;
|
|
584
|
+
}
|
|
585
|
+
if (
|
|
586
|
+
(condition.operator === AssuranceDocumentConditionOperator.FACT_TRUE || condition.operator === AssuranceDocumentConditionOperator.FACT_FALSE) &&
|
|
587
|
+
question.answerKind !== AssuranceDocumentQuestionAnswerKind.BOOLEAN
|
|
588
|
+
) {
|
|
589
|
+
context.addIssue({
|
|
590
|
+
code: "custom",
|
|
591
|
+
message: "boolean condition requires a BOOLEAN question",
|
|
592
|
+
path: ["clauses", clauseIndex, "conditionGroups", groupIndex],
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
if (
|
|
596
|
+
condition.operator === AssuranceDocumentConditionOperator.FACT_EQUALS_SEMANTIC_OPTION ||
|
|
597
|
+
condition.operator === AssuranceDocumentConditionOperator.FACT_CONTAINS_SEMANTIC_OPTION
|
|
598
|
+
) {
|
|
599
|
+
const expectedKind =
|
|
600
|
+
condition.operator === AssuranceDocumentConditionOperator.FACT_EQUALS_SEMANTIC_OPTION
|
|
601
|
+
? AssuranceDocumentQuestionAnswerKind.SEMANTIC_SINGLE_SELECT
|
|
602
|
+
: AssuranceDocumentQuestionAnswerKind.SEMANTIC_MULTI_SELECT;
|
|
603
|
+
if (question.answerKind !== expectedKind || !question.semanticOptions.some((option) => option.optionRef === condition.semanticOptionRef)) {
|
|
604
|
+
context.addIssue({
|
|
605
|
+
code: "custom",
|
|
606
|
+
message: "semantic-option condition is incompatible with its question",
|
|
607
|
+
path: ["clauses", clauseIndex, "conditionGroups", groupIndex],
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
});
|
|
613
|
+
});
|
|
614
|
+
|
|
615
|
+
const referencedClaimGuardRefs = blueprint.clauses
|
|
616
|
+
.flatMap((clause) => clause.claimGuardRefs)
|
|
617
|
+
.filter((guardRef, index, values) => values.indexOf(guardRef) === index)
|
|
618
|
+
.sort(compareCanonicalText);
|
|
619
|
+
const declaredClaimGuardRefs = [...claimGuardsByRef.keys()].sort(compareCanonicalText);
|
|
620
|
+
if (JSON.stringify(referencedClaimGuardRefs) !== JSON.stringify(declaredClaimGuardRefs)) {
|
|
621
|
+
context.addIssue({ code: "custom", message: "every declared claim guard must be used by at least one clause", path: ["claimGuards"] });
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
blueprint.claimGuards.forEach((guard, guardIndex) => {
|
|
625
|
+
guard.requiredFactRefs.forEach((factRef) => {
|
|
626
|
+
if (!questionsByFactRef.has(factRef)) {
|
|
627
|
+
context.addIssue({
|
|
628
|
+
code: "custom",
|
|
629
|
+
message: `claim guard references unknown fact ${factRef}`,
|
|
630
|
+
path: ["claimGuards", guardIndex, "requiredFactRefs"],
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
});
|
|
635
|
+
|
|
636
|
+
(blueprint.variantAxes ?? []).forEach((axis, axisIndex) => {
|
|
637
|
+
axis.options.forEach((option, optionIndex) => {
|
|
638
|
+
option.supportingFactRefs.forEach((factRef) => {
|
|
639
|
+
if (!questionsByFactRef.has(factRef)) {
|
|
640
|
+
context.addIssue({
|
|
641
|
+
code: "custom",
|
|
642
|
+
message: `variant option references unknown fact ${factRef}`,
|
|
643
|
+
path: ["variantAxes", axisIndex, "options", optionIndex, "supportingFactRefs"],
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
});
|
|
648
|
+
});
|
|
649
|
+
|
|
650
|
+
blueprint.reviewChecklists.forEach((checklist, checklistIndex) => {
|
|
651
|
+
if (!checklist.items.some((item) => item.blocksApproval)) {
|
|
652
|
+
context.addIssue({
|
|
653
|
+
code: "custom",
|
|
654
|
+
message: "each review checklist requires at least one approval-blocking item",
|
|
655
|
+
path: ["reviewChecklists", checklistIndex, "items"],
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
checklist.items.forEach((item, itemIndex) => {
|
|
659
|
+
const subjectExists =
|
|
660
|
+
(item.subjectKind === AssuranceDocumentReviewChecklistSubjectKind.BLUEPRINT && item.subjectRef === blueprint.identity.blueprintRef) ||
|
|
661
|
+
(item.subjectKind === AssuranceDocumentReviewChecklistSubjectKind.SECTION && sectionsByRef.has(item.subjectRef)) ||
|
|
662
|
+
(item.subjectKind === AssuranceDocumentReviewChecklistSubjectKind.CLAUSE && clausesByRef.has(item.subjectRef)) ||
|
|
663
|
+
(item.subjectKind === AssuranceDocumentReviewChecklistSubjectKind.CLAIM_GUARD && claimGuardsByRef.has(item.subjectRef));
|
|
664
|
+
if (!subjectExists) {
|
|
665
|
+
context.addIssue({
|
|
666
|
+
code: "custom",
|
|
667
|
+
message: `review item references unknown ${item.subjectKind} subject ${item.subjectRef}`,
|
|
668
|
+
path: ["reviewChecklists", checklistIndex, "items", itemIndex, "subjectRef"],
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
});
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
/** Retained unversioned blueprint branch used only by catalog v2. */
|
|
676
|
+
export const AssuranceDocumentBlueprintV1Schema = AssuranceDocumentBlueprintV1BaseSchema.superRefine(refineAssuranceDocumentBlueprint);
|
|
677
|
+
|
|
678
|
+
const AssuranceDocumentBlueprintV2BaseSchema = z.strictObject({
|
|
679
|
+
...AssuranceDocumentBlueprintV1BaseSchema.shape,
|
|
680
|
+
schemaVersion: z.literal(2),
|
|
681
|
+
questions: z.array(AssuranceDocumentBlueprintQuestionV2Schema).min(1),
|
|
682
|
+
variantAxes: z.array(AssuranceDocumentBlueprintVariantAxisSchema),
|
|
683
|
+
annexBindings: z.array(AssuranceDocumentAnnexBindingSchema),
|
|
684
|
+
});
|
|
685
|
+
|
|
686
|
+
/** Current blueprint branch. Structured questions and annex bindings are one-to-one and bind exact catalog/runtime identities. */
|
|
687
|
+
export const AssuranceDocumentBlueprintV2Schema = AssuranceDocumentBlueprintV2BaseSchema.superRefine((blueprint, context) => {
|
|
688
|
+
refineAssuranceDocumentBlueprint(blueprint, context);
|
|
689
|
+
addUniqueSortedIssue(
|
|
690
|
+
blueprint.annexBindings.map((binding) => `${binding.annexRef}@${binding.annexVersion}`),
|
|
691
|
+
context,
|
|
692
|
+
["annexBindings"],
|
|
693
|
+
"annex binding identities",
|
|
694
|
+
);
|
|
695
|
+
addUniqueSortedIssue(
|
|
696
|
+
blueprint.annexBindings.map((binding) => binding.factRef),
|
|
697
|
+
context,
|
|
698
|
+
["annexBindings"],
|
|
699
|
+
"annex binding fact references",
|
|
700
|
+
);
|
|
701
|
+
|
|
702
|
+
const structuredQuestions = blueprint.questions.filter(
|
|
703
|
+
(question): question is z.infer<typeof AssuranceDocumentBlueprintQuestionV2StructuredSchema> =>
|
|
704
|
+
question.answerKind === AssuranceDocumentQuestionAnswerKind.STRUCTURED_VALUE,
|
|
705
|
+
);
|
|
706
|
+
const structuredQuestionsByFactRef = new Map(structuredQuestions.map((question) => [question.factRef, question]));
|
|
707
|
+
if (structuredQuestions.length !== blueprint.annexBindings.length) {
|
|
708
|
+
context.addIssue({ code: "custom", message: "every structured question requires exactly one annex binding", path: ["annexBindings"] });
|
|
709
|
+
}
|
|
710
|
+
blueprint.annexBindings.forEach((binding, bindingIndex) => {
|
|
711
|
+
const question = structuredQuestionsByFactRef.get(binding.factRef);
|
|
712
|
+
if (!question) {
|
|
713
|
+
context.addIssue({
|
|
714
|
+
code: "custom",
|
|
715
|
+
message: `annex binding references non-structured fact ${binding.factRef}`,
|
|
716
|
+
path: ["annexBindings", bindingIndex, "factRef"],
|
|
717
|
+
});
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
if (JSON.stringify(question.structuredValueContract) !== JSON.stringify(binding.structuredValueContract)) {
|
|
721
|
+
context.addIssue({
|
|
722
|
+
code: "custom",
|
|
723
|
+
message: "annex binding contract identity must equal its structured question contract identity",
|
|
724
|
+
path: ["annexBindings", bindingIndex, "structuredValueContract"],
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
});
|
|
729
|
+
|
|
730
|
+
export const AssuranceDocumentBlueprintSchema = z.union([AssuranceDocumentBlueprintV1Schema, AssuranceDocumentBlueprintV2Schema]);
|
|
731
|
+
export type AssuranceDocumentBlueprint = z.infer<typeof AssuranceDocumentBlueprintSchema>;
|
|
732
|
+
|
|
733
|
+
/** Framework-owned definition metadata. It selects questions and gates; it never embeds app facts or legal prose. */
|
|
734
|
+
export const AssuranceDocumentDefinitionSchema = z
|
|
735
|
+
.strictObject({
|
|
736
|
+
identity: GovernedDocumentDefinitionIdentitySchema,
|
|
737
|
+
stableKindRef: AssuranceNamespacedRefSchema,
|
|
738
|
+
documentClass: z.enum(GovernedDocumentClass),
|
|
739
|
+
applicabilityKind: z.enum(AssuranceDocumentCatalogApplicabilityKind),
|
|
740
|
+
governanceSubjectKinds: z.array(z.enum(GovernedDocumentGovernanceSubjectKind)).min(1),
|
|
741
|
+
audienceKinds: z.array(z.enum(GovernedDocumentAudienceKind)).min(1),
|
|
742
|
+
requiredFactRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
743
|
+
requiredSectionRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
744
|
+
qualifiedReviewPolicyRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
745
|
+
sourcePolicyRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
746
|
+
publicationChannelKinds: z.array(z.enum(GovernedDocumentPublicationChannelKind)).min(1),
|
|
747
|
+
allowedInteractionKinds: z.array(z.enum(GovernedDocumentInteractionKind)),
|
|
748
|
+
retentionPolicyRef: AssuranceNamespacedRefSchema,
|
|
749
|
+
reviewTriggerRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
750
|
+
claimPolicyRef: AssuranceNamespacedRefSchema,
|
|
751
|
+
})
|
|
752
|
+
.superRefine((definition, context) => {
|
|
753
|
+
for (const [key, values] of [
|
|
754
|
+
["governanceSubjectKinds", definition.governanceSubjectKinds],
|
|
755
|
+
["audienceKinds", definition.audienceKinds],
|
|
756
|
+
["requiredFactRefs", definition.requiredFactRefs],
|
|
757
|
+
["requiredSectionRefs", definition.requiredSectionRefs],
|
|
758
|
+
["qualifiedReviewPolicyRefs", definition.qualifiedReviewPolicyRefs],
|
|
759
|
+
["sourcePolicyRefs", definition.sourcePolicyRefs],
|
|
760
|
+
["publicationChannelKinds", definition.publicationChannelKinds],
|
|
761
|
+
["allowedInteractionKinds", definition.allowedInteractionKinds],
|
|
762
|
+
["reviewTriggerRefs", definition.reviewTriggerRefs],
|
|
763
|
+
] as const)
|
|
764
|
+
addUniqueSortedIssue(values, context, [key], key);
|
|
765
|
+
});
|
|
766
|
+
export type AssuranceDocumentDefinition = z.infer<typeof AssuranceDocumentDefinitionSchema>;
|
|
767
|
+
|
|
768
|
+
const AssuranceDocumentAuthorityCatalogCommonSchema = z.strictObject({
|
|
769
|
+
catalogRef: AssuranceNamespacedRefSchema,
|
|
770
|
+
catalogVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
771
|
+
verifiedAt: AssuranceIsoDateTimeSchema,
|
|
772
|
+
sourceMonitoringPolicies: z.array(AssuranceDocumentSourceMonitoringPolicySchema).min(1),
|
|
773
|
+
qualifiedReviewPolicies: z.array(AssuranceDocumentQualifiedReviewPolicySchema).min(1),
|
|
774
|
+
claimPolicies: z.array(AssuranceDocumentClaimPolicySchema).min(1),
|
|
775
|
+
definitions: z.array(AssuranceDocumentDefinitionSchema).min(1),
|
|
776
|
+
});
|
|
777
|
+
|
|
778
|
+
type AssuranceDocumentAuthorityCatalogCommon = z.infer<typeof AssuranceDocumentAuthorityCatalogCommonSchema>;
|
|
779
|
+
|
|
780
|
+
type AssuranceDocumentAuthorityCatalogCommonRefinementInput = Pick<
|
|
781
|
+
AssuranceDocumentAuthorityCatalogCommon,
|
|
782
|
+
"verifiedAt" | "sourceMonitoringPolicies" | "qualifiedReviewPolicies" | "claimPolicies" | "definitions"
|
|
783
|
+
>;
|
|
784
|
+
|
|
785
|
+
const refineAssuranceDocumentAuthorityCatalogCommon = (catalog: AssuranceDocumentAuthorityCatalogCommonRefinementInput, context: z.RefinementCtx): void => {
|
|
786
|
+
for (const [key, identities] of [
|
|
787
|
+
["sourceMonitoringPolicies", catalog.sourceMonitoringPolicies.map((value) => `${value.policyRef}@${value.policyVersion}`)],
|
|
788
|
+
["qualifiedReviewPolicies", catalog.qualifiedReviewPolicies.map((value) => `${value.policyRef}@${value.policyVersion}`)],
|
|
789
|
+
["claimPolicies", catalog.claimPolicies.map((value) => `${value.policyRef}@${value.policyVersion}`)],
|
|
790
|
+
["definitions", catalog.definitions.map((value) => `${value.identity.definitionRef}@${value.identity.definitionVersion}`)],
|
|
791
|
+
] as const)
|
|
792
|
+
addUniqueSortedIssue(identities, context, [key], `${key} identities`);
|
|
793
|
+
|
|
794
|
+
for (const [key, refs] of [
|
|
795
|
+
["sourceMonitoringPolicies", catalog.sourceMonitoringPolicies.map((value) => value.policyRef)],
|
|
796
|
+
["qualifiedReviewPolicies", catalog.qualifiedReviewPolicies.map((value) => value.policyRef)],
|
|
797
|
+
["claimPolicies", catalog.claimPolicies.map((value) => value.policyRef)],
|
|
798
|
+
["definitions", catalog.definitions.map((value) => value.stableKindRef)],
|
|
799
|
+
] as const)
|
|
800
|
+
addUniqueSortedIssue(refs, context, [key], `${key} unversioned references`);
|
|
801
|
+
|
|
802
|
+
const sourcePolicyRefs = new Set(catalog.sourceMonitoringPolicies.map((value) => value.policyRef));
|
|
803
|
+
const reviewPolicyRefs = new Set(catalog.qualifiedReviewPolicies.map((value) => value.policyRef));
|
|
804
|
+
const claimPolicyRefs = new Set(catalog.claimPolicies.map((value) => value.policyRef));
|
|
805
|
+
const definitionRefs = new Set<string>(catalog.definitions.map((value) => value.identity.definitionRef));
|
|
806
|
+
const reviewPoliciesByRef = new Map(catalog.qualifiedReviewPolicies.map((value) => [value.policyRef, value]));
|
|
807
|
+
catalog.sourceMonitoringPolicies.forEach((policy, policyIndex) => {
|
|
808
|
+
policy.dependentDefinitionRefs.forEach((ref) => {
|
|
809
|
+
if (!definitionRefs.has(ref)) {
|
|
810
|
+
context.addIssue({
|
|
811
|
+
code: "custom",
|
|
812
|
+
message: `source monitoring policy references unknown dependent definition ${ref}`,
|
|
813
|
+
path: ["sourceMonitoringPolicies", policyIndex, "dependentDefinitionRefs"],
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
});
|
|
817
|
+
if (policy.lastCheckedAt > catalog.verifiedAt) {
|
|
818
|
+
context.addIssue({
|
|
819
|
+
code: "custom",
|
|
820
|
+
message: "source monitoring cannot be checked after the catalog verification instant",
|
|
821
|
+
path: ["sourceMonitoringPolicies", policyIndex, "lastCheckedAt"],
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
catalog.definitions.forEach((definition, definitionIndex) => {
|
|
826
|
+
definition.sourcePolicyRefs.forEach((ref) => {
|
|
827
|
+
if (!sourcePolicyRefs.has(ref))
|
|
828
|
+
context.addIssue({ code: "custom", message: `unknown source monitoring policy ${ref}`, path: ["definitions", definitionIndex, "sourcePolicyRefs"] });
|
|
829
|
+
});
|
|
830
|
+
definition.qualifiedReviewPolicyRefs.forEach((ref) => {
|
|
831
|
+
if (!reviewPolicyRefs.has(ref))
|
|
832
|
+
context.addIssue({
|
|
833
|
+
code: "custom",
|
|
834
|
+
message: `unknown qualified review policy ${ref}`,
|
|
835
|
+
path: ["definitions", definitionIndex, "qualifiedReviewPolicyRefs"],
|
|
836
|
+
});
|
|
837
|
+
});
|
|
838
|
+
if (!claimPolicyRefs.has(definition.claimPolicyRef)) {
|
|
839
|
+
context.addIssue({
|
|
840
|
+
code: "custom",
|
|
841
|
+
message: `unknown claim policy ${definition.claimPolicyRef}`,
|
|
842
|
+
path: ["definitions", definitionIndex, "claimPolicyRef"],
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
const selectedReviewPolicies = definition.qualifiedReviewPolicyRefs
|
|
846
|
+
.map((ref) => reviewPoliciesByRef.get(ref))
|
|
847
|
+
.filter((policy): policy is AssuranceDocumentQualifiedReviewPolicy => policy !== undefined);
|
|
848
|
+
selectedReviewPolicies.forEach((policy) => {
|
|
849
|
+
if (!policy.documentClasses.includes(definition.documentClass)) {
|
|
850
|
+
context.addIssue({
|
|
851
|
+
code: "custom",
|
|
852
|
+
message: `qualified review policy ${policy.policyRef} does not govern document class ${definition.documentClass}`,
|
|
853
|
+
path: ["definitions", definitionIndex, "qualifiedReviewPolicyRefs"],
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
});
|
|
857
|
+
definition.audienceKinds.forEach((audience) => {
|
|
858
|
+
if (!selectedReviewPolicies.some((policy) => policy.audienceKinds.length === 0 || policy.audienceKinds.includes(audience))) {
|
|
859
|
+
context.addIssue({
|
|
860
|
+
code: "custom",
|
|
861
|
+
message: `no qualified review policy governs audience ${audience}`,
|
|
862
|
+
path: ["definitions", definitionIndex, "qualifiedReviewPolicyRefs"],
|
|
863
|
+
});
|
|
864
|
+
}
|
|
865
|
+
});
|
|
866
|
+
});
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
const AssuranceDocumentAuthorityCatalogV1Schema = AssuranceDocumentAuthorityCatalogCommonSchema.extend({
|
|
870
|
+
schemaVersion: z.literal(1),
|
|
871
|
+
catalogVersion: z.literal(1),
|
|
872
|
+
}).superRefine((catalog, context) => {
|
|
873
|
+
refineAssuranceDocumentAuthorityCatalogCommon(catalog, context);
|
|
874
|
+
catalog.qualifiedReviewPolicies.forEach((policy, policyIndex) => {
|
|
875
|
+
if ("reviewRequirements" in policy) {
|
|
876
|
+
context.addIssue({
|
|
877
|
+
code: "custom",
|
|
878
|
+
message: "retained catalog v1 must preserve the historical flat qualified-review policy shape",
|
|
879
|
+
path: ["qualifiedReviewPolicies", policyIndex],
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
});
|
|
884
|
+
|
|
885
|
+
type AssuranceDocumentAuthorityCatalogBlueprintRefinementInput = Omit<AssuranceDocumentAuthorityCatalogCommon, "catalogVersion"> & {
|
|
886
|
+
readonly schemaVersion?: 2 | 3;
|
|
887
|
+
readonly catalogVersion?: 2 | 3 | 4 | 5 | 6;
|
|
888
|
+
readonly blueprints?: readonly AssuranceDocumentBlueprint[];
|
|
889
|
+
};
|
|
890
|
+
|
|
891
|
+
const refineAssuranceDocumentAuthorityCatalogBlueprints = (
|
|
892
|
+
catalog: AssuranceDocumentAuthorityCatalogBlueprintRefinementInput,
|
|
893
|
+
context: z.RefinementCtx,
|
|
894
|
+
): void => {
|
|
895
|
+
refineAssuranceDocumentAuthorityCatalogCommon(catalog, context);
|
|
896
|
+
if (catalog.catalogVersion === undefined || catalog.blueprints === undefined) {
|
|
897
|
+
context.addIssue({ code: "custom", message: "blueprint catalogs require explicit version and blueprint members", path: [] });
|
|
898
|
+
return;
|
|
899
|
+
}
|
|
900
|
+
catalog.qualifiedReviewPolicies.forEach((policy, policyIndex) => {
|
|
901
|
+
const usesCurrentReviewRequirements = "reviewRequirements" in policy;
|
|
902
|
+
if (catalog.catalogVersion >= 5 && !usesCurrentReviewRequirements) {
|
|
903
|
+
context.addIssue({
|
|
904
|
+
code: "custom",
|
|
905
|
+
message: "catalog v5 and later must bind reviewer qualifications to each exact review kind",
|
|
906
|
+
path: ["qualifiedReviewPolicies", policyIndex],
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
if (catalog.catalogVersion < 5 && usesCurrentReviewRequirements) {
|
|
910
|
+
context.addIssue({
|
|
911
|
+
code: "custom",
|
|
912
|
+
message: "retained catalog v2-v4 must preserve the historical flat qualified-review policy shape",
|
|
913
|
+
path: ["qualifiedReviewPolicies", policyIndex],
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
});
|
|
917
|
+
addUniqueSortedIssue(
|
|
918
|
+
catalog.blueprints.map((blueprint) => `${blueprint.identity.blueprintRef}@${blueprint.identity.blueprintVersion}`),
|
|
919
|
+
context,
|
|
920
|
+
["blueprints"],
|
|
921
|
+
"blueprint identities",
|
|
922
|
+
);
|
|
923
|
+
addUniqueSortedIssue(
|
|
924
|
+
catalog.blueprints.map((blueprint) => `${blueprint.definition.definitionRef}@${blueprint.definition.definitionVersion}`),
|
|
925
|
+
context,
|
|
926
|
+
["blueprints"],
|
|
927
|
+
"blueprint definition identities",
|
|
928
|
+
);
|
|
929
|
+
|
|
930
|
+
const definitionsByIdentity = new Map(
|
|
931
|
+
catalog.definitions.map((definition) => [`${definition.identity.definitionRef}@${definition.identity.definitionVersion}`, definition]),
|
|
932
|
+
);
|
|
933
|
+
const blueprintDefinitionIdentities = catalog.blueprints
|
|
934
|
+
.map((blueprint) => `${blueprint.definition.definitionRef}@${blueprint.definition.definitionVersion}`)
|
|
935
|
+
.sort(compareCanonicalText);
|
|
936
|
+
const catalogDefinitionIdentities = [...definitionsByIdentity.keys()].sort(compareCanonicalText);
|
|
937
|
+
if (JSON.stringify(blueprintDefinitionIdentities) !== JSON.stringify(catalogDefinitionIdentities)) {
|
|
938
|
+
context.addIssue({ code: "custom", message: "blueprint catalogs require exactly one blueprint for every definition", path: ["blueprints"] });
|
|
939
|
+
}
|
|
940
|
+
const sourcePolicyRefs = new Set(catalog.sourceMonitoringPolicies.map((policy) => policy.policyRef));
|
|
941
|
+
const reviewPoliciesByRef = new Map(catalog.qualifiedReviewPolicies.map((policy) => [policy.policyRef, policy]));
|
|
942
|
+
const claimPoliciesByRef = new Map(catalog.claimPolicies.map((policy) => [policy.policyRef, policy]));
|
|
943
|
+
|
|
944
|
+
catalog.blueprints.forEach((blueprint, blueprintIndex) => {
|
|
945
|
+
const definitionIdentity = `${blueprint.definition.definitionRef}@${blueprint.definition.definitionVersion}`;
|
|
946
|
+
const definition = definitionsByIdentity.get(definitionIdentity);
|
|
947
|
+
if (!definition) {
|
|
948
|
+
context.addIssue({
|
|
949
|
+
code: "custom",
|
|
950
|
+
message: `blueprint references unknown definition ${definitionIdentity}`,
|
|
951
|
+
path: ["blueprints", blueprintIndex, "definition"],
|
|
952
|
+
});
|
|
953
|
+
return;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
const blueprintFactRefs = blueprint.questions.map((question) => question.factRef).sort(compareCanonicalText);
|
|
957
|
+
const definitionFactRefs = [...definition.requiredFactRefs].sort(compareCanonicalText);
|
|
958
|
+
if (JSON.stringify(blueprintFactRefs) !== JSON.stringify(definitionFactRefs)) {
|
|
959
|
+
context.addIssue({
|
|
960
|
+
code: "custom",
|
|
961
|
+
message: "blueprint questions must cover the definition requiredFactRefs exactly",
|
|
962
|
+
path: ["blueprints", blueprintIndex, "questions"],
|
|
963
|
+
});
|
|
964
|
+
}
|
|
965
|
+
const blueprintSectionRefs = blueprint.sections.map((section) => section.sectionRef).sort(compareCanonicalText);
|
|
966
|
+
const definitionSectionRefs = [...definition.requiredSectionRefs].sort(compareCanonicalText);
|
|
967
|
+
if (JSON.stringify(blueprintSectionRefs) !== JSON.stringify(definitionSectionRefs)) {
|
|
968
|
+
context.addIssue({
|
|
969
|
+
code: "custom",
|
|
970
|
+
message: "blueprint sections must cover the definition requiredSectionRefs exactly",
|
|
971
|
+
path: ["blueprints", blueprintIndex, "sections"],
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
blueprint.clauses.forEach((clause, clauseIndex) => {
|
|
976
|
+
clause.sourcePolicyRefs.forEach((policyRef) => {
|
|
977
|
+
if (!sourcePolicyRefs.has(policyRef) || !definition.sourcePolicyRefs.includes(policyRef)) {
|
|
978
|
+
context.addIssue({
|
|
979
|
+
code: "custom",
|
|
980
|
+
message: `clause source policy ${policyRef} is not selected by its definition`,
|
|
981
|
+
path: ["blueprints", blueprintIndex, "clauses", clauseIndex, "sourcePolicyRefs"],
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
});
|
|
985
|
+
});
|
|
986
|
+
const usedSourcePolicyRefs = blueprint.clauses
|
|
987
|
+
.flatMap((clause) => clause.sourcePolicyRefs)
|
|
988
|
+
.filter((policyRef, index, values) => values.indexOf(policyRef) === index)
|
|
989
|
+
.sort(compareCanonicalText);
|
|
990
|
+
const definitionSourcePolicyRefs = [...definition.sourcePolicyRefs].sort(compareCanonicalText);
|
|
991
|
+
if (JSON.stringify(usedSourcePolicyRefs) !== JSON.stringify(definitionSourcePolicyRefs)) {
|
|
992
|
+
context.addIssue({
|
|
993
|
+
code: "custom",
|
|
994
|
+
message: "blueprint clauses must use every source policy selected by the definition",
|
|
995
|
+
path: ["blueprints", blueprintIndex, "clauses"],
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
blueprint.claimGuards.forEach((guard, guardIndex) => {
|
|
1000
|
+
const claimPolicy = claimPoliciesByRef.get(guard.claimPolicyRef);
|
|
1001
|
+
if (!claimPolicy || guard.claimPolicyRef !== definition.claimPolicyRef) {
|
|
1002
|
+
context.addIssue({
|
|
1003
|
+
code: "custom",
|
|
1004
|
+
message: `claim guard policy ${guard.claimPolicyRef} is not selected by its definition`,
|
|
1005
|
+
path: ["blueprints", blueprintIndex, "claimGuards", guardIndex, "claimPolicyRef"],
|
|
1006
|
+
});
|
|
1007
|
+
} else if (
|
|
1008
|
+
JSON.stringify([...guard.prohibitedClaims].sort(compareCanonicalText)) !== JSON.stringify([...claimPolicy.prohibitedClaims].sort(compareCanonicalText))
|
|
1009
|
+
) {
|
|
1010
|
+
context.addIssue({
|
|
1011
|
+
code: "custom",
|
|
1012
|
+
message: "claim guard must enforce every prohibition in its selected claim policy exactly",
|
|
1013
|
+
path: ["blueprints", blueprintIndex, "claimGuards", guardIndex, "prohibitedClaims"],
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
1016
|
+
});
|
|
1017
|
+
|
|
1018
|
+
const selectedReviewPolicies = definition.qualifiedReviewPolicyRefs
|
|
1019
|
+
.map((policyRef) => reviewPoliciesByRef.get(policyRef))
|
|
1020
|
+
.filter((policy): policy is AssuranceDocumentQualifiedReviewPolicy => policy !== undefined);
|
|
1021
|
+
const expectedReviewPairs = selectedReviewPolicies
|
|
1022
|
+
.flatMap((policy) => assuranceDocumentQualifiedReviewRequirements(policy).map((requirement) => `${policy.policyRef}\0${requirement.reviewKind}`))
|
|
1023
|
+
.sort(compareCanonicalText);
|
|
1024
|
+
const actualReviewPairs = blueprint.reviewChecklists.map((checklist) => `${checklist.reviewPolicyRef}\0${checklist.reviewKind}`).sort(compareCanonicalText);
|
|
1025
|
+
if (JSON.stringify(actualReviewPairs) !== JSON.stringify(expectedReviewPairs)) {
|
|
1026
|
+
context.addIssue({
|
|
1027
|
+
code: "custom",
|
|
1028
|
+
message: "blueprint review checklists must cover every selected policy review kind exactly once",
|
|
1029
|
+
path: ["blueprints", blueprintIndex, "reviewChecklists"],
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
});
|
|
1033
|
+
};
|
|
1034
|
+
|
|
1035
|
+
const AssuranceDocumentAuthorityCatalogV2BaseSchema = AssuranceDocumentAuthorityCatalogCommonSchema.extend({
|
|
1036
|
+
schemaVersion: z.literal(2),
|
|
1037
|
+
catalogVersion: z.union([z.literal(2), z.literal(3), z.literal(4), z.literal(5)]),
|
|
1038
|
+
blueprints: z.array(AssuranceDocumentBlueprintV1Schema).min(1),
|
|
1039
|
+
});
|
|
1040
|
+
const AssuranceDocumentAuthorityCatalogV2Schema = AssuranceDocumentAuthorityCatalogV2BaseSchema.superRefine(refineAssuranceDocumentAuthorityCatalogBlueprints);
|
|
1041
|
+
|
|
1042
|
+
/** Current authoring branch: blueprint v2 plus a closed, exactly consumed structured-value-contract registry. */
|
|
1043
|
+
export const AssuranceDocumentAuthorityCatalogV3Schema = AssuranceDocumentAuthorityCatalogCommonSchema.extend({
|
|
1044
|
+
schemaVersion: z.literal(3),
|
|
1045
|
+
catalogVersion: z.literal(6),
|
|
1046
|
+
blueprints: z.array(AssuranceDocumentBlueprintV2Schema).min(1),
|
|
1047
|
+
structuredValueContracts: z.array(AssuranceDocumentStructuredValueContractSchema).min(1),
|
|
1048
|
+
}).superRefine((catalog, context) => {
|
|
1049
|
+
refineAssuranceDocumentAuthorityCatalogBlueprints(catalog, context);
|
|
1050
|
+
addUniqueSortedIssue(
|
|
1051
|
+
catalog.structuredValueContracts.map((contract) => `${contract.contractRef}@${contract.contractVersion}`),
|
|
1052
|
+
context,
|
|
1053
|
+
["structuredValueContracts"],
|
|
1054
|
+
"structured value contract identities",
|
|
1055
|
+
);
|
|
1056
|
+
addUniqueSortedIssue(
|
|
1057
|
+
catalog.structuredValueContracts.map((contract) => contract.contractRef),
|
|
1058
|
+
context,
|
|
1059
|
+
["structuredValueContracts"],
|
|
1060
|
+
"structured value contract references",
|
|
1061
|
+
);
|
|
1062
|
+
|
|
1063
|
+
const contractsByIdentity = new Map(catalog.structuredValueContracts.map((contract) => [`${contract.contractRef}@${contract.contractVersion}`, contract]));
|
|
1064
|
+
const selectedContractIdentities: string[] = [];
|
|
1065
|
+
catalog.blueprints.forEach((blueprint, blueprintIndex) => {
|
|
1066
|
+
blueprint.annexBindings.forEach((binding, bindingIndex) => {
|
|
1067
|
+
const identity = `${binding.structuredValueContract.contractRef}@${binding.structuredValueContract.contractVersion}`;
|
|
1068
|
+
selectedContractIdentities.push(identity);
|
|
1069
|
+
const contract = contractsByIdentity.get(identity);
|
|
1070
|
+
if (!contract) {
|
|
1071
|
+
context.addIssue({
|
|
1072
|
+
code: "custom",
|
|
1073
|
+
message: `annex binding references unknown structured value contract ${identity}`,
|
|
1074
|
+
path: ["blueprints", blueprintIndex, "annexBindings", bindingIndex, "structuredValueContract"],
|
|
1075
|
+
});
|
|
1076
|
+
return;
|
|
1077
|
+
}
|
|
1078
|
+
if (JSON.stringify(contract.valueSchema) !== JSON.stringify(binding.valueSchema)) {
|
|
1079
|
+
context.addIssue({
|
|
1080
|
+
code: "custom",
|
|
1081
|
+
message: "annex binding value-schema identity must equal the catalog contract value-schema identity",
|
|
1082
|
+
path: ["blueprints", blueprintIndex, "annexBindings", bindingIndex, "valueSchema"],
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
if (JSON.stringify(contract.processor) !== JSON.stringify(binding.processor)) {
|
|
1086
|
+
context.addIssue({
|
|
1087
|
+
code: "custom",
|
|
1088
|
+
message: "annex binding processor identity must equal the catalog contract processor identity",
|
|
1089
|
+
path: ["blueprints", blueprintIndex, "annexBindings", bindingIndex, "processor"],
|
|
1090
|
+
});
|
|
1091
|
+
}
|
|
1092
|
+
});
|
|
1093
|
+
});
|
|
1094
|
+
|
|
1095
|
+
const declaredContractIdentities = [...contractsByIdentity.keys()].sort(compareCanonicalText);
|
|
1096
|
+
const orderedSelectedContractIdentities = [...selectedContractIdentities].sort(compareCanonicalText);
|
|
1097
|
+
if (!valuesAreUnique(selectedContractIdentities) || JSON.stringify(orderedSelectedContractIdentities) !== JSON.stringify(declaredContractIdentities)) {
|
|
1098
|
+
context.addIssue({
|
|
1099
|
+
code: "custom",
|
|
1100
|
+
message: "catalog v3 requires every structured value contract to be selected by exactly one annex binding",
|
|
1101
|
+
path: ["structuredValueContracts"],
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
});
|
|
1105
|
+
|
|
1106
|
+
/** Retained v1/v2 catalogs remain parse-only; every newly authored catalog uses v3/catalogVersion 6. */
|
|
1107
|
+
export const AssuranceDocumentAuthorityCatalogSchema = z.discriminatedUnion("schemaVersion", [
|
|
1108
|
+
AssuranceDocumentAuthorityCatalogV1Schema,
|
|
1109
|
+
AssuranceDocumentAuthorityCatalogV2Schema,
|
|
1110
|
+
AssuranceDocumentAuthorityCatalogV3Schema,
|
|
1111
|
+
]);
|
|
1112
|
+
export type AssuranceDocumentAuthorityCatalog = z.infer<typeof AssuranceDocumentAuthorityCatalogSchema>;
|
|
1113
|
+
|
|
1114
|
+
const canonicalizeJsonValue = (value: unknown): unknown => {
|
|
1115
|
+
if (Array.isArray(value)) return value.map(canonicalizeJsonValue);
|
|
1116
|
+
if (value !== null && typeof value === "object") {
|
|
1117
|
+
return Object.fromEntries(
|
|
1118
|
+
Object.entries(value)
|
|
1119
|
+
.sort(([left], [right]) => compareCanonicalText(left, right))
|
|
1120
|
+
.map(([key, nested]) => [key, canonicalizeJsonValue(nested)]),
|
|
1121
|
+
);
|
|
1122
|
+
}
|
|
1123
|
+
return value;
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
/** Validate that each monitored source is exact, current and rights-authorized inside the same engine-owned registry snapshot. */
|
|
1127
|
+
export const collectAssuranceDocumentAuthorityCatalogIssues = (input: {
|
|
1128
|
+
readonly catalog: AssuranceDocumentAuthorityCatalog;
|
|
1129
|
+
readonly sourceRegistry: AssuranceSourceRegistry;
|
|
1130
|
+
readonly evaluatedAt: string;
|
|
1131
|
+
}): string[] => {
|
|
1132
|
+
const catalog = AssuranceDocumentAuthorityCatalogSchema.parse(input.catalog);
|
|
1133
|
+
const registry = AssuranceSourceRegistrySchema.parse(input.sourceRegistry);
|
|
1134
|
+
const sourceRecords = new Map(registry.sources.map((source) => [`${source.identity.sourceRef}@${source.identity.sourceVersion}`, source]));
|
|
1135
|
+
const issues: string[] = [];
|
|
1136
|
+
if (catalog.verifiedAt > input.evaluatedAt) issues.push(`document authority catalog is verified after evaluation time ${input.evaluatedAt}`);
|
|
1137
|
+
if (registry.verifiedAt > input.evaluatedAt) issues.push(`source registry is verified after evaluation time ${input.evaluatedAt}`);
|
|
1138
|
+
catalog.sourceMonitoringPolicies.forEach((policy) => {
|
|
1139
|
+
const key = `${policy.source.sourceRef}@${policy.source.sourceVersion}`;
|
|
1140
|
+
const source = sourceRecords.get(key);
|
|
1141
|
+
if (!source) {
|
|
1142
|
+
issues.push(`source monitoring policy ${policy.policyRef} references source ${key} outside the authority registry`);
|
|
1143
|
+
return;
|
|
1144
|
+
}
|
|
1145
|
+
if (source.canonicalLocator !== policy.canonicalLocator || source.lifecycleStatus !== policy.expectedLifecycleStatus) {
|
|
1146
|
+
issues.push(`source monitoring policy ${policy.policyRef} does not match current source identity metadata`);
|
|
1147
|
+
}
|
|
1148
|
+
const rights = deriveAssuranceRightsAuthorization(source.rights, policy.requiredSourceUses, input.evaluatedAt);
|
|
1149
|
+
if (!rights.authorized) issues.push(`source monitoring policy ${policy.policyRef} is not rights-authorized for ${rights.requestedUses.join(", ")}`);
|
|
1150
|
+
if (policy.lastCheckedAt > input.evaluatedAt)
|
|
1151
|
+
issues.push(`source monitoring policy ${policy.policyRef} was checked after evaluation time ${input.evaluatedAt}`);
|
|
1152
|
+
if (policy.monitoringStatus !== AssuranceDocumentSourceMonitoringStatus.CURRENT || policy.nextCheckOn < input.evaluatedAt.slice(0, 10)) {
|
|
1153
|
+
issues.push(`source monitoring policy ${policy.policyRef} is not current at ${input.evaluatedAt}`);
|
|
1154
|
+
}
|
|
1155
|
+
});
|
|
1156
|
+
return issues;
|
|
1157
|
+
};
|
|
1158
|
+
```
|