@wildo-ai/framework-knowledge 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +34 -0
- package/dist/esm/.builder.pid +9 -0
- package/dist/esm/framework-knowledge.definitions.d.ts +51 -0
- package/dist/esm/framework-knowledge.definitions.d.ts.map +1 -0
- package/dist/esm/framework-knowledge.definitions.js +1571 -0
- package/dist/esm/framework-knowledge.definitions.js.map +1 -0
- package/dist/esm/framework-knowledge.loader.d.ts +72 -0
- package/dist/esm/framework-knowledge.loader.d.ts.map +1 -0
- package/dist/esm/framework-knowledge.loader.js +258 -0
- package/dist/esm/framework-knowledge.loader.js.map +1 -0
- package/dist/esm/framework-knowledge.schemas.d.ts +236 -0
- package/dist/esm/framework-knowledge.schemas.d.ts.map +1 -0
- package/dist/esm/framework-knowledge.schemas.js +23 -0
- package/dist/esm/framework-knowledge.schemas.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts +53 -0
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js +56 -0
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts +200 -0
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js +228 -0
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts +39 -0
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js +39 -0
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts +261 -0
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js +412 -0
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts +61 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js +65 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts +53 -0
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js +54 -0
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts +43 -0
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js +73 -0
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts +53 -0
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js +114 -0
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts +95 -0
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js +102 -0
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts +258 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.js +241 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts +241 -0
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js +202 -0
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts +82 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js +89 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts +56 -0
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.js +76 -0
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.d.ts +30 -0
- package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.js +27 -0
- package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.market-research/playbook.definition.d.ts +31 -0
- package/dist/esm/playbooks/top_down.market-research/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.market-research/playbook.definition.js +26 -0
- package/dist/esm/playbooks/top_down.market-research/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts +254 -0
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js +219 -0
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts +180 -0
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js +302 -0
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts +249 -0
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js +286 -0
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts +248 -0
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js +227 -0
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts +45 -0
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js +48 -0
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts +250 -0
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js +218 -0
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js.map +1 -0
- package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/authority-basis.json +1 -0
- package/dist/knowledge/manifest.json +45 -0
- package/dist/knowledge/playbooks/bottom_up.build-decompose/method.md +407 -0
- package/dist/knowledge/playbooks/bottom_up.build-decompose/playbook.json +69 -0
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/method.md +556 -0
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/playbook.json +47 -0
- package/dist/knowledge/playbooks/bottom_up.build-scale/method.md +344 -0
- package/dist/knowledge/playbooks/bottom_up.build-scale/playbook.json +43 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/method.md +259 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/playbook.json +83 -0
- package/dist/knowledge/playbooks/bottom_up.domain-plan/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/bottom_up.foundation/method.md +321 -0
- package/dist/knowledge/playbooks/bottom_up.foundation/playbook.json +79 -0
- package/dist/knowledge/playbooks/bottom_up.placement-plan/method.md +185 -0
- package/dist/knowledge/playbooks/bottom_up.placement-plan/playbook.json +66 -0
- package/dist/knowledge/playbooks/refinement.compliance-document-candidate/method.md +737 -0
- package/dist/knowledge/playbooks/refinement.compliance-document-candidate/playbook.json +44 -0
- package/dist/knowledge/playbooks/refinement.document-facts/method.md +261 -0
- package/dist/knowledge/playbooks/refinement.document-facts/playbook.json +57 -0
- package/dist/knowledge/playbooks/top_down.brand-identity/method.md +151 -0
- package/dist/knowledge/playbooks/top_down.brand-identity/playbook.json +124 -0
- package/dist/knowledge/playbooks/top_down.business-model/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.business-model/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.business-model/method.md +128 -0
- package/dist/knowledge/playbooks/top_down.business-model/playbook.json +102 -0
- package/dist/knowledge/playbooks/top_down.business-model/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.capability-map/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.capability-map/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.capability-map/method.md +239 -0
- package/dist/knowledge/playbooks/top_down.capability-map/playbook.json +73 -0
- package/dist/knowledge/playbooks/top_down.capability-map/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.compliance-posture/method.md +177 -0
- package/dist/knowledge/playbooks/top_down.compliance-posture/playbook.json +95 -0
- package/dist/knowledge/playbooks/top_down.market-analysis/method.md +64 -0
- package/dist/knowledge/playbooks/top_down.market-analysis/playbook.json +49 -0
- package/dist/knowledge/playbooks/top_down.market-evidence-adequacy/method.md +56 -0
- package/dist/knowledge/playbooks/top_down.market-evidence-adequacy/playbook.json +40 -0
- package/dist/knowledge/playbooks/top_down.market-research/method.md +68 -0
- package/dist/knowledge/playbooks/top_down.market-research/playbook.json +42 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/method.md +239 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/playbook.json +69 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.phase-gate/method.md +96 -0
- package/dist/knowledge/playbooks/top_down.phase-gate/playbook.json +77 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/method.md +53 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/playbook.json +61 -0
- package/dist/knowledge/playbooks/top_down.requirements-definition/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/method.md +280 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/playbook.json +87 -0
- package/dist/knowledge/playbooks/top_down.scope-roadmap/structured-artifact-action.json +1 -0
- package/dist/knowledge/playbooks/top_down.value-proposition/method.md +204 -0
- package/dist/knowledge/playbooks/top_down.value-proposition/playbook.json +54 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/method.md +146 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/playbook.json +120 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/structured-artifact-action.json +1 -0
- package/dist/knowledge/references/application.database.migration-change-risk.md +28 -0
- package/dist/knowledge/references/assertions.authored-metadata.config.md +90 -0
- package/dist/knowledge/references/assertions.behaviors.wire-contracts.md +223 -0
- package/dist/knowledge/references/assertions.references.conventions.md +92 -0
- package/dist/knowledge/references/assertions.snapshot.validation.md +317 -0
- package/dist/knowledge/references/assertions.specification.config.md +287 -0
- package/dist/knowledge/references/brand.asset.config.md +167 -0
- package/dist/knowledge/references/brand.authored-metadata.config.md +51 -0
- package/dist/knowledge/references/brand.logo-direction.config.md +88 -0
- package/dist/knowledge/references/brand.name.config.md +46 -0
- package/dist/knowledge/references/brand.snapshot.config.md +76 -0
- package/dist/knowledge/references/brand.snapshot.validation.md +446 -0
- package/dist/knowledge/references/brand.visual-tone.config.md +56 -0
- package/dist/knowledge/references/build-plan.task-graph.config.md +198 -0
- package/dist/knowledge/references/business-model.authored-metadata.config.md +65 -0
- package/dist/knowledge/references/business-model.pricing-plan.config.md +122 -0
- package/dist/knowledge/references/business-model.references.conventions.md +99 -0
- package/dist/knowledge/references/business-model.snapshot.config.md +121 -0
- package/dist/knowledge/references/business-model.snapshot.validation.md +325 -0
- package/dist/knowledge/references/cli.market.generate-command.md +230 -0
- package/dist/knowledge/references/cli.market.utils.md +147 -0
- package/dist/knowledge/references/companion.introspection.behaviors.market.md +90 -0
- package/dist/knowledge/references/companion.introspection.handlers.market.md +42 -0
- package/dist/knowledge/references/companion.market.generation-service.md +270 -0
- package/dist/knowledge/references/companion.market.prompt-renderer.md +244 -0
- package/dist/knowledge/references/companion.technical-doc.service.md +809 -0
- package/dist/knowledge/references/engine.client-bundle.allow-list.md +125 -0
- package/dist/knowledge/references/engine.client-bundle.discipline.md +130 -0
- package/dist/knowledge/references/engine.client-bundle.external-connectors-public.discipline.md +55 -0
- package/dist/knowledge/references/engine.saas-technical-doc.config.md +215 -0
- package/dist/knowledge/references/engine.saas-website.config.md +331 -0
- package/dist/knowledge/references/example.authorization.unit-narrowing.declaration.md +24 -0
- package/dist/knowledge/references/example.backend.addon-wiring.module.md +55 -0
- package/dist/knowledge/references/example.backend.custom-operation.create-postfix.md +35 -0
- package/dist/knowledge/references/example.backend.operation.error-throw.md +17 -0
- package/dist/knowledge/references/example.config.app-shell.command-menu-items.md +63 -0
- package/dist/knowledge/references/example.config.app-shell.full.md +147 -0
- package/dist/knowledge/references/example.config.app-shell.hosted-components.md +45 -0
- package/dist/knowledge/references/example.config.app-shell.quick-switcher-fields.md +37 -0
- package/dist/knowledge/references/example.config.backend.billing-enable.md +20 -0
- package/dist/knowledge/references/example.config.backend.required-floors.md +46 -0
- package/dist/knowledge/references/example.config.design-system.full.md +162 -0
- package/dist/knowledge/references/example.config.navigation.full.md +71 -0
- package/dist/knowledge/references/example.config.provider.backend-scope-billing.md +27 -0
- package/dist/knowledge/references/example.data-seeding.minimal.md +114 -0
- package/dist/knowledge/references/example.email.template.minimal.md +54 -0
- package/dist/knowledge/references/example.engine.component-registration.lazy-load.md +16 -0
- package/dist/knowledge/references/example.engine.product-definitions.feature-and-profiles.md +146 -0
- package/dist/knowledge/references/example.flows-actors.chat-assistant.md +196 -0
- package/dist/knowledge/references/example.flows-actors.llm-agent-one-shot.md +174 -0
- package/dist/knowledge/references/example.i18n.label-generation.engine-barrel.md +15 -0
- package/dist/knowledge/references/example.infra.cdn.cloudflare.md +23 -0
- package/dist/knowledge/references/example.infra.cdn.generic.md +17 -0
- package/dist/knowledge/references/example.infra.environment-config.local.md +250 -0
- package/dist/knowledge/references/example.market.alternative.in-house-build.md +49 -0
- package/dist/knowledge/references/example.market.authored-metadata.md +32 -0
- package/dist/knowledge/references/example.market.buying-journey.core-icp.md +140 -0
- package/dist/knowledge/references/example.market.category.config.md +71 -0
- package/dist/knowledge/references/example.market.channel.community.md +39 -0
- package/dist/knowledge/references/example.market.feature-benefit.kano-threshold.md +67 -0
- package/dist/knowledge/references/example.market.feature-benefit.pain-reliever.md +65 -0
- package/dist/knowledge/references/example.market.icp.anti-target.md +47 -0
- package/dist/knowledge/references/example.market.icp.individual.md +82 -0
- package/dist/knowledge/references/example.market.icp.legal-entity-with-geographies.md +95 -0
- package/dist/knowledge/references/example.market.is-benefit-available.composition.md +40 -0
- package/dist/knowledge/references/example.market.job.emotional.md +27 -0
- package/dist/knowledge/references/example.market.job.functional.md +28 -0
- package/dist/knowledge/references/example.market.message-template.seeds.md +106 -0
- package/dist/knowledge/references/example.market.objection.pricing.md +39 -0
- package/dist/knowledge/references/example.market.persona.dmu-with-inheritance.md +62 -0
- package/dist/knowledge/references/example.market.persona.individual-self.md +51 -0
- package/dist/knowledge/references/example.market.positioning.per-icp.md +103 -0
- package/dist/knowledge/references/example.market.proof.metric.md +39 -0
- package/dist/knowledge/references/example.market.scoring.golden-case.md +46 -0
- package/dist/knowledge/references/example.market.scoring.no-coverage-zero.md +40 -0
- package/dist/knowledge/references/example.market.snapshot-validation.duplicate-journey-stage.md +36 -0
- package/dist/knowledge/references/example.market.snapshot-validation.errors-by-kind.md +55 -0
- package/dist/knowledge/references/example.market.snapshot-validation.objection-proof-benefit-mismatch.md +74 -0
- package/dist/knowledge/references/example.market.snapshot-validation.proof-without-support.md +32 -0
- package/dist/knowledge/references/example.market.snapshot-validation.threshold-without-job.md +44 -0
- package/dist/knowledge/references/example.market.snapshot.assembled.md +49 -0
- package/dist/knowledge/references/example.market.tone-of-voice.config.md +41 -0
- package/dist/knowledge/references/example.market.trigger.growth-milestone.md +43 -0
- package/dist/knowledge/references/example.module.companion-exports.full.md +142 -0
- package/dist/knowledge/references/example.module.registration.shared.md +16 -0
- package/dist/knowledge/references/example.module.relationships.actor-edge-back-to-scope-owner.md +47 -0
- package/dist/knowledge/references/example.module.relationships.discriminator.md +25 -0
- package/dist/knowledge/references/example.module.relationships.scope-membership-junction.md +25 -0
- package/dist/knowledge/references/example.provider.backend-module-shape.md +110 -0
- package/dist/knowledge/references/example.provider.contribution.backend-billing.md +12 -0
- package/dist/knowledge/references/example.provider.frontend-file-picker.contribution.md +30 -0
- package/dist/knowledge/references/example.provider.frontend-file-picker.module.md +21 -0
- package/dist/knowledge/references/example.rag.source-fields.declaration.md +83 -0
- package/dist/knowledge/references/example.rate-limit.custom-controller-surface.md +25 -0
- package/dist/knowledge/references/example.rate-limit.resource-operation-surface.md +24 -0
- package/dist/knowledge/references/example.resource.add-field.priority-enum.md +19 -0
- package/dist/knowledge/references/example.resource.add-resource.module-factory-map.md +21 -0
- package/dist/knowledge/references/example.resource.config-wiring.fk-relationship.md +33 -0
- package/dist/knowledge/references/example.resource.custom-view.read-host.md +28 -0
- package/dist/knowledge/references/example.resource.mcp-exposure.md +65 -0
- package/dist/knowledge/references/example.resource.reference-constraints.role-constrained.md +27 -0
- package/dist/knowledge/references/example.resource.ui-behavior.enum-badge.md +22 -0
- package/dist/knowledge/references/example.resource.ui-behavior.operation-icon.md +43 -0
- package/dist/knowledge/references/example.spec.composite-view.workspace.md +72 -0
- package/dist/knowledge/references/example.spec.feature.flag-with-codehandling.md +64 -0
- package/dist/knowledge/references/example.spec.frontend-component.prop-vocabulary.md +88 -0
- package/dist/knowledge/references/example.spec.resource.semantic-field.md +23 -0
- package/dist/knowledge/references/example.views.app-level.composite-views-config.md +19 -0
- package/dist/knowledge/references/example.views.chart-view.resource-owned.md +69 -0
- package/dist/knowledge/references/example.views.composite-view.host-embeds.md +31 -0
- package/dist/knowledge/references/example.views.composite-view.workspace.md +65 -0
- package/dist/knowledge/references/example.views.custom-view.execution-host.md +41 -0
- package/dist/knowledge/references/example.views.execution-view.resource-owned.md +25 -0
- package/dist/knowledge/references/external-connectors.app.frontend-provider-module.md +42 -0
- package/dist/knowledge/references/market.alternative.config.md +68 -0
- package/dist/knowledge/references/market.alternative.kind.md +32 -0
- package/dist/knowledge/references/market.authored-metadata.config.md +64 -0
- package/dist/knowledge/references/market.buying-journey.config.md +43 -0
- package/dist/knowledge/references/market.buying-journey.stage.md +33 -0
- package/dist/knowledge/references/market.category.config.md +63 -0
- package/dist/knowledge/references/market.channel.config.md +59 -0
- package/dist/knowledge/references/market.channel.kind.md +49 -0
- package/dist/knowledge/references/market.context-block.builder.md +544 -0
- package/dist/knowledge/references/market.context-block.response.md +57 -0
- package/dist/knowledge/references/market.feature-benefit.config.md +84 -0
- package/dist/knowledge/references/market.feature-benefit.kano.md +41 -0
- package/dist/knowledge/references/market.gain.config.md +50 -0
- package/dist/knowledge/references/market.generation.response.md +108 -0
- package/dist/knowledge/references/market.icp.config.md +162 -0
- package/dist/knowledge/references/market.icp.geographic-targeting.md +57 -0
- package/dist/knowledge/references/market.inherit-from.md +74 -0
- package/dist/knowledge/references/market.is-benefit-available.md +58 -0
- package/dist/knowledge/references/market.job.config.md +48 -0
- package/dist/knowledge/references/market.message-template.config.md +86 -0
- package/dist/knowledge/references/market.objection.config.md +56 -0
- package/dist/knowledge/references/market.objection.kind.md +34 -0
- package/dist/knowledge/references/market.pain.config.md +50 -0
- package/dist/knowledge/references/market.persona.config.md +64 -0
- package/dist/knowledge/references/market.positioning.config.md +84 -0
- package/dist/knowledge/references/market.proof.config.md +48 -0
- package/dist/knowledge/references/market.proof.kind.md +34 -0
- package/dist/knowledge/references/market.references.weighted-edges.md +105 -0
- package/dist/knowledge/references/market.scoring.fit.md +215 -0
- package/dist/knowledge/references/market.snapshot.config.md +34 -0
- package/dist/knowledge/references/market.snapshot.validation.md +1171 -0
- package/dist/knowledge/references/market.tone-of-voice.config.md +80 -0
- package/dist/knowledge/references/market.trigger.config.md +45 -0
- package/dist/knowledge/references/market.trigger.kind.md +35 -0
- package/dist/knowledge/references/placement-plan.config.md +330 -0
- package/dist/knowledge/references/platform.config.application-database.md +74 -0
- package/dist/knowledge/references/platform.config.application-modules.md +30 -0
- package/dist/knowledge/references/platform.config.backing-services.md +266 -0
- package/dist/knowledge/references/platform.config.cdn.md +167 -0
- package/dist/knowledge/references/platform.config.environment.deployment.md +263 -0
- package/dist/knowledge/references/platform.config.saas.md +405 -0
- package/dist/knowledge/references/presets.models.design-system.configuration.md +59 -0
- package/dist/knowledge/references/presets.models.design-system.source-config.md +72 -0
- package/dist/knowledge/references/presets.models.labelling.sections.md +64 -0
- package/dist/knowledge/references/presets.models.material.profile-contract.md +192 -0
- package/dist/knowledge/references/presets.models.material.runtime-policy.md +60 -0
- package/dist/knowledge/references/presets.models.surface-policy.defaults.md +613 -0
- package/dist/knowledge/references/presets.models.surface-policy.md +534 -0
- package/dist/knowledge/references/presets.models.surface-variant.md +56 -0
- package/dist/knowledge/references/requirements.authored-metadata.config.md +64 -0
- package/dist/knowledge/references/requirements.functional-requirement.config.md +68 -0
- package/dist/knowledge/references/requirements.non-functional-requirement.config.md +100 -0
- package/dist/knowledge/references/requirements.references.conventions.md +125 -0
- package/dist/knowledge/references/requirements.snapshot.config.md +73 -0
- package/dist/knowledge/references/requirements.snapshot.validation.md +333 -0
- package/dist/knowledge/references/roadmap.authored-metadata.config.md +64 -0
- package/dist/knowledge/references/roadmap.phase.config.md +149 -0
- package/dist/knowledge/references/roadmap.references.conventions.md +89 -0
- package/dist/knowledge/references/roadmap.snapshot.config.md +65 -0
- package/dist/knowledge/references/roadmap.snapshot.validation.md +325 -0
- package/dist/knowledge/references/saas.backend.app-config.backend-authored.md +32 -0
- package/dist/knowledge/references/saas.backend.application-initialization.assembly.md +38 -0
- package/dist/knowledge/references/saas.backend.billing.resolution-failure-reasons.md +45 -0
- package/dist/knowledge/references/saas.backend.custom-operation.authoritative-fields.md +53 -0
- package/dist/knowledge/references/saas.backend.custom-operation.transactional-core.md +120 -0
- package/dist/knowledge/references/saas.backend.domain-module.md +237 -0
- package/dist/knowledge/references/saas.backend.email-template.definition.md +69 -0
- package/dist/knowledge/references/saas.backend.flows-actors.a2a-agent-card.md +89 -0
- package/dist/knowledge/references/saas.backend.flows-actors.a2a-task-surface.md +118 -0
- package/dist/knowledge/references/saas.backend.flows-actors.function-tool.md +82 -0
- package/dist/knowledge/references/saas.backend.flows-actors.invoke-agent.md +48 -0
- package/dist/knowledge/references/saas.backend.flows-actors.resource-read-tool.md +39 -0
- package/dist/knowledge/references/saas.backend.flows-actors.resource-write-tool.md +67 -0
- package/dist/knowledge/references/saas.backend.pdf-template.bindings.md +52 -0
- package/dist/knowledge/references/saas.backend.pdf-template.definition.md +113 -0
- package/dist/knowledge/references/saas.backend.rate-limit-service.check-policy.md +75 -0
- package/dist/knowledge/references/saas.backend.system-access-service.md +994 -0
- package/dist/knowledge/references/saas.data-seeding.admin-endpoints.md +59 -0
- package/dist/knowledge/references/saas.data-seeding.bootstrap-wiring.md +184 -0
- package/dist/knowledge/references/saas.data-seeding.definition-input.md +95 -0
- package/dist/knowledge/references/saas.data-seeding.modes.md +72 -0
- package/dist/knowledge/references/saas.data-seeding.run-ledger.md +198 -0
- package/dist/knowledge/references/saas.data-seeding.run-status.md +35 -0
- package/dist/knowledge/references/saas.data-seeding.schedule.md +91 -0
- package/dist/knowledge/references/saas.data-seeding.scope-iteration-strategy.md +46 -0
- package/dist/knowledge/references/saas.external-providers.backend-provider-registry.runtime-filter.md +55 -0
- package/dist/knowledge/references/saas.external-providers.document-extraction.applicability.md +26 -0
- package/dist/knowledge/references/saas.external-providers.embeddings.applicability.md +30 -0
- package/dist/knowledge/references/saas.external-providers.llm.model-configuration.md +124 -0
- package/dist/knowledge/references/saas.external-providers.llm.operation-key.md +49 -0
- package/dist/knowledge/references/saas.frontend.app-level-component.configuration.md +265 -0
- package/dist/knowledge/references/saas.frontend.app-level-component.vocabulary.md +148 -0
- package/dist/knowledge/references/saas.frontend.app-shell.hosted-components.md +145 -0
- package/dist/knowledge/references/saas.frontend.chart-view.inserted-declaration.md +80 -0
- package/dist/knowledge/references/saas.frontend.command-menu.omnibox.md +88 -0
- package/dist/knowledge/references/saas.frontend.command-menu.search-resource.md +109 -0
- package/dist/knowledge/references/saas.frontend.component-registration.entry.md +21 -0
- package/dist/knowledge/references/saas.frontend.composite-view.authoring.md +102 -0
- package/dist/knowledge/references/saas.frontend.composite-view.define-helper.md +31 -0
- package/dist/knowledge/references/saas.frontend.domain-module.md +31 -0
- package/dist/knowledge/references/saas.frontend.embedded-resource-descent.md +37 -0
- package/dist/knowledge/references/saas.frontend.execution-view.action-status-contract.md +172 -0
- package/dist/knowledge/references/saas.frontend.execution-view.action-status-contract.per-action-retry-loop.md +115 -0
- package/dist/knowledge/references/saas.frontend.execution-view.definition.md +172 -0
- package/dist/knowledge/references/saas.frontend.execution-view.dirty-bridge-contract.local-pane.md +109 -0
- package/dist/knowledge/references/saas.frontend.execution-view.dirty-bridge-contract.md +55 -0
- package/dist/knowledge/references/saas.frontend.execution-view.dirty-state-contract.md +151 -0
- package/dist/knowledge/references/saas.frontend.execution-view.failure-handling-contract.md +302 -0
- package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.md +89 -0
- package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.participation-prefetch.md +231 -0
- package/dist/knowledge/references/saas.frontend.execution-view.loading-aggregation.participation-prefetch.shell-data-hydrator.md +174 -0
- package/dist/knowledge/references/saas.frontend.execution-view.navigation-handling-and-embedding.md +96 -0
- package/dist/knowledge/references/saas.frontend.execution-view.navigation-handling-and-embedding.resolution.md +45 -0
- package/dist/knowledge/references/saas.frontend.execution-view.outcome-emission-contract.md +71 -0
- package/dist/knowledge/references/saas.frontend.execution-view.participation-and-anchor.md +80 -0
- package/dist/knowledge/references/saas.frontend.execution-view.three-zone-contract.md +147 -0
- package/dist/knowledge/references/saas.frontend.flows-actors-view.md +40 -0
- package/dist/knowledge/references/saas.frontend.form-fields.file-provider-constraints.md +80 -0
- package/dist/knowledge/references/saas.frontend.full-custom-view.definition.md +64 -0
- package/dist/knowledge/references/saas.frontend.inserted-view.identity-bindings-descriptor.md +149 -0
- package/dist/knowledge/references/saas.frontend.operation-key-and-resource-config-like.md +63 -0
- package/dist/knowledge/references/saas.frontend.quick-switcher.scope-field.md +102 -0
- package/dist/knowledge/references/saas.frontend.related-resource-embeds.md +86 -0
- package/dist/knowledge/references/saas.frontend.related-resource-preview.md +23 -0
- package/dist/knowledge/references/saas.frontend.related-resource-sections.md +28 -0
- package/dist/knowledge/references/saas.frontend.resource-header-title.md +43 -0
- package/dist/knowledge/references/saas.frontend.resource-layout-templates.md +215 -0
- package/dist/knowledge/references/saas.frontend.resource-operation-frontend-config.md +531 -0
- package/dist/knowledge/references/saas.frontend.resource-ui-behavior-config.md +210 -0
- package/dist/knowledge/references/saas.frontend.resource-ui-behavior-preset-map.md +39 -0
- package/dist/knowledge/references/saas.frontend.settings-hub.engine-destinations.md +58 -0
- package/dist/knowledge/references/saas.frontend.settings-hub.placement.md +118 -0
- package/dist/knowledge/references/saas.frontend.view-definition-scope.md +42 -0
- package/dist/knowledge/references/saas.market.generation-agent.md +104 -0
- package/dist/knowledge/references/saas.models.core-resource-operation.md +86 -0
- package/dist/knowledge/references/saas.models.data-mode-read-list.md +395 -0
- package/dist/knowledge/references/saas.models.engine-capabilities.md +114 -0
- package/dist/knowledge/references/saas.models.error-type.md +45 -0
- package/dist/knowledge/references/saas.models.external-data-pipeline.md +162 -0
- package/dist/knowledge/references/saas.models.feature-limit-semantic.md +51 -0
- package/dist/knowledge/references/saas.models.flows-actors.agent-configuration.md +127 -0
- package/dist/knowledge/references/saas.models.flows-actors.agent-definition.md +115 -0
- package/dist/knowledge/references/saas.models.flows-actors.agent-invocation.md +52 -0
- package/dist/knowledge/references/saas.models.flows-actors.agent-prompt-spec.md +188 -0
- package/dist/knowledge/references/saas.models.http-api-binding.md +237 -0
- package/dist/knowledge/references/saas.models.navigation.layout.md +149 -0
- package/dist/knowledge/references/saas.models.organization-unit-narrowing-containment.md +22 -0
- package/dist/knowledge/references/saas.models.organization-unit-narrowing-declaration.md +42 -0
- package/dist/knowledge/references/saas.models.polymorphism.optout-business-key.md +62 -0
- package/dist/knowledge/references/saas.models.polymorphism.variant-definition.md +74 -0
- package/dist/knowledge/references/saas.models.provider-capabilities.md +97 -0
- package/dist/knowledge/references/saas.models.rate-limit-configuration.md +67 -0
- package/dist/knowledge/references/saas.models.relationship-handling-contract.md +30 -0
- package/dist/knowledge/references/saas.models.relationship-handling-settings.md +62 -0
- package/dist/knowledge/references/saas.models.relationship-nature-and-models.md +112 -0
- package/dist/knowledge/references/saas.models.resource-config.builder-parameters.md +431 -0
- package/dist/knowledge/references/saas.models.resource-config.forwarded-label.md +88 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-api-call.md +89 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-base.md +79 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-mcp-exposure.md +49 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-path.md +27 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-union.md +26 -0
- package/dist/knowledge/references/saas.models.resource-config.operation-variant-for-key.md +62 -0
- package/dist/knowledge/references/saas.models.resource-config.resource-configuration.md +124 -0
- package/dist/knowledge/references/saas.models.resource-config.resource-relationships-buckets.md +38 -0
- package/dist/knowledge/references/saas.models.resource-config.resources-registry.md +69 -0
- package/dist/knowledge/references/saas.models.resource-config.searchable-relation.md +89 -0
- package/dist/knowledge/references/saas.models.resource-config.system-access-policy.md +121 -0
- package/dist/knowledge/references/saas.models.resource-config.token-generation.md +145 -0
- package/dist/knowledge/references/saas.models.resource-field-identifier.md +25 -0
- package/dist/knowledge/references/saas.models.resource-operation-display-risk.md +77 -0
- package/dist/knowledge/references/saas.models.resource-operation-variant-runtime.md +58 -0
- package/dist/knowledge/references/saas.models.resource-primary-scope.md +36 -0
- package/dist/knowledge/references/saas.models.resource-relationship-access-scope.md +26 -0
- package/dist/knowledge/references/saas.models.resource-relationship-builder-parameters.md +100 -0
- package/dist/knowledge/references/saas.models.resource-relationship-cardinality.md +57 -0
- package/dist/knowledge/references/saas.models.resource-relationship-declaration.md +69 -0
- package/dist/knowledge/references/saas.models.resource-relationship-resolved-semantics.md +60 -0
- package/dist/knowledge/references/saas.models.resource-relationship-schema.md +172 -0
- package/dist/knowledge/references/saas.models.resource-server-instance.md +109 -0
- package/dist/knowledge/references/saas.models.resource-type.md +24 -0
- package/dist/knowledge/references/saas.models.schema-family-builder.md +242 -0
- package/dist/knowledge/references/saas.models.scope-membership.md +143 -0
- package/dist/knowledge/references/saas.models.shared-domain-module.md +36 -0
- package/dist/knowledge/references/saas.models.shared-saas-module.md +36 -0
- package/dist/knowledge/references/saas.public-runtime.contract.md +229 -0
- package/dist/knowledge/references/saas.rag.retrieval-bounds.md +106 -0
- package/dist/knowledge/references/saas.rag.retrieval-refusals.md +89 -0
- package/dist/knowledge/references/saas.rag.retrieval-request.md +130 -0
- package/dist/knowledge/references/saas.rag.retrieval-result.md +147 -0
- package/dist/knowledge/references/saas.rag.retrieval-scores.md +54 -0
- package/dist/knowledge/references/saas.specifications.application-document-fact-specification.contract.md +59 -0
- package/dist/knowledge/references/saas.specifications.application-document-publication.contract.md +74 -0
- package/dist/knowledge/references/saas.specifications.assurance-document-blueprint.contract.md +1158 -0
- package/dist/knowledge/references/saas.specifications.assurance-program.contract.md +2602 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.catalog-spec-shared.md +180 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.discriminated-union.md +138 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-aggregate-offer.md +46 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-aggregate-rating.md +47 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-article.md +49 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-blog-posting.md +62 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-breadcrumb-list.md +46 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-faq-page.md +51 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-offer.md +46 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-organization.md +48 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-product.md +59 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-review.md +46 -0
- package/dist/knowledge/references/saas.specifications.catalogs.schema-org.entity-website.md +46 -0
- package/dist/knowledge/references/saas.specifications.companion-exports.contract.md +530 -0
- package/dist/knowledge/references/saas.specifications.composite-view-specification.md +49 -0
- package/dist/knowledge/references/saas.specifications.error-message-specification.md +92 -0
- package/dist/knowledge/references/saas.specifications.family-specifications.md +109 -0
- package/dist/knowledge/references/saas.specifications.feature-specification.md +93 -0
- package/dist/knowledge/references/saas.specifications.frontend-component-spec-factory.md +113 -0
- package/dist/knowledge/references/saas.specifications.frontend-component-spec-model.md +366 -0
- package/dist/knowledge/references/saas.specifications.resource-frontend-configuration-aspect.md +41 -0
- package/dist/knowledge/references/saas.specifications.resource-operation-spec.md +1978 -0
- package/dist/knowledge/references/saas.specifications.resource-pdf-template-spec.md +58 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-code-handling.md +49 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-config.md +156 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-factory.md +171 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-frontend-config-type.md +54 -0
- package/dist/knowledge/references/saas.specifications.resource-spec-frontend-prose.md +171 -0
- package/dist/knowledge/references/saas.website.astro.bridge.md +262 -0
- package/dist/knowledge/references/saas.website.astro.head-renderer.md +271 -0
- package/dist/knowledge/references/saas.website.astro.headers-renderer.md +41 -0
- package/dist/knowledge/references/saas.website.astro.i18n-helper.md +121 -0
- package/dist/knowledge/references/saas.website.astro.label-key-collector.md +117 -0
- package/dist/knowledge/references/saas.website.astro.label-loader.md +377 -0
- package/dist/knowledge/references/saas.website.astro.llms-txt-server.md +46 -0
- package/dist/knowledge/references/saas.website.astro.pick-labels-for-page.md +90 -0
- package/dist/knowledge/references/saas.website.astro.robots-renderer.md +174 -0
- package/dist/knowledge/references/saas.website.astro.runtime-helper.md +187 -0
- package/dist/knowledge/references/saas.website.astro.site-context.md +141 -0
- package/dist/knowledge/references/saas.website.astro.sitemap-coverage.md +188 -0
- package/dist/knowledge/references/saas.website.astro.structured-data-renderer.md +174 -0
- package/dist/knowledge/references/saas.website.blog.bridge.md +396 -0
- package/dist/knowledge/references/saas.website.blog.collection-config.md +180 -0
- package/dist/knowledge/references/saas.website.blog.frontmatter.md +116 -0
- package/dist/knowledge/references/saas.website.blog.head-renderer.md +292 -0
- package/dist/knowledge/references/saas.website.blog.mdx-provider.md +100 -0
- package/dist/knowledge/references/saas.website.blog.post-renderer.md +291 -0
- package/dist/knowledge/references/saas.website.design-tokens.bundle.md +29 -0
- package/dist/knowledge/references/saas.website.design-tokens.colors.md +64 -0
- package/dist/knowledge/references/saas.website.design-tokens.radius.md +38 -0
- package/dist/knowledge/references/saas.website.factories.define-page-manifest.md +98 -0
- package/dist/knowledge/references/saas.website.factories.define-section.md +128 -0
- package/dist/knowledge/references/saas.website.label-keys.compose-helper.md +36 -0
- package/dist/knowledge/references/saas.website.label-keys.format.md +67 -0
- package/dist/knowledge/references/saas.website.label-pack.validator.md +206 -0
- package/dist/knowledge/references/saas.website.page-layout.component.md +217 -0
- package/dist/knowledge/references/saas.website.page-manifest.meta-label-keys.md +47 -0
- package/dist/knowledge/references/saas.website.page-manifest.route-path.md +49 -0
- package/dist/knowledge/references/saas.website.page-manifest.schema.md +186 -0
- package/dist/knowledge/references/saas.website.page-manifest.seo.md +46 -0
- package/dist/knowledge/references/saas.website.page.context.md +57 -0
- package/dist/knowledge/references/saas.website.primitives.button.md +123 -0
- package/dist/knowledge/references/saas.website.primitives.heading.md +103 -0
- package/dist/knowledge/references/saas.website.primitives.image.md +103 -0
- package/dist/knowledge/references/saas.website.primitives.internal-button.md +151 -0
- package/dist/knowledge/references/saas.website.primitives.internal-link.md +193 -0
- package/dist/knowledge/references/saas.website.primitives.link.md +78 -0
- package/dist/knowledge/references/saas.website.primitives.text.md +82 -0
- package/dist/knowledge/references/saas.website.refs.page.md +56 -0
- package/dist/knowledge/references/saas.website.refs.section.md +57 -0
- package/dist/knowledge/references/saas.website.root-config.navigation.md +37 -0
- package/dist/knowledge/references/saas.website.root-config.schema.md +192 -0
- package/dist/knowledge/references/saas.website.root-config.seo.md +98 -0
- package/dist/knowledge/references/saas.website.routing.localized-path.md +84 -0
- package/dist/knowledge/references/saas.website.runtime.context.md +174 -0
- package/dist/knowledge/references/saas.website.section.component.md +138 -0
- package/dist/knowledge/references/saas.website.section.context.md +63 -0
- package/dist/knowledge/references/saas.website.sections.category-enum.md +72 -0
- package/dist/knowledge/references/saas.website.sections.definition-schema.md +121 -0
- package/dist/knowledge/references/saas.website.seo.llms-txt-config.md +37 -0
- package/dist/knowledge/references/saas.website.seo.robots-config.md +106 -0
- package/dist/knowledge/references/saas.website.seo.sitemap-config.md +73 -0
- package/dist/knowledge/references/saas.website.structured-data.payload-shape.md +71 -0
- package/dist/knowledge/references/saas.website.use-label-by-key.hook.md +45 -0
- package/dist/knowledge/references/saas.website.use-label.hook.md +82 -0
- package/dist/knowledge/references/saas.website.use-page.hook.md +30 -0
- package/dist/knowledge/references/saas.website.use-runtime.hook.md +36 -0
- package/dist/knowledge/references/saas.website.use-section.hook.md +30 -0
- package/dist/knowledge/references/saas.website.use-tokens.hook.md +32 -0
- package/dist/knowledge/references/vision.authored-metadata.config.md +64 -0
- package/dist/knowledge/references/vision.constraint.config.md +66 -0
- package/dist/knowledge/references/vision.idea.config.md +45 -0
- package/dist/knowledge/references/vision.mission.config.md +46 -0
- package/dist/knowledge/references/vision.problem.config.md +51 -0
- package/dist/knowledge/references/vision.references.conventions.md +115 -0
- package/dist/knowledge/references/vision.snapshot.config.md +85 -0
- package/dist/knowledge/references/vision.snapshot.validation.md +226 -0
- package/dist/knowledge/references/vision.success-criterion.config.md +60 -0
- package/dist/knowledge/references/zod.decorators.chainable-runtime.md +550 -0
- package/dist/knowledge/references/zod.decorators.conditional-visibility.md +104 -0
- package/dist/knowledge/references/zod.decorators.data-categories.md +197 -0
- package/dist/knowledge/references/zod.decorators.decorator-vocabulary.md +436 -0
- package/dist/knowledge/references/zod.decorators.display-edit-modes.md +174 -0
- package/dist/knowledge/references/zod.decorators.enums.frontend-handling.md +101 -0
- package/dist/knowledge/references/zod.decorators.field-spec-params.md +317 -0
- package/dist/knowledge/references/zod.decorators.file-generation.md +36 -0
- package/dist/knowledge/references/zod.decorators.file-rag-source.md +56 -0
- package/dist/knowledge/references/zod.decorators.file-schema.md +319 -0
- package/dist/knowledge/references/zod.decorators.foreign-key-display-mode.md +83 -0
- package/dist/knowledge/references/zod.decorators.per-primitive-ui.md +459 -0
- package/dist/knowledge/references/zod.decorators.primitive-ui.md +123 -0
- package/dist/knowledge/references/zod.decorators.rag-source.md +164 -0
- package/dist/knowledge/references/zod.decorators.schema-metadata.md +122 -0
- package/dist/knowledge/references/zod.decorators.shared-structural-methods.md +152 -0
- package/dist/knowledge/references/zod.decorators.shared-structural-params.md +314 -0
- package/dist/knowledge/references/zod.decorators.structural-lifecycle-params.md +529 -0
- package/dist/knowledge/references/zod.factories.bigdecimal.md +155 -0
- package/dist/knowledge/references/zod.factories.code.md +127 -0
- package/dist/knowledge/references/zod.factories.duration.md +246 -0
- package/dist/knowledge/references/zod.factories.money.md +166 -0
- package/dist/knowledge/references/zod.factories.phone.md +88 -0
- package/dist/knowledge/references/zod.factories.range.md +174 -0
- package/dist/knowledge/registries/assurance-authority-bases.json +15 -0
- package/dist/knowledge/registries/framework-topics.json +5212 -0
- package/dist/knowledge/registries/playbooks.json +488 -0
- package/dist/knowledge/registries/source-tags.json +7664 -0
- package/dist/knowledge/rules/resource-schema-awareness.md +77 -0
- package/dist/knowledge/skills/INDEX.md +349 -0
- package/dist/knowledge/skills/application-consumer-documentation-authoring/SKILL.md +415 -0
- package/dist/knowledge/skills/application-consumer-documentation-authoring/examples/domain-use-case-and-admin-task.example.md +49 -0
- package/dist/knowledge/skills/application-consumer-documentation-authoring/references/source-and-ownership-routing.md +52 -0
- package/dist/knowledge/skills/application-database-migrations/SKILL.md +218 -0
- package/dist/knowledge/skills/application-database-migrations/references/framework-application-database-api.md +84 -0
- package/dist/knowledge/skills/application-database-migrations/references/framework-migration-change-risk-api.md +37 -0
- package/dist/knowledge/skills/application-database-migrations/references/migration-refusals.md +64 -0
- package/dist/knowledge/skills/application-database-migrations/references/postgresql-vs-mongodb-obligations.md +34 -0
- package/dist/knowledge/skills/authorization-unit-narrowing/SKILL.md +323 -0
- package/dist/knowledge/skills/authorization-unit-narrowing/references/framework-unit-narrowing-declaration-api.md +84 -0
- package/dist/knowledge/skills/backend-addon-wiring/SKILL.md +324 -0
- package/dist/knowledge/skills/backend-addon-wiring/references/backend-di-routing.md +7 -0
- package/dist/knowledge/skills/backend-addon-wiring/references/framework-backend-bootstrap-api.md +276 -0
- package/dist/knowledge/skills/backend-custom-operation/SKILL.md +374 -0
- package/dist/knowledge/skills/backend-custom-operation/references/framework-error-handling-api.md +118 -0
- package/dist/knowledge/skills/backend-custom-operation/references/framework-operation-base-and-path-api.md +107 -0
- package/dist/knowledge/skills/backend-custom-operation/references/framework-transactional-core-api.md +134 -0
- package/dist/knowledge/skills/backend-custom-operation/references/operation-file-conventions.md +10 -0
- package/dist/knowledge/skills/brand-logo-authoring/SKILL.md +192 -0
- package/dist/knowledge/skills/brand-logo-authoring/references/brand-authoring-decisions.md +55 -0
- package/dist/knowledge/skills/brand-logo-authoring/references/framework-brand-asset-api.md +184 -0
- package/dist/knowledge/skills/brand-logo-authoring/references/framework-brand-snapshot-api.md +279 -0
- package/dist/knowledge/skills/compliance-document-authoring/SKILL.md +346 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-governance.md +160 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-privacy-notice.md +518 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-service-terms.md +158 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-application-document-fact-specification-contract.md +95 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-application-document-publication-contract.md +100 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-assurance-document-blueprint-contract.md +1210 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/framework-governed-document-after-drafting.md +40 -0
- package/dist/knowledge/skills/config-app-shell/SKILL.md +698 -0
- package/dist/knowledge/skills/config-app-shell/references/app-shell-surfaces.md +5 -0
- package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-api.md +415 -0
- package/dist/knowledge/skills/config-app-shell/references/framework-app-shell-hosted-components-api.md +170 -0
- package/dist/knowledge/skills/config-app-shell/references/framework-command-menu-omnibox-api.md +212 -0
- package/dist/knowledge/skills/config-app-shell/references/framework-quick-switcher-scope-field-api.md +178 -0
- package/dist/knowledge/skills/config-design-system/SKILL.md +424 -0
- package/dist/knowledge/skills/config-design-system/references/design-system-file.md +10 -0
- package/dist/knowledge/skills/config-design-system/references/framework-design-system-configuration-api.md +77 -0
- package/dist/knowledge/skills/config-design-system/references/framework-material-profile-api.md +200 -0
- package/dist/knowledge/skills/config-design-system/references/framework-material-runtime-policy-api.md +68 -0
- package/dist/knowledge/skills/config-design-system/references/framework-surface-policy-api.md +1212 -0
- package/dist/knowledge/skills/config-design-system/references/surface-policy-authoring.md +92 -0
- package/dist/knowledge/skills/config-navigation/SKILL.md +249 -0
- package/dist/knowledge/skills/config-navigation/references/framework-navigation-layout-api.md +152 -0
- package/dist/knowledge/skills/config-navigation/references/navigation-zones.md +5 -0
- package/dist/knowledge/skills/config-saas/SKILL.md +209 -0
- package/dist/knowledge/skills/config-saas/references/framework-provider-capabilities-api.md +221 -0
- package/dist/knowledge/skills/config-saas/references/framework-wildo-saas-config-api.md +408 -0
- package/dist/knowledge/skills/config-saas/references/saas-config-scope.md +9 -0
- package/dist/knowledge/skills/config-saas-backend/SKILL.md +183 -0
- package/dist/knowledge/skills/config-saas-backend/references/framework-backend-authored-config-api.md +40 -0
- package/dist/knowledge/skills/configure-billing/SKILL.md +261 -0
- package/dist/knowledge/skills/configure-billing/references/config-chain-and-failure-map.md +90 -0
- package/dist/knowledge/skills/configure-billing/references/example-backend-provider-module-shape.md +122 -0
- package/dist/knowledge/skills/configure-billing/references/example-provider-contribution-and-backend-config.md +48 -0
- package/dist/knowledge/skills/configure-billing/references/framework-backend-provider-reachability-api.md +69 -0
- package/dist/knowledge/skills/configure-billing/references/framework-billing-resolution-failure-api.md +57 -0
- package/dist/knowledge/skills/email-add-template/SKILL.md +439 -0
- package/dist/knowledge/skills/email-add-template/references/email-artifact-paths.md +9 -0
- package/dist/knowledge/skills/email-add-template/references/framework-email-template-api.md +72 -0
- package/dist/knowledge/skills/email-definition-wiring/SKILL.md +62 -0
- package/dist/knowledge/skills/email-labels-authoring/SKILL.md +64 -0
- package/dist/knowledge/skills/email-template-authoring/SKILL.md +62 -0
- package/dist/knowledge/skills/engine-component-registration/SKILL.md +257 -0
- package/dist/knowledge/skills/engine-component-registration/references/component-registration-file.md +7 -0
- package/dist/knowledge/skills/engine-component-registration/references/framework-component-registration-api.md +24 -0
- package/dist/knowledge/skills/engine-product-definitions/SKILL.md +429 -0
- package/dist/knowledge/skills/engine-product-definitions/references/framework-engine-product-definitions-api.md +287 -0
- package/dist/knowledge/skills/engine-product-definitions/references/product-registry-scope.md +5 -0
- package/dist/knowledge/skills/flows-actors-a2a-exposure/SKILL.md +491 -0
- package/dist/knowledge/skills/flows-actors-a2a-exposure/references/framework-flows-actors-a2a-contract.md +227 -0
- package/dist/knowledge/skills/flows-actors-a2a-exposure/references/framework-named-a2a-agents-contract.md +143 -0
- package/dist/knowledge/skills/flows-actors-chat-assistant/SKILL.md +368 -0
- package/dist/knowledge/skills/flows-actors-chat-assistant/examples/todo-assistant.example.md +226 -0
- package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-flows-actors-tool-api.md +208 -0
- package/dist/knowledge/skills/flows-actors-chat-assistant/references/framework-flows-actors-view-api.md +286 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/SKILL.md +376 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-definition-api.md +262 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-invocation-api.md +130 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-agent-prompt-spec-api.md +214 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/framework-llm-operation-and-model-api.md +195 -0
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/references/operation-key-selection.md +60 -0
- package/dist/knowledge/skills/frontend-cdn-publish/SKILL.md +237 -0
- package/dist/knowledge/skills/frontend-cdn-publish/references/cloudflare-and-operator-setup.md +56 -0
- package/dist/knowledge/skills/frontend-cdn-publish/references/framework-cdn-config-api.md +176 -0
- package/dist/knowledge/skills/i18n-label-generation/SKILL.md +261 -0
- package/dist/knowledge/skills/i18n-label-generation/references/framework-labelling-sections-api.md +67 -0
- package/dist/knowledge/skills/i18n-label-generation/references/label-placement.md +7 -0
- package/dist/knowledge/skills/i18n-rerun-pipeline/SKILL.md +269 -0
- package/dist/knowledge/skills/i18n-rerun-pipeline/references/framework-labelling-sections-api.md +67 -0
- package/dist/knowledge/skills/i18n-rerun-pipeline/references/i18n-routing.md +9 -0
- package/dist/knowledge/skills/i18n-translation-rerun/SKILL.md +245 -0
- package/dist/knowledge/skills/i18n-translation-rerun/references/framework-labelling-sections-api.md +67 -0
- package/dist/knowledge/skills/i18n-translation-rerun/references/translation-workflow.md +17 -0
- package/dist/knowledge/skills/infra-environment-config/SKILL.md +646 -0
- package/dist/knowledge/skills/infra-environment-config/references/framework-application-database-api.md +77 -0
- package/dist/knowledge/skills/infra-environment-config/references/framework-backing-services-api.md +282 -0
- package/dist/knowledge/skills/infra-environment-config/references/framework-environment-deployment-api.md +265 -0
- package/dist/knowledge/skills/infra-environment-config/references/infra-config-files.md +7 -0
- package/dist/knowledge/skills/journey-approve/SKILL.md +43 -0
- package/dist/knowledge/skills/journey-bootstrap-scope/SKILL.md +42 -0
- package/dist/knowledge/skills/journey-next/SKILL.md +42 -0
- package/dist/knowledge/skills/journey-report/SKILL.md +43 -0
- package/dist/knowledge/skills/journey-run/SKILL.md +55 -0
- package/dist/knowledge/skills/journey-status/SKILL.md +50 -0
- package/dist/knowledge/skills/local-environment-bootstrap/SKILL.md +370 -0
- package/dist/knowledge/skills/local-environment-bootstrap/references/initialization-recovery-recipe.md +50 -0
- package/dist/knowledge/skills/local-environment-bootstrap/references/local-environment-troubleshooting.md +409 -0
- package/dist/knowledge/skills/local-environment-bootstrap/references/wildo-cli-bootstrap-commands.md +247 -0
- package/dist/knowledge/skills/market-add-feature-benefit/SKILL.md +474 -0
- package/dist/knowledge/skills/market-add-feature-benefit/references/framework-feature-benefit-api.md +139 -0
- package/dist/knowledge/skills/market-alternatives/SKILL.md +543 -0
- package/dist/knowledge/skills/market-authoring-overview/SKILL.md +354 -0
- package/dist/knowledge/skills/market-authoring-overview/references/framework-market-references-api.md +138 -0
- package/dist/knowledge/skills/market-authoring-overview/references/framework-market-snapshot-api.md +129 -0
- package/dist/knowledge/skills/market-category/SKILL.md +290 -0
- package/dist/knowledge/skills/market-channels/SKILL.md +361 -0
- package/dist/knowledge/skills/market-companion-prompt-enrichment/SKILL.md +2752 -0
- package/dist/knowledge/skills/market-companion-prompt-enrichment/references/framework-companion-behavior-api.md +2443 -0
- package/dist/knowledge/skills/market-generation-cli/SKILL.md +1484 -0
- package/dist/knowledge/skills/market-generation-cli/references/framework-market-generation-cli.md +1230 -0
- package/dist/knowledge/skills/market-icp/SKILL.md +625 -0
- package/dist/knowledge/skills/market-jobs-pains-gains/SKILL.md +352 -0
- package/dist/knowledge/skills/market-message-templates-authoring/SKILL.md +415 -0
- package/dist/knowledge/skills/market-message-templates-authoring/references/framework-message-template-api.md +1439 -0
- package/dist/knowledge/skills/market-persona/SKILL.md +407 -0
- package/dist/knowledge/skills/market-positioning-authoring/SKILL.md +392 -0
- package/dist/knowledge/skills/market-positioning-authoring/references/framework-positioning-api.md +97 -0
- package/dist/knowledge/skills/market-proof-and-objection/SKILL.md +665 -0
- package/dist/knowledge/skills/market-scoring-interpretation/SKILL.md +620 -0
- package/dist/knowledge/skills/market-scoring-interpretation/references/framework-scoring-api.md +291 -0
- package/dist/knowledge/skills/market-snapshot-validation/SKILL.md +1706 -0
- package/dist/knowledge/skills/market-snapshot-validation/references/framework-snapshot-validation-api.md +1228 -0
- package/dist/knowledge/skills/market-tone-of-voice/SKILL.md +260 -0
- package/dist/knowledge/skills/market-triggers-and-journey/SKILL.md +579 -0
- package/dist/knowledge/skills/module-companion-exports/SKILL.md +318 -0
- package/dist/knowledge/skills/module-companion-exports/references/companion-exports-by-package.md +544 -0
- package/dist/knowledge/skills/module-registration/SKILL.md +212 -0
- package/dist/knowledge/skills/module-registration/references/framework-domain-modules-api.md +366 -0
- package/dist/knowledge/skills/module-registration/references/registry-files.md +9 -0
- package/dist/knowledge/skills/module-relationships/SKILL.md +523 -0
- package/dist/knowledge/skills/module-relationships/references/cross-resource-fk-checklist.md +7 -0
- package/dist/knowledge/skills/module-relationships/references/framework-resource-relationship-authoring-api.md +738 -0
- package/dist/knowledge/skills/pdf-template-authoring/SKILL.md +174 -0
- package/dist/knowledge/skills/pdf-template-authoring/references/framework-pdf-template-api.md +203 -0
- package/dist/knowledge/skills/pdf-template-authoring/references/framework-pdf-template-spec-api.md +62 -0
- package/dist/knowledge/skills/provider-frontend-file-picker/SKILL.md +239 -0
- package/dist/knowledge/skills/provider-frontend-file-picker/references/framework-file-provider-constraints-api.md +90 -0
- package/dist/knowledge/skills/provider-frontend-file-picker/references/framework-frontend-provider-module-api.md +50 -0
- package/dist/knowledge/skills/rate-limit-authoring/SKILL.md +652 -0
- package/dist/knowledge/skills/rate-limit-authoring/references/framework-rate-limit-policy-api.md +182 -0
- package/dist/knowledge/skills/rate-limit-authoring/references/scope-key-and-bucket-conventions.md +137 -0
- package/dist/knowledge/skills/resource-add-field/SKILL.md +272 -0
- package/dist/knowledge/skills/resource-add-field/examples/add-priority-field-to-todos.example.md +153 -0
- package/dist/knowledge/skills/resource-add-field/references/framework-field-cross-layer-api.md +845 -0
- package/dist/knowledge/skills/resource-add-module/SKILL.md +322 -0
- package/dist/knowledge/skills/resource-add-module/references/framework-new-module-wiring-api.md +67 -0
- package/dist/knowledge/skills/resource-add-module/references/module-scaffold-layout.md +15 -0
- package/dist/knowledge/skills/resource-add-resource/SKILL.md +222 -0
- package/dist/knowledge/skills/resource-add-resource/references/framework-new-resource-core-config-api.md +540 -0
- package/dist/knowledge/skills/resource-add-resource/references/scaffold-surfaces-checklist.md +25 -0
- package/dist/knowledge/skills/resource-config-wiring/SKILL.md +370 -0
- package/dist/knowledge/skills/resource-config-wiring/references/config-change-routing.md +11 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-personal-data-declaration-api.md +622 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-operation-scope-enums-api.md +248 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-resource-config-api.md +1769 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-system-access-reads-api.md +1209 -0
- package/dist/knowledge/skills/resource-custom-view/SKILL.md +228 -0
- package/dist/knowledge/skills/resource-custom-view/references/custom-view-contracts.md +693 -0
- package/dist/knowledge/skills/resource-external-data/SKILL.md +349 -0
- package/dist/knowledge/skills/resource-external-data/references/framework-external-data-pipeline-api.md +187 -0
- package/dist/knowledge/skills/resource-external-data/references/framework-http-api-binding-api.md +261 -0
- package/dist/knowledge/skills/resource-external-data/references/lane-selection.md +49 -0
- package/dist/knowledge/skills/resource-external-data/references/pipeline-destination-schema.md +43 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/SKILL.md +308 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/references/framework-named-mcp-servers-contract.md +166 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/references/framework-resource-mcp-exposure-contract.md +63 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/references/mcp-catalogue-withdrawal-and-verification.md +77 -0
- package/dist/knowledge/skills/resource-mcp-tool-exposure/references/mcp-client-registration-postures.md +90 -0
- package/dist/knowledge/skills/resource-rag-source-fields/SKILL.md +424 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/corpus-field-selection.md +90 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/framework-embeddings-capability-api.md +261 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/framework-file-rag-source-api.md +117 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/framework-rag-retrieval-api.md +597 -0
- package/dist/knowledge/skills/resource-rag-source-fields/references/framework-rag-source-decorator-api.md +181 -0
- package/dist/knowledge/skills/resource-schema-authoring/SKILL.md +318 -0
- package/dist/knowledge/skills/resource-schema-authoring/examples/add-enum-field-with-ui.example.md +132 -0
- package/dist/knowledge/skills/resource-schema-authoring/examples/basic-resource-schema.example.md +62 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/decorator-layer-map.md +63 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/field-type-selection.md +70 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-decorator-vocabulary-api.md +559 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-personal-data-category-api.md +245 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-polymorphic-resources-api.md +147 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-schema-family-api.md +247 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-decorator-methods-api.md +164 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-structural-params-api.md +327 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-special-factories-api.md +1286 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-zod-lifecycle-and-chainable-api.md +1080 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/polymorphic-per-scope-resources.md +75 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/schema-variants-and-discriminators.md +62 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/shared-layer-decorator-checklist.md +69 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/special-factories.md +45 -0
- package/dist/knowledge/skills/resource-ui-behavior/SKILL.md +389 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-conditional-visibility-api.md +106 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-display-edit-modes-api.md +176 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-enum-frontend-handling-api.md +103 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-foreign-key-ui-api.md +97 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-frontend-resource-ui-contracts-api.md +839 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-per-primitive-ui-api.md +461 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-primitive-ui-api.md +125 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-related-resource-embeds-api.md +245 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-resource-layout-templates-api.md +302 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/ui-layer-boundaries.md +13 -0
- package/dist/knowledge/skills/seeding-authoring/SKILL.md +569 -0
- package/dist/knowledge/skills/seeding-authoring/references/data-seeding-mode-picker.md +154 -0
- package/dist/knowledge/skills/seeding-authoring/references/framework-data-seeding-api.md +176 -0
- package/dist/knowledge/skills/seeding-operations/SKILL.md +505 -0
- package/dist/knowledge/skills/seeding-operations/references/data-seeding-admin-runbook.md +337 -0
- package/dist/knowledge/skills/seeding-operations/references/data-seeding-cron-scheduler.md +171 -0
- package/dist/knowledge/skills/seeding-operations/references/framework-data-seeding-operations-api.md +662 -0
- package/dist/knowledge/skills/settings-placement-authoring/SKILL.md +134 -0
- package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-destinations-catalog.md +65 -0
- package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-placement-api.md +127 -0
- package/dist/knowledge/skills/spec-catalog-authoring/SKILL.md +726 -0
- package/dist/knowledge/skills/spec-catalog-authoring/references/catalog-spec-pattern-overview.md +242 -0
- package/dist/knowledge/skills/spec-companion-exports/SKILL.md +362 -0
- package/dist/knowledge/skills/spec-companion-exports/references/companion-export-checklist.md +8 -0
- package/dist/knowledge/skills/spec-companion-exports/references/framework-companion-exports-contract-api.md +533 -0
- package/dist/knowledge/skills/spec-component-update/SKILL.md +315 -0
- package/dist/knowledge/skills/spec-component-update/references/component-spec-props.md +8 -0
- package/dist/knowledge/skills/spec-component-update/references/framework-frontend-component-spec-api.md +481 -0
- package/dist/knowledge/skills/spec-composite-view-update/SKILL.md +283 -0
- package/dist/knowledge/skills/spec-composite-view-update/references/composite-spec-sections.md +5 -0
- package/dist/knowledge/skills/spec-composite-view-update/references/framework-composite-view-specification-api.md +51 -0
- package/dist/knowledge/skills/spec-family-update/SKILL.md +300 -0
- package/dist/knowledge/skills/spec-family-update/references/family-spec-routing.md +13 -0
- package/dist/knowledge/skills/spec-family-update/references/framework-error-message-specifications-api.md +108 -0
- package/dist/knowledge/skills/spec-family-update/references/framework-family-specifications-api.md +111 -0
- package/dist/knowledge/skills/spec-feature-update/SKILL.md +306 -0
- package/dist/knowledge/skills/spec-feature-update/references/feature-spec-scope.md +5 -0
- package/dist/knowledge/skills/spec-feature-update/references/framework-feature-specification-api.md +95 -0
- package/dist/knowledge/skills/spec-resource-update/SKILL.md +220 -0
- package/dist/knowledge/skills/spec-resource-update/references/framework-field-spec-params-api.md +319 -0
- package/dist/knowledge/skills/spec-resource-update/references/framework-spec-resource-contracts-api.md +2610 -0
- package/dist/knowledge/skills/spec-resource-update/references/resource-spec-field-routing.md +12 -0
- package/dist/knowledge/skills/spec-update-after-change/SKILL.md +195 -0
- package/dist/knowledge/skills/spec-update-after-change/references/framework-spec-factory-api.md +173 -0
- package/dist/knowledge/skills/spec-update-after-change/references/spec-maintenance-by-surface.md +33 -0
- package/dist/knowledge/skills/spec-update-after-change/references/surface-to-spec-routing.md +14 -0
- package/dist/knowledge/skills/views-add-composite-view/SKILL.md +259 -0
- package/dist/knowledge/skills/views-add-composite-view/references/composite-view-routing.md +10 -0
- package/dist/knowledge/skills/views-add-composite-view/references/framework-inserted-view-identity-api.md +151 -0
- package/dist/knowledge/skills/views-add-custom-view/SKILL.md +225 -0
- package/dist/knowledge/skills/views-add-custom-view/references/custom-view-routing.md +10 -0
- package/dist/knowledge/skills/views-add-custom-view/references/framework-view-scope-and-full-custom-api.md +107 -0
- package/dist/knowledge/skills/views-app-level/SKILL.md +201 -0
- package/dist/knowledge/skills/views-app-level/references/app-level-views-routing.md +9 -0
- package/dist/knowledge/skills/views-app-level/references/framework-view-scope-and-full-custom-api.md +107 -0
- package/dist/knowledge/skills/views-chart-authoring/SKILL.md +264 -0
- package/dist/knowledge/skills/views-chart-authoring/references/chart-view-checklist.md +7 -0
- package/dist/knowledge/skills/views-chart-authoring/references/framework-chart-view-contracts-api.md +82 -0
- package/dist/knowledge/skills/views-chart-authoring/references/framework-inserted-view-identity-api.md +152 -0
- package/dist/knowledge/skills/views-composite-authoring/SKILL.md +302 -0
- package/dist/knowledge/skills/views-composite-authoring/references/composite-embedding-checklist.md +23 -0
- package/dist/knowledge/skills/views-composite-authoring/references/framework-composite-view-contracts-api.md +133 -0
- package/dist/knowledge/skills/views-composite-authoring/references/framework-inserted-view-identity-api.md +152 -0
- package/dist/knowledge/skills/views-execution-authoring/SKILL.md +209 -0
- package/dist/knowledge/skills/views-execution-authoring/references/execution-view-checklist.md +7 -0
- package/dist/knowledge/skills/views-execution-authoring/references/framework-execution-view-contracts-api.md +389 -0
- package/dist/knowledge/skills/views-execution-authoring/references/framework-inserted-view-identity-api.md +152 -0
- package/dist/knowledge/skills/website-anonymous-session/SKILL.md +444 -0
- package/dist/knowledge/skills/website-blog-authoring/SKILL.md +587 -0
- package/dist/knowledge/skills/website-blog-authoring/references/blog-adapter-api.md +1426 -0
- package/dist/knowledge/skills/website-bundle-discipline/SKILL.md +553 -0
- package/dist/knowledge/skills/website-bundle-discipline/references/example-website-button-override.md +52 -0
- package/dist/knowledge/skills/website-bundle-discipline/references/website-bundle-rules.md +357 -0
- package/dist/knowledge/skills/website-consent-gate-overrides/SKILL.md +511 -0
- package/dist/knowledge/skills/website-factory-advanced/SKILL.md +376 -0
- package/dist/knowledge/skills/website-inbound-contact-forms/SKILL.md +304 -0
- package/dist/knowledge/skills/website-label-pack/SKILL.md +390 -0
- package/dist/knowledge/skills/website-layout-overrides/SKILL.md +461 -0
- package/dist/knowledge/skills/website-marketing-metadata-extension/SKILL.md +264 -0
- package/dist/knowledge/skills/website-navigation-authoring/SKILL.md +414 -0
- package/dist/knowledge/skills/website-navigation-authoring/references/worked-examples-header-footer.md +366 -0
- package/dist/knowledge/skills/website-page-authoring/SKILL.md +420 -0
- package/dist/knowledge/skills/website-page-variants/SKILL.md +256 -0
- package/dist/knowledge/skills/website-primitive-overrides/SKILL.md +302 -0
- package/dist/knowledge/skills/website-section-contact/SKILL.md +950 -0
- package/dist/knowledge/skills/website-section-contact/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-cta/SKILL.md +822 -0
- package/dist/knowledge/skills/website-section-cta/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-faq/SKILL.md +917 -0
- package/dist/knowledge/skills/website-section-faq/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-feature-benefit-summary/SKILL.md +878 -0
- package/dist/knowledge/skills/website-section-feature-benefit-summary/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-feature-detail/SKILL.md +895 -0
- package/dist/knowledge/skills/website-section-feature-detail/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-footer-cta/SKILL.md +814 -0
- package/dist/knowledge/skills/website-section-footer-cta/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-hero/SKILL.md +944 -0
- package/dist/knowledge/skills/website-section-hero/references/define-website-section-api.md +583 -0
- package/dist/knowledge/skills/website-section-pricing/SKILL.md +934 -0
- package/dist/knowledge/skills/website-section-pricing/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-section-social-proof/SKILL.md +912 -0
- package/dist/knowledge/skills/website-section-social-proof/references/define-website-section-api.md +579 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/SKILL.md +624 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/references/aeo-api.md +633 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/references/geo-api.md +193 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/references/seo-api.md +790 -0
- package/dist/knowledge/topic-index.json +17510 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,1210 @@
|
|
|
1
|
+
# Assurance document-blueprint contract
|
|
2
|
+
|
|
3
|
+
The engine owns the source-neutral document catalog and its blueprints. Applications contribute
|
|
4
|
+
declared facts and explicit decisions; they do not copy blueprint definitions into application
|
|
5
|
+
specifications. A blueprint says what a document must **address** — it is not legal prose, and
|
|
6
|
+
rendering its clause purposes verbatim ships framework text as your operator's legal position.
|
|
7
|
+
|
|
8
|
+
**You do not author a catalog, and the one you read is `schemaVersion: 2` / `catalogVersion: 5`.**
|
|
9
|
+
Measured 2026-08-30 from the engine's only catalog. Its schema says newly authored catalogs use v3 /
|
|
10
|
+
`catalogVersion` 6 and that v1/v2 are retained parse-only — so the engine has not yet moved its own
|
|
11
|
+
catalog to the version its schema calls current, and both facts are worth knowing before you conclude
|
|
12
|
+
that what you are reading is out of date. It is what the engine ships.
|
|
13
|
+
|
|
14
|
+
What this page said until 2026-08-30 was "new authoring uses `schemaVersion: 2`", stated as YOUR
|
|
15
|
+
instruction. That was wrong twice over: it named a version the schema had already retired, and it
|
|
16
|
+
addressed an authoring act an application never performs.
|
|
17
|
+
|
|
18
|
+
A catalog declares at least one blueprint, and there is **exactly one blueprint for every
|
|
19
|
+
definition** — the pairing is refined fail-closed, in both directions. The shipped catalog carries six
|
|
20
|
+
of each: four governance documents (document-record control, programme handbook, roles and
|
|
21
|
+
responsibilities, scope and system description) and two public ones (privacy notice, service terms).
|
|
22
|
+
|
|
23
|
+
From `catalogVersion` 5 onward each qualified-review policy binds reviewer qualifications to the exact
|
|
24
|
+
review kind rather than carrying one flat policy; the retained versions must keep the historical flat
|
|
25
|
+
shape, so the two are not interchangeable. `catalogVersion` 6 additionally requires
|
|
26
|
+
`structuredValueContracts`, each selected by exactly one annex binding — which is why moving the
|
|
27
|
+
shipped catalog forward is authoring work rather than a version bump.
|
|
28
|
+
|
|
29
|
+
Questions declare answer type, fact authority, sensitivity, not-applicable posture and semantic
|
|
30
|
+
options. Sections own visible order. Clauses own drafting purpose, fact variables, monitored source
|
|
31
|
+
policies, claim guards and optional declarative inclusion conditions. Conditions inside a group are
|
|
32
|
+
ANDed and groups are ORed; no executable expression is accepted. A REQUIRED clause carries no
|
|
33
|
+
condition groups. Review checklists cover every review kind the definition's review policies select.
|
|
34
|
+
|
|
35
|
+
The contract contains drafting structure, not jurisdiction-specific legal prose, an application fact,
|
|
36
|
+
an approval decision, a publication release or an interaction receipt.
|
|
37
|
+
|
|
38
|
+
## Nothing here is sealed, and nothing needs verifying before you author
|
|
39
|
+
|
|
40
|
+
An earlier version of this page said the engine owned "sealed blueprints", that a blueprint and its
|
|
41
|
+
catalog carried "independent canonical digests", and that "both must verify before authoring."
|
|
42
|
+
|
|
43
|
+
No such digests exist. They went with the rest of the digest machinery, and the engine source records
|
|
44
|
+
why beside the identities that used to carry them: a digest chain cannot merge, so two branches that
|
|
45
|
+
change different blueprints produce a merged catalog whose digests belong to neither — while git
|
|
46
|
+
already carries exactly the history the digests were imitating.
|
|
47
|
+
|
|
48
|
+
The instruction mattered more than the mechanism did. It told a drafting agent to perform a
|
|
49
|
+
verification step that has no implementation, before doing the work it was actually asked for. There
|
|
50
|
+
is nothing to verify: read the catalog, answer its questions from declared facts, and let the diff be
|
|
51
|
+
the evidence.
|
|
52
|
+
|
|
53
|
+
The complete source-neutral contract is:
|
|
54
|
+
|
|
55
|
+
## Import Origins
|
|
56
|
+
|
|
57
|
+
- `@wildo-ai/saas-specifications`
|
|
58
|
+
|
|
59
|
+
## Source Excerpts
|
|
60
|
+
|
|
61
|
+
### Origin Package: `@wildo-ai/saas-specifications`
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
*
|
|
65
|
+
* Blueprint input kinds are deliberately semantic rather than UI-shaped. A creation host may render these as any suitable
|
|
66
|
+
* control, but it must preserve the answer type and the authority boundary declared by the question.
|
|
67
|
+
*/
|
|
68
|
+
export enum AssuranceDocumentQuestionAnswerKind {
|
|
69
|
+
BOOLEAN = "BOOLEAN",
|
|
70
|
+
DATE = "DATE",
|
|
71
|
+
ENTITY_REF_LIST = "ENTITY_REF_LIST",
|
|
72
|
+
JURISDICTION_REF_LIST = "JURISDICTION_REF_LIST",
|
|
73
|
+
SEMANTIC_MULTI_SELECT = "SEMANTIC_MULTI_SELECT",
|
|
74
|
+
SEMANTIC_SINGLE_SELECT = "SEMANTIC_SINGLE_SELECT",
|
|
75
|
+
STRUCTURED_VALUE = "STRUCTURED_VALUE",
|
|
76
|
+
TEXT = "TEXT",
|
|
77
|
+
URL = "URL",
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export enum AssuranceDocumentFactAuthorityKind {
|
|
81
|
+
APPLICATION_SPECIFICATION = "APPLICATION_SPECIFICATION",
|
|
82
|
+
CREATOR_DECISION = "CREATOR_DECISION",
|
|
83
|
+
QUALIFIED_REVIEW = "QUALIFIED_REVIEW",
|
|
84
|
+
RUNTIME_EVIDENCE = "RUNTIME_EVIDENCE",
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export enum AssuranceDocumentClauseInclusionKind {
|
|
88
|
+
CONDITIONAL = "CONDITIONAL",
|
|
89
|
+
REQUIRED = "REQUIRED",
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export enum AssuranceDocumentConditionOperator {
|
|
93
|
+
FACT_CONTAINS_SEMANTIC_OPTION = "FACT_CONTAINS_SEMANTIC_OPTION",
|
|
94
|
+
FACT_EQUALS_SEMANTIC_OPTION = "FACT_EQUALS_SEMANTIC_OPTION",
|
|
95
|
+
FACT_FALSE = "FACT_FALSE",
|
|
96
|
+
FACT_KNOWN = "FACT_KNOWN",
|
|
97
|
+
FACT_TRUE = "FACT_TRUE",
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export enum AssuranceDocumentClaimGuardFailureDisposition {
|
|
101
|
+
BLOCK_CANDIDATE = "BLOCK_CANDIDATE",
|
|
102
|
+
REQUIRE_QUALIFIED_REVIEW = "REQUIRE_QUALIFIED_REVIEW",
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export enum AssuranceDocumentReviewChecklistSubjectKind {
|
|
106
|
+
BLUEPRINT = "BLUEPRINT",
|
|
107
|
+
CLAIM_GUARD = "CLAIM_GUARD",
|
|
108
|
+
CLAUSE = "CLAUSE",
|
|
109
|
+
SECTION = "SECTION",
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Cardinality of one blueprint-declared candidate variant axis. */
|
|
113
|
+
export enum AssuranceDocumentVariantSelectionCardinality {
|
|
114
|
+
EXACTLY_ONE = "EXACTLY_ONE",
|
|
115
|
+
ONE_OR_MORE = "ONE_OR_MORE",
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export const AssuranceDocumentBlueprintVariantOptionSchema = z
|
|
119
|
+
.strictObject({
|
|
120
|
+
optionRef: AssuranceNamespacedRefSchema,
|
|
121
|
+
creatorMeaning: z.string().trim().min(1),
|
|
122
|
+
supportingFactRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
123
|
+
})
|
|
124
|
+
.superRefine((option, context) => {
|
|
125
|
+
addUniqueSortedIssue(option.supportingFactRefs, context, ["supportingFactRefs"], "supportingFactRefs");
|
|
126
|
+
});
|
|
127
|
+
export type AssuranceDocumentBlueprintVariantOption = z.infer<typeof AssuranceDocumentBlueprintVariantOptionSchema>;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* A source-neutral variant choice the candidate author must make from resolved
|
|
131
|
+
* facts. The axis supplies no prose and cannot infer its own selection.
|
|
132
|
+
*/
|
|
133
|
+
export const AssuranceDocumentBlueprintVariantAxisSchema = z
|
|
134
|
+
.strictObject({
|
|
135
|
+
axisRef: AssuranceNamespacedRefSchema,
|
|
136
|
+
axisVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
137
|
+
selectionCardinality: z.enum(AssuranceDocumentVariantSelectionCardinality),
|
|
138
|
+
creatorPrompt: z.string().trim().min(1),
|
|
139
|
+
options: z.array(AssuranceDocumentBlueprintVariantOptionSchema).min(2),
|
|
140
|
+
})
|
|
141
|
+
.superRefine((axis, context) => {
|
|
142
|
+
addUniqueSortedIssue(
|
|
143
|
+
axis.options.map((option) => option.optionRef),
|
|
144
|
+
context,
|
|
145
|
+
["options"],
|
|
146
|
+
"variant option references",
|
|
147
|
+
);
|
|
148
|
+
});
|
|
149
|
+
export type AssuranceDocumentBlueprintVariantAxis = z.infer<typeof AssuranceDocumentBlueprintVariantAxisSchema>;
|
|
150
|
+
|
|
151
|
+
export const AssuranceDocumentSemanticOptionSchema = z.strictObject({
|
|
152
|
+
optionRef: AssuranceNamespacedRefSchema,
|
|
153
|
+
creatorMeaning: z.string().trim().min(1),
|
|
154
|
+
});
|
|
155
|
+
export type AssuranceDocumentSemanticOption = z.infer<typeof AssuranceDocumentSemanticOptionSchema>;
|
|
156
|
+
|
|
157
|
+
/** Retained question contract used only by catalog v2 blueprints. */
|
|
158
|
+
export const AssuranceDocumentBlueprintQuestionV1Schema = z
|
|
159
|
+
.strictObject({
|
|
160
|
+
questionRef: AssuranceNamespacedRefSchema,
|
|
161
|
+
questionVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
162
|
+
factRef: AssuranceNamespacedRefSchema,
|
|
163
|
+
creatorPrompt: z.string().trim().min(1),
|
|
164
|
+
decisionPurpose: z.string().trim().min(1),
|
|
165
|
+
answerKind: z.enum([
|
|
166
|
+
AssuranceDocumentQuestionAnswerKind.BOOLEAN,
|
|
167
|
+
AssuranceDocumentQuestionAnswerKind.DATE,
|
|
168
|
+
AssuranceDocumentQuestionAnswerKind.ENTITY_REF_LIST,
|
|
169
|
+
AssuranceDocumentQuestionAnswerKind.JURISDICTION_REF_LIST,
|
|
170
|
+
AssuranceDocumentQuestionAnswerKind.SEMANTIC_MULTI_SELECT,
|
|
171
|
+
AssuranceDocumentQuestionAnswerKind.SEMANTIC_SINGLE_SELECT,
|
|
172
|
+
AssuranceDocumentQuestionAnswerKind.TEXT,
|
|
173
|
+
AssuranceDocumentQuestionAnswerKind.URL,
|
|
174
|
+
]),
|
|
175
|
+
factAuthorityKind: z.enum(AssuranceDocumentFactAuthorityKind),
|
|
176
|
+
sensitivityRef: AssuranceNamespacedRefSchema,
|
|
177
|
+
allowsNotApplicable: z.boolean(),
|
|
178
|
+
semanticOptions: z.array(AssuranceDocumentSemanticOptionSchema),
|
|
179
|
+
})
|
|
180
|
+
.superRefine((question, context) => {
|
|
181
|
+
addUniqueSortedIssue(
|
|
182
|
+
question.semanticOptions.map((option) => option.optionRef),
|
|
183
|
+
context,
|
|
184
|
+
["semanticOptions"],
|
|
185
|
+
"semantic option references",
|
|
186
|
+
);
|
|
187
|
+
const usesSemanticOptions =
|
|
188
|
+
question.answerKind === AssuranceDocumentQuestionAnswerKind.SEMANTIC_SINGLE_SELECT ||
|
|
189
|
+
question.answerKind === AssuranceDocumentQuestionAnswerKind.SEMANTIC_MULTI_SELECT;
|
|
190
|
+
if (usesSemanticOptions && question.semanticOptions.length === 0) {
|
|
191
|
+
context.addIssue({ code: "custom", message: "semantic-select questions require semanticOptions", path: ["semanticOptions"] });
|
|
192
|
+
}
|
|
193
|
+
if (!usesSemanticOptions && question.semanticOptions.length > 0) {
|
|
194
|
+
context.addIssue({ code: "custom", message: "only semantic-select questions may declare semanticOptions", path: ["semanticOptions"] });
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
const AssuranceDocumentBlueprintQuestionV2CommonSchema = z.strictObject({
|
|
199
|
+
schemaVersion: z.literal(2),
|
|
200
|
+
questionRef: AssuranceNamespacedRefSchema,
|
|
201
|
+
questionVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
202
|
+
factRef: AssuranceNamespacedRefSchema,
|
|
203
|
+
creatorPrompt: z.string().trim().min(1),
|
|
204
|
+
decisionPurpose: z.string().trim().min(1),
|
|
205
|
+
factAuthorityKind: z.enum(AssuranceDocumentFactAuthorityKind),
|
|
206
|
+
sensitivityRef: AssuranceNamespacedRefSchema,
|
|
207
|
+
allowsNotApplicable: z.boolean(),
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
const AssuranceDocumentBlueprintQuestionV2ScalarSchema = AssuranceDocumentBlueprintQuestionV2CommonSchema.extend({
|
|
211
|
+
answerKind: z.enum([
|
|
212
|
+
AssuranceDocumentQuestionAnswerKind.BOOLEAN,
|
|
213
|
+
AssuranceDocumentQuestionAnswerKind.DATE,
|
|
214
|
+
AssuranceDocumentQuestionAnswerKind.ENTITY_REF_LIST,
|
|
215
|
+
AssuranceDocumentQuestionAnswerKind.JURISDICTION_REF_LIST,
|
|
216
|
+
AssuranceDocumentQuestionAnswerKind.TEXT,
|
|
217
|
+
AssuranceDocumentQuestionAnswerKind.URL,
|
|
218
|
+
]),
|
|
219
|
+
semanticOptions: z.tuple([]),
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
const AssuranceDocumentBlueprintQuestionV2SemanticSchema = AssuranceDocumentBlueprintQuestionV2CommonSchema.extend({
|
|
223
|
+
answerKind: z.enum([AssuranceDocumentQuestionAnswerKind.SEMANTIC_MULTI_SELECT, AssuranceDocumentQuestionAnswerKind.SEMANTIC_SINGLE_SELECT]),
|
|
224
|
+
semanticOptions: z.array(AssuranceDocumentSemanticOptionSchema).min(1),
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
export const AssuranceDocumentStructuredValueContractIdentitySchema = z.strictObject({
|
|
228
|
+
contractRef: AssuranceNamespacedRefSchema,
|
|
229
|
+
contractVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
230
|
+
});
|
|
231
|
+
export type AssuranceDocumentStructuredValueContractIdentity = z.infer<typeof AssuranceDocumentStructuredValueContractIdentitySchema>;
|
|
232
|
+
|
|
233
|
+
const AssuranceDocumentBlueprintQuestionV2StructuredSchema = AssuranceDocumentBlueprintQuestionV2CommonSchema.extend({
|
|
234
|
+
answerKind: z.literal(AssuranceDocumentQuestionAnswerKind.STRUCTURED_VALUE),
|
|
235
|
+
semanticOptions: z.tuple([]),
|
|
236
|
+
structuredValueContract: AssuranceDocumentStructuredValueContractIdentitySchema,
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Current blueprint question. Its discriminated shape makes it impossible for scalar questions to smuggle a structured contract or for structured questions to
|
|
241
|
+
* fall back to an untyped JSON value.
|
|
242
|
+
*/
|
|
243
|
+
export const AssuranceDocumentBlueprintQuestionV2Schema = z
|
|
244
|
+
.discriminatedUnion("answerKind", [
|
|
245
|
+
AssuranceDocumentBlueprintQuestionV2ScalarSchema,
|
|
246
|
+
AssuranceDocumentBlueprintQuestionV2SemanticSchema,
|
|
247
|
+
AssuranceDocumentBlueprintQuestionV2StructuredSchema,
|
|
248
|
+
])
|
|
249
|
+
.superRefine((question, context) => {
|
|
250
|
+
if (
|
|
251
|
+
!valuesAreUnique(question.semanticOptions.map((option) => option.optionRef)) ||
|
|
252
|
+
!valuesAreLexicallySorted(question.semanticOptions.map((option) => option.optionRef))
|
|
253
|
+
) {
|
|
254
|
+
context.addIssue({ code: "custom", message: "semantic option references must be unique and lexically sorted", path: ["semanticOptions"] });
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
export const AssuranceDocumentBlueprintQuestionSchema = z.union([AssuranceDocumentBlueprintQuestionV1Schema, AssuranceDocumentBlueprintQuestionV2Schema]);
|
|
259
|
+
export type AssuranceDocumentBlueprintQuestion = z.infer<typeof AssuranceDocumentBlueprintQuestionSchema>;
|
|
260
|
+
|
|
261
|
+
const AssuranceDocumentFactConditionCommonSchema = z.strictObject({ factRef: AssuranceNamespacedRefSchema });
|
|
262
|
+
export const AssuranceDocumentFactConditionSchema = z.discriminatedUnion("operator", [
|
|
263
|
+
AssuranceDocumentFactConditionCommonSchema.extend({ operator: z.literal(AssuranceDocumentConditionOperator.FACT_KNOWN) }),
|
|
264
|
+
AssuranceDocumentFactConditionCommonSchema.extend({ operator: z.literal(AssuranceDocumentConditionOperator.FACT_TRUE) }),
|
|
265
|
+
AssuranceDocumentFactConditionCommonSchema.extend({ operator: z.literal(AssuranceDocumentConditionOperator.FACT_FALSE) }),
|
|
266
|
+
AssuranceDocumentFactConditionCommonSchema.extend({
|
|
267
|
+
operator: z.literal(AssuranceDocumentConditionOperator.FACT_EQUALS_SEMANTIC_OPTION),
|
|
268
|
+
semanticOptionRef: AssuranceNamespacedRefSchema,
|
|
269
|
+
}),
|
|
270
|
+
AssuranceDocumentFactConditionCommonSchema.extend({
|
|
271
|
+
operator: z.literal(AssuranceDocumentConditionOperator.FACT_CONTAINS_SEMANTIC_OPTION),
|
|
272
|
+
semanticOptionRef: AssuranceNamespacedRefSchema,
|
|
273
|
+
}),
|
|
274
|
+
]);
|
|
275
|
+
export type AssuranceDocumentFactCondition = z.infer<typeof AssuranceDocumentFactConditionSchema>;
|
|
276
|
+
|
|
277
|
+
/** Conditions inside one group are ANDed; groups are ORed. No executable expression is accepted. */
|
|
278
|
+
export const AssuranceDocumentConditionGroupSchema = z
|
|
279
|
+
.strictObject({
|
|
280
|
+
conditionGroupRef: AssuranceNamespacedRefSchema,
|
|
281
|
+
conditions: z.array(AssuranceDocumentFactConditionSchema).min(1),
|
|
282
|
+
})
|
|
283
|
+
.superRefine((group, context) => {
|
|
284
|
+
const conditionKeys = group.conditions.map((condition) =>
|
|
285
|
+
"semanticOptionRef" in condition
|
|
286
|
+
? `${condition.factRef}\0${condition.operator}\0${condition.semanticOptionRef}`
|
|
287
|
+
: `${condition.factRef}\0${condition.operator}`,
|
|
288
|
+
);
|
|
289
|
+
if (!valuesAreUnique(conditionKeys)) {
|
|
290
|
+
context.addIssue({ code: "custom", message: "condition groups cannot repeat an identical condition", path: ["conditions"] });
|
|
291
|
+
}
|
|
292
|
+
const operatorsByFactRef = new Map<string, Set<AssuranceDocumentConditionOperator>>();
|
|
293
|
+
const equalityOptionsByFactRef = new Map<string, Set<string>>();
|
|
294
|
+
group.conditions.forEach((condition) => {
|
|
295
|
+
const operators = operatorsByFactRef.get(condition.factRef) ?? new Set<AssuranceDocumentConditionOperator>();
|
|
296
|
+
operators.add(condition.operator);
|
|
297
|
+
operatorsByFactRef.set(condition.factRef, operators);
|
|
298
|
+
if (condition.operator === AssuranceDocumentConditionOperator.FACT_EQUALS_SEMANTIC_OPTION) {
|
|
299
|
+
const options = equalityOptionsByFactRef.get(condition.factRef) ?? new Set<string>();
|
|
300
|
+
options.add(condition.semanticOptionRef);
|
|
301
|
+
equalityOptionsByFactRef.set(condition.factRef, options);
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
operatorsByFactRef.forEach((operators, factRef) => {
|
|
305
|
+
if (operators.has(AssuranceDocumentConditionOperator.FACT_TRUE) && operators.has(AssuranceDocumentConditionOperator.FACT_FALSE)) {
|
|
306
|
+
context.addIssue({ code: "custom", message: `condition group contradicts itself for boolean fact ${factRef}`, path: ["conditions"] });
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
equalityOptionsByFactRef.forEach((options, factRef) => {
|
|
310
|
+
if (options.size > 1) {
|
|
311
|
+
context.addIssue({ code: "custom", message: `condition group requires mutually exclusive semantic options for fact ${factRef}`, path: ["conditions"] });
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
export type AssuranceDocumentConditionGroup = z.infer<typeof AssuranceDocumentConditionGroupSchema>;
|
|
316
|
+
|
|
317
|
+
export const AssuranceDocumentClauseVariableSchema = z.strictObject({
|
|
318
|
+
variableRef: AssuranceNamespacedRefSchema,
|
|
319
|
+
factRef: AssuranceNamespacedRefSchema,
|
|
320
|
+
});
|
|
321
|
+
export type AssuranceDocumentClauseVariable = z.infer<typeof AssuranceDocumentClauseVariableSchema>;
|
|
322
|
+
|
|
323
|
+
export const AssuranceDocumentBlueprintClauseSchema = z
|
|
324
|
+
.strictObject({
|
|
325
|
+
clauseRef: AssuranceNamespacedRefSchema,
|
|
326
|
+
clauseVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
327
|
+
sectionRef: AssuranceNamespacedRefSchema,
|
|
328
|
+
inclusionKind: z.enum(AssuranceDocumentClauseInclusionKind),
|
|
329
|
+
draftingPurpose: z.string().trim().min(1),
|
|
330
|
+
requiredFactRefs: z.array(AssuranceNamespacedRefSchema),
|
|
331
|
+
variables: z.array(AssuranceDocumentClauseVariableSchema),
|
|
332
|
+
sourcePolicyRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
333
|
+
claimGuardRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
334
|
+
conditionGroups: z.array(AssuranceDocumentConditionGroupSchema),
|
|
335
|
+
})
|
|
336
|
+
.superRefine((clause, context) => {
|
|
337
|
+
addUniqueSortedIssue(clause.requiredFactRefs, context, ["requiredFactRefs"], "requiredFactRefs");
|
|
338
|
+
addUniqueSortedIssue(
|
|
339
|
+
clause.variables.map((variable) => variable.variableRef),
|
|
340
|
+
context,
|
|
341
|
+
["variables"],
|
|
342
|
+
"variable references",
|
|
343
|
+
);
|
|
344
|
+
addUniqueSortedIssue(clause.sourcePolicyRefs, context, ["sourcePolicyRefs"], "sourcePolicyRefs");
|
|
345
|
+
addUniqueSortedIssue(clause.claimGuardRefs, context, ["claimGuardRefs"], "claimGuardRefs");
|
|
346
|
+
addUniqueSortedIssue(
|
|
347
|
+
clause.conditionGroups.map((group) => group.conditionGroupRef),
|
|
348
|
+
context,
|
|
349
|
+
["conditionGroups"],
|
|
350
|
+
"condition group references",
|
|
351
|
+
);
|
|
352
|
+
if (clause.inclusionKind === AssuranceDocumentClauseInclusionKind.REQUIRED && clause.conditionGroups.length > 0) {
|
|
353
|
+
context.addIssue({ code: "custom", message: "required clauses cannot declare inclusion conditions", path: ["conditionGroups"] });
|
|
354
|
+
}
|
|
355
|
+
if (clause.inclusionKind === AssuranceDocumentClauseInclusionKind.CONDITIONAL && clause.conditionGroups.length === 0) {
|
|
356
|
+
context.addIssue({ code: "custom", message: "conditional clauses require at least one condition group", path: ["conditionGroups"] });
|
|
357
|
+
}
|
|
358
|
+
const variableFactRefs = clause.variables.map((variable) => variable.factRef).sort(compareCanonicalText);
|
|
359
|
+
const requiredFactRefs = [...clause.requiredFactRefs].sort(compareCanonicalText);
|
|
360
|
+
if (!valuesAreUnique(variableFactRefs) || JSON.stringify(variableFactRefs) !== JSON.stringify(requiredFactRefs)) {
|
|
361
|
+
context.addIssue({ code: "custom", message: "clause variables must cover every required fact exactly once", path: ["variables"] });
|
|
362
|
+
}
|
|
363
|
+
clause.conditionGroups.forEach((group, groupIndex) => {
|
|
364
|
+
group.conditions.forEach((condition, conditionIndex) => {
|
|
365
|
+
if (!clause.requiredFactRefs.includes(condition.factRef)) {
|
|
366
|
+
context.addIssue({
|
|
367
|
+
code: "custom",
|
|
368
|
+
message: `condition fact ${condition.factRef} must be declared in requiredFactRefs`,
|
|
369
|
+
path: ["conditionGroups", groupIndex, "conditions", conditionIndex, "factRef"],
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
});
|
|
373
|
+
});
|
|
374
|
+
});
|
|
375
|
+
export type AssuranceDocumentBlueprintClause = z.infer<typeof AssuranceDocumentBlueprintClauseSchema>;
|
|
376
|
+
|
|
377
|
+
export const AssuranceDocumentBlueprintSectionSchema = z.strictObject({
|
|
378
|
+
sectionRef: AssuranceNamespacedRefSchema,
|
|
379
|
+
sectionVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
380
|
+
order: GovernedDocumentPositiveSafeIntegerSchema,
|
|
381
|
+
draftingPurpose: z.string().trim().min(1),
|
|
382
|
+
requiredFactRefs: z.array(AssuranceNamespacedRefSchema),
|
|
383
|
+
clauseRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
384
|
+
});
|
|
385
|
+
export type AssuranceDocumentBlueprintSection = z.infer<typeof AssuranceDocumentBlueprintSectionSchema>;
|
|
386
|
+
|
|
387
|
+
export const AssuranceDocumentClaimGuardSchema = z
|
|
388
|
+
.strictObject({
|
|
389
|
+
guardRef: AssuranceNamespacedRefSchema,
|
|
390
|
+
guardVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
391
|
+
claimPolicyRef: AssuranceNamespacedRefSchema,
|
|
392
|
+
prohibitedClaims: z.array(z.enum(AssuranceDocumentClaimProhibition)).min(1),
|
|
393
|
+
requiredFactRefs: z.array(AssuranceNamespacedRefSchema),
|
|
394
|
+
requiredEvidenceRefs: z.array(AssuranceNamespacedRefSchema),
|
|
395
|
+
requiredAuthorityRefs: z.array(AssuranceNamespacedRefSchema),
|
|
396
|
+
failureDisposition: z.enum(AssuranceDocumentClaimGuardFailureDisposition),
|
|
397
|
+
reviewerInstruction: z.string().trim().min(1),
|
|
398
|
+
})
|
|
399
|
+
.superRefine((guard, context) => {
|
|
400
|
+
addUniqueSortedIssue(guard.prohibitedClaims, context, ["prohibitedClaims"], "prohibitedClaims");
|
|
401
|
+
addUniqueSortedIssue(guard.requiredFactRefs, context, ["requiredFactRefs"], "requiredFactRefs");
|
|
402
|
+
addUniqueSortedIssue(guard.requiredEvidenceRefs, context, ["requiredEvidenceRefs"], "requiredEvidenceRefs");
|
|
403
|
+
addUniqueSortedIssue(guard.requiredAuthorityRefs, context, ["requiredAuthorityRefs"], "requiredAuthorityRefs");
|
|
404
|
+
if (guard.failureDisposition === AssuranceDocumentClaimGuardFailureDisposition.REQUIRE_QUALIFIED_REVIEW && guard.requiredAuthorityRefs.length === 0) {
|
|
405
|
+
context.addIssue({ code: "custom", message: "qualified-review claim guards require at least one authority ref", path: ["requiredAuthorityRefs"] });
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
export type AssuranceDocumentClaimGuard = z.infer<typeof AssuranceDocumentClaimGuardSchema>;
|
|
409
|
+
|
|
410
|
+
export const AssuranceDocumentReviewChecklistItemSchema = z.strictObject({
|
|
411
|
+
itemRef: AssuranceNamespacedRefSchema,
|
|
412
|
+
order: GovernedDocumentPositiveSafeIntegerSchema,
|
|
413
|
+
subjectKind: z.enum(AssuranceDocumentReviewChecklistSubjectKind),
|
|
414
|
+
subjectRef: AssuranceNamespacedRefSchema,
|
|
415
|
+
reviewPrompt: z.string().trim().min(1),
|
|
416
|
+
blocksApproval: z.boolean(),
|
|
417
|
+
});
|
|
418
|
+
export type AssuranceDocumentReviewChecklistItem = z.infer<typeof AssuranceDocumentReviewChecklistItemSchema>;
|
|
419
|
+
|
|
420
|
+
export const AssuranceDocumentReviewChecklistSchema = z
|
|
421
|
+
.strictObject({
|
|
422
|
+
checklistRef: AssuranceNamespacedRefSchema,
|
|
423
|
+
checklistVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
424
|
+
reviewPolicyRef: AssuranceNamespacedRefSchema,
|
|
425
|
+
reviewKind: z.enum(GovernedDocumentReviewKind),
|
|
426
|
+
items: z.array(AssuranceDocumentReviewChecklistItemSchema).min(1),
|
|
427
|
+
})
|
|
428
|
+
.superRefine((checklist, context) => {
|
|
429
|
+
addUniqueSortedIssue(
|
|
430
|
+
checklist.items.map((item) => item.itemRef),
|
|
431
|
+
context,
|
|
432
|
+
["items"],
|
|
433
|
+
"review checklist item references",
|
|
434
|
+
);
|
|
435
|
+
checklist.items.forEach((item, index) => {
|
|
436
|
+
if (item.order !== index + 1) {
|
|
437
|
+
context.addIssue({ code: "custom", message: "review checklist item order must be contiguous and match array order", path: ["items", index, "order"] });
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
});
|
|
441
|
+
export type AssuranceDocumentReviewChecklist = z.infer<typeof AssuranceDocumentReviewChecklistSchema>;
|
|
442
|
+
|
|
443
|
+
const AssuranceDocumentBlueprintIdentitySchema = z.strictObject({
|
|
444
|
+
blueprintRef: AssuranceNamespacedRefSchema,
|
|
445
|
+
blueprintVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
446
|
+
});
|
|
447
|
+
|
|
448
|
+
/*
|
|
449
|
+
* The structured-annex identities, re-declared HERE without their digests (2026-08-28).
|
|
450
|
+
*
|
|
451
|
+
* They came from `@wildo-ai/saas-models` and each carried a third member — a
|
|
452
|
+
* `valueSchemaDigest` / `implementationDigest` sealing the identity to exact bytes. Those went with
|
|
453
|
+
* the rest of the digest machinery (`.claude/rules/one-source-of-truth.md`, Rule 0); a ref and a
|
|
454
|
+
* version identify a contract perfectly well, and what changed it is a commit.
|
|
455
|
+
*
|
|
456
|
+
* The FEATURE was kept rather than deleted with the seal, because it carries real information: a
|
|
457
|
+
* document may hold a structured annex whose value is validated and rendered by one named contract,
|
|
458
|
+
* and a second renderer identity is deliberately absent so nothing can validate one row set and
|
|
459
|
+
* display another. That sentence is worth having; the hash was not.
|
|
460
|
+
*/
|
|
461
|
+
/** Portable identity of the declarative value schema selected by an authority catalog. */
|
|
462
|
+
export const AssuranceDocumentStructuredValueSchemaIdentitySchema = z.strictObject({
|
|
463
|
+
valueSchemaRef: GovernedDocumentRefSchema,
|
|
464
|
+
valueSchemaVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
465
|
+
});
|
|
466
|
+
export type AssuranceDocumentStructuredValueSchemaIdentity = z.infer<typeof AssuranceDocumentStructuredValueSchemaIdentitySchema>;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* The runtime implementation responsible for validating, canonicalizing, ordering and rendering a
|
|
470
|
+
* structured annex. There is deliberately NO independent renderer identity: a second implementation
|
|
471
|
+
* authority could validate one row set and display another.
|
|
472
|
+
*/
|
|
473
|
+
export const AssuranceDocumentStructuredContentProcessorIdentitySchema = z.strictObject({
|
|
474
|
+
processorRef: GovernedDocumentRefSchema,
|
|
475
|
+
processorVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
476
|
+
});
|
|
477
|
+
export type AssuranceDocumentStructuredContentProcessorIdentity = z.infer<typeof AssuranceDocumentStructuredContentProcessorIdentitySchema>;
|
|
478
|
+
|
|
479
|
+
/** Engine-catalog declaration that binds one portable value schema to exactly one runtime processor closure. */
|
|
480
|
+
export const AssuranceDocumentStructuredValueContractSchema = z
|
|
481
|
+
.strictObject({
|
|
482
|
+
schemaVersion: z.literal(1),
|
|
483
|
+
contractRef: AssuranceNamespacedRefSchema,
|
|
484
|
+
contractVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
485
|
+
valueSchema: AssuranceDocumentStructuredValueSchemaIdentitySchema,
|
|
486
|
+
processor: AssuranceDocumentStructuredContentProcessorIdentitySchema,
|
|
487
|
+
sensitivityRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
488
|
+
})
|
|
489
|
+
.superRefine((contract, context) => {
|
|
490
|
+
addUniqueSortedIssue(contract.sensitivityRefs, context, ["sensitivityRefs"], "sensitivityRefs");
|
|
491
|
+
});
|
|
492
|
+
export type AssuranceDocumentStructuredValueContract = z.infer<typeof AssuranceDocumentStructuredValueContractSchema>;
|
|
493
|
+
|
|
494
|
+
export const AssuranceDocumentAnnexBindingSchema = z.strictObject({
|
|
495
|
+
annexRef: AssuranceNamespacedRefSchema,
|
|
496
|
+
annexVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
497
|
+
factRef: AssuranceNamespacedRefSchema,
|
|
498
|
+
structuredValueContract: AssuranceDocumentStructuredValueContractIdentitySchema,
|
|
499
|
+
valueSchema: AssuranceDocumentStructuredValueSchemaIdentitySchema,
|
|
500
|
+
processor: AssuranceDocumentStructuredContentProcessorIdentitySchema,
|
|
501
|
+
});
|
|
502
|
+
export type AssuranceDocumentAnnexBinding = z.infer<typeof AssuranceDocumentAnnexBindingSchema>;
|
|
503
|
+
|
|
504
|
+
const AssuranceDocumentBlueprintV1BaseSchema = z.strictObject({
|
|
505
|
+
identity: AssuranceDocumentBlueprintIdentitySchema,
|
|
506
|
+
definition: GovernedDocumentDefinitionIdentitySchema,
|
|
507
|
+
questions: z.array(AssuranceDocumentBlueprintQuestionV1Schema).min(1),
|
|
508
|
+
sections: z.array(AssuranceDocumentBlueprintSectionSchema).min(1),
|
|
509
|
+
clauses: z.array(AssuranceDocumentBlueprintClauseSchema).min(1),
|
|
510
|
+
claimGuards: z.array(AssuranceDocumentClaimGuardSchema).min(1),
|
|
511
|
+
reviewChecklists: z.array(AssuranceDocumentReviewChecklistSchema).min(1),
|
|
512
|
+
/** Optional only so retained pre-Step-4 v2 catalog bytes replay unchanged. Current candidate-enabled blueprints author this field explicitly. */
|
|
513
|
+
variantAxes: z.array(AssuranceDocumentBlueprintVariantAxisSchema).optional(),
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
type AssuranceDocumentBlueprintRefinementInput = Omit<z.infer<typeof AssuranceDocumentBlueprintV1BaseSchema>, "questions"> & {
|
|
517
|
+
readonly questions: readonly AssuranceDocumentBlueprintQuestion[];
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
const refineAssuranceDocumentBlueprint = (blueprint: AssuranceDocumentBlueprintRefinementInput, context: z.RefinementCtx): void => {
|
|
521
|
+
addUniqueSortedIssue(
|
|
522
|
+
blueprint.questions.map((question) => question.questionRef),
|
|
523
|
+
context,
|
|
524
|
+
["questions"],
|
|
525
|
+
"question references",
|
|
526
|
+
);
|
|
527
|
+
addUniqueSortedIssue(
|
|
528
|
+
blueprint.questions.map((question) => question.factRef),
|
|
529
|
+
context,
|
|
530
|
+
["questions"],
|
|
531
|
+
"question fact references",
|
|
532
|
+
);
|
|
533
|
+
if (!valuesAreUnique(blueprint.sections.map((section) => section.sectionRef))) {
|
|
534
|
+
context.addIssue({ code: "custom", message: "section references must be unique", path: ["sections"] });
|
|
535
|
+
}
|
|
536
|
+
addUniqueSortedIssue(
|
|
537
|
+
blueprint.clauses.map((clause) => clause.clauseRef),
|
|
538
|
+
context,
|
|
539
|
+
["clauses"],
|
|
540
|
+
"clause references",
|
|
541
|
+
);
|
|
542
|
+
addUniqueSortedIssue(
|
|
543
|
+
blueprint.claimGuards.map((guard) => guard.guardRef),
|
|
544
|
+
context,
|
|
545
|
+
["claimGuards"],
|
|
546
|
+
"claim guard references",
|
|
547
|
+
);
|
|
548
|
+
addUniqueSortedIssue(
|
|
549
|
+
blueprint.reviewChecklists.map((checklist) => checklist.checklistRef),
|
|
550
|
+
context,
|
|
551
|
+
["reviewChecklists"],
|
|
552
|
+
"review checklist references",
|
|
553
|
+
);
|
|
554
|
+
addUniqueSortedIssue(
|
|
555
|
+
(blueprint.variantAxes ?? []).map((axis) => axis.axisRef),
|
|
556
|
+
context,
|
|
557
|
+
["variantAxes"],
|
|
558
|
+
"variant axis references",
|
|
559
|
+
);
|
|
560
|
+
|
|
561
|
+
const questionsByFactRef = new Map(blueprint.questions.map((question) => [question.factRef, question]));
|
|
562
|
+
const sectionsByRef = new Map(blueprint.sections.map((section) => [section.sectionRef, section]));
|
|
563
|
+
const clausesByRef = new Map(blueprint.clauses.map((clause) => [clause.clauseRef, clause]));
|
|
564
|
+
const claimGuardsByRef = new Map(blueprint.claimGuards.map((guard) => [guard.guardRef, guard]));
|
|
565
|
+
|
|
566
|
+
blueprint.sections.forEach((section, sectionIndex) => {
|
|
567
|
+
if (section.order !== sectionIndex + 1) {
|
|
568
|
+
context.addIssue({ code: "custom", message: "section order must be contiguous and match array order", path: ["sections", sectionIndex, "order"] });
|
|
569
|
+
}
|
|
570
|
+
if (!valuesAreUnique(section.requiredFactRefs)) {
|
|
571
|
+
context.addIssue({ code: "custom", message: "section requiredFactRefs must be unique", path: ["sections", sectionIndex, "requiredFactRefs"] });
|
|
572
|
+
}
|
|
573
|
+
if (!valuesAreUnique(section.clauseRefs)) {
|
|
574
|
+
context.addIssue({ code: "custom", message: "section clauseRefs must be unique", path: ["sections", sectionIndex, "clauseRefs"] });
|
|
575
|
+
}
|
|
576
|
+
section.requiredFactRefs.forEach((factRef) => {
|
|
577
|
+
if (!questionsByFactRef.has(factRef)) {
|
|
578
|
+
context.addIssue({ code: "custom", message: `section references unknown fact ${factRef}`, path: ["sections", sectionIndex, "requiredFactRefs"] });
|
|
579
|
+
}
|
|
580
|
+
});
|
|
581
|
+
section.clauseRefs.forEach((clauseRef) => {
|
|
582
|
+
const clause = clausesByRef.get(clauseRef);
|
|
583
|
+
if (!clause) {
|
|
584
|
+
context.addIssue({ code: "custom", message: `section references unknown clause ${clauseRef}`, path: ["sections", sectionIndex, "clauseRefs"] });
|
|
585
|
+
} else if (clause.sectionRef !== section.sectionRef) {
|
|
586
|
+
context.addIssue({ code: "custom", message: `clause ${clauseRef} declares a different section`, path: ["sections", sectionIndex, "clauseRefs"] });
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
const clauseFactRefs = section.clauseRefs
|
|
590
|
+
.flatMap((clauseRef) => clausesByRef.get(clauseRef)?.requiredFactRefs ?? [])
|
|
591
|
+
.filter((factRef, index, values) => values.indexOf(factRef) === index)
|
|
592
|
+
.sort(compareCanonicalText);
|
|
593
|
+
const sectionFactRefs = [...section.requiredFactRefs].sort(compareCanonicalText);
|
|
594
|
+
if (JSON.stringify(clauseFactRefs) !== JSON.stringify(sectionFactRefs)) {
|
|
595
|
+
context.addIssue({
|
|
596
|
+
code: "custom",
|
|
597
|
+
message: "section requiredFactRefs must equal the facts required by its clauses",
|
|
598
|
+
path: ["sections", sectionIndex, "requiredFactRefs"],
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
});
|
|
602
|
+
|
|
603
|
+
const assignedClauseRefs = blueprint.sections.flatMap((section) => section.clauseRefs);
|
|
604
|
+
if (
|
|
605
|
+
!valuesAreUnique(assignedClauseRefs) ||
|
|
606
|
+
assignedClauseRefs.length !== blueprint.clauses.length ||
|
|
607
|
+
assignedClauseRefs.some((ref) => !clausesByRef.has(ref))
|
|
608
|
+
) {
|
|
609
|
+
context.addIssue({ code: "custom", message: "every clause must be assigned to exactly one section", path: ["sections"] });
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
blueprint.clauses.forEach((clause, clauseIndex) => {
|
|
613
|
+
if (!sectionsByRef.has(clause.sectionRef)) {
|
|
614
|
+
context.addIssue({ code: "custom", message: `clause references unknown section ${clause.sectionRef}`, path: ["clauses", clauseIndex, "sectionRef"] });
|
|
615
|
+
}
|
|
616
|
+
[...clause.requiredFactRefs, ...clause.variables.map((variable) => variable.factRef)].forEach((factRef) => {
|
|
617
|
+
if (!questionsByFactRef.has(factRef)) {
|
|
618
|
+
context.addIssue({ code: "custom", message: `clause references unknown fact ${factRef}`, path: ["clauses", clauseIndex] });
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
clause.claimGuardRefs.forEach((guardRef) => {
|
|
622
|
+
if (!claimGuardsByRef.has(guardRef)) {
|
|
623
|
+
context.addIssue({ code: "custom", message: `clause references unknown claim guard ${guardRef}`, path: ["clauses", clauseIndex, "claimGuardRefs"] });
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
clause.conditionGroups.forEach((group, groupIndex) => {
|
|
627
|
+
group.conditions.forEach((condition, conditionIndex) => {
|
|
628
|
+
const question = questionsByFactRef.get(condition.factRef);
|
|
629
|
+
if (!question) {
|
|
630
|
+
context.addIssue({
|
|
631
|
+
code: "custom",
|
|
632
|
+
message: `condition references unknown fact ${condition.factRef}`,
|
|
633
|
+
path: ["clauses", clauseIndex, "conditionGroups", groupIndex, "conditions", conditionIndex, "factRef"],
|
|
634
|
+
});
|
|
635
|
+
return;
|
|
636
|
+
}
|
|
637
|
+
if (
|
|
638
|
+
(condition.operator === AssuranceDocumentConditionOperator.FACT_TRUE || condition.operator === AssuranceDocumentConditionOperator.FACT_FALSE) &&
|
|
639
|
+
question.answerKind !== AssuranceDocumentQuestionAnswerKind.BOOLEAN
|
|
640
|
+
) {
|
|
641
|
+
context.addIssue({
|
|
642
|
+
code: "custom",
|
|
643
|
+
message: "boolean condition requires a BOOLEAN question",
|
|
644
|
+
path: ["clauses", clauseIndex, "conditionGroups", groupIndex],
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
if (
|
|
648
|
+
condition.operator === AssuranceDocumentConditionOperator.FACT_EQUALS_SEMANTIC_OPTION ||
|
|
649
|
+
condition.operator === AssuranceDocumentConditionOperator.FACT_CONTAINS_SEMANTIC_OPTION
|
|
650
|
+
) {
|
|
651
|
+
const expectedKind =
|
|
652
|
+
condition.operator === AssuranceDocumentConditionOperator.FACT_EQUALS_SEMANTIC_OPTION
|
|
653
|
+
? AssuranceDocumentQuestionAnswerKind.SEMANTIC_SINGLE_SELECT
|
|
654
|
+
: AssuranceDocumentQuestionAnswerKind.SEMANTIC_MULTI_SELECT;
|
|
655
|
+
if (question.answerKind !== expectedKind || !question.semanticOptions.some((option) => option.optionRef === condition.semanticOptionRef)) {
|
|
656
|
+
context.addIssue({
|
|
657
|
+
code: "custom",
|
|
658
|
+
message: "semantic-option condition is incompatible with its question",
|
|
659
|
+
path: ["clauses", clauseIndex, "conditionGroups", groupIndex],
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
});
|
|
665
|
+
});
|
|
666
|
+
|
|
667
|
+
const referencedClaimGuardRefs = blueprint.clauses
|
|
668
|
+
.flatMap((clause) => clause.claimGuardRefs)
|
|
669
|
+
.filter((guardRef, index, values) => values.indexOf(guardRef) === index)
|
|
670
|
+
.sort(compareCanonicalText);
|
|
671
|
+
const declaredClaimGuardRefs = [...claimGuardsByRef.keys()].sort(compareCanonicalText);
|
|
672
|
+
if (JSON.stringify(referencedClaimGuardRefs) !== JSON.stringify(declaredClaimGuardRefs)) {
|
|
673
|
+
context.addIssue({ code: "custom", message: "every declared claim guard must be used by at least one clause", path: ["claimGuards"] });
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
blueprint.claimGuards.forEach((guard, guardIndex) => {
|
|
677
|
+
guard.requiredFactRefs.forEach((factRef) => {
|
|
678
|
+
if (!questionsByFactRef.has(factRef)) {
|
|
679
|
+
context.addIssue({
|
|
680
|
+
code: "custom",
|
|
681
|
+
message: `claim guard references unknown fact ${factRef}`,
|
|
682
|
+
path: ["claimGuards", guardIndex, "requiredFactRefs"],
|
|
683
|
+
});
|
|
684
|
+
}
|
|
685
|
+
});
|
|
686
|
+
});
|
|
687
|
+
|
|
688
|
+
(blueprint.variantAxes ?? []).forEach((axis, axisIndex) => {
|
|
689
|
+
axis.options.forEach((option, optionIndex) => {
|
|
690
|
+
option.supportingFactRefs.forEach((factRef) => {
|
|
691
|
+
if (!questionsByFactRef.has(factRef)) {
|
|
692
|
+
context.addIssue({
|
|
693
|
+
code: "custom",
|
|
694
|
+
message: `variant option references unknown fact ${factRef}`,
|
|
695
|
+
path: ["variantAxes", axisIndex, "options", optionIndex, "supportingFactRefs"],
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
});
|
|
699
|
+
});
|
|
700
|
+
});
|
|
701
|
+
|
|
702
|
+
blueprint.reviewChecklists.forEach((checklist, checklistIndex) => {
|
|
703
|
+
if (!checklist.items.some((item) => item.blocksApproval)) {
|
|
704
|
+
context.addIssue({
|
|
705
|
+
code: "custom",
|
|
706
|
+
message: "each review checklist requires at least one approval-blocking item",
|
|
707
|
+
path: ["reviewChecklists", checklistIndex, "items"],
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
checklist.items.forEach((item, itemIndex) => {
|
|
711
|
+
const subjectExists =
|
|
712
|
+
(item.subjectKind === AssuranceDocumentReviewChecklistSubjectKind.BLUEPRINT && item.subjectRef === blueprint.identity.blueprintRef) ||
|
|
713
|
+
(item.subjectKind === AssuranceDocumentReviewChecklistSubjectKind.SECTION && sectionsByRef.has(item.subjectRef)) ||
|
|
714
|
+
(item.subjectKind === AssuranceDocumentReviewChecklistSubjectKind.CLAUSE && clausesByRef.has(item.subjectRef)) ||
|
|
715
|
+
(item.subjectKind === AssuranceDocumentReviewChecklistSubjectKind.CLAIM_GUARD && claimGuardsByRef.has(item.subjectRef));
|
|
716
|
+
if (!subjectExists) {
|
|
717
|
+
context.addIssue({
|
|
718
|
+
code: "custom",
|
|
719
|
+
message: `review item references unknown ${item.subjectKind} subject ${item.subjectRef}`,
|
|
720
|
+
path: ["reviewChecklists", checklistIndex, "items", itemIndex, "subjectRef"],
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
});
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
/** Retained unversioned blueprint branch used only by catalog v2. */
|
|
728
|
+
export const AssuranceDocumentBlueprintV1Schema = AssuranceDocumentBlueprintV1BaseSchema.superRefine(refineAssuranceDocumentBlueprint);
|
|
729
|
+
|
|
730
|
+
const AssuranceDocumentBlueprintV2BaseSchema = z.strictObject({
|
|
731
|
+
...AssuranceDocumentBlueprintV1BaseSchema.shape,
|
|
732
|
+
schemaVersion: z.literal(2),
|
|
733
|
+
questions: z.array(AssuranceDocumentBlueprintQuestionV2Schema).min(1),
|
|
734
|
+
variantAxes: z.array(AssuranceDocumentBlueprintVariantAxisSchema),
|
|
735
|
+
annexBindings: z.array(AssuranceDocumentAnnexBindingSchema),
|
|
736
|
+
});
|
|
737
|
+
|
|
738
|
+
/** Current blueprint branch. Structured questions and annex bindings are one-to-one and bind exact catalog/runtime identities. */
|
|
739
|
+
export const AssuranceDocumentBlueprintV2Schema = AssuranceDocumentBlueprintV2BaseSchema.superRefine((blueprint, context) => {
|
|
740
|
+
refineAssuranceDocumentBlueprint(blueprint, context);
|
|
741
|
+
addUniqueSortedIssue(
|
|
742
|
+
blueprint.annexBindings.map((binding) => `${binding.annexRef}@${binding.annexVersion}`),
|
|
743
|
+
context,
|
|
744
|
+
["annexBindings"],
|
|
745
|
+
"annex binding identities",
|
|
746
|
+
);
|
|
747
|
+
addUniqueSortedIssue(
|
|
748
|
+
blueprint.annexBindings.map((binding) => binding.factRef),
|
|
749
|
+
context,
|
|
750
|
+
["annexBindings"],
|
|
751
|
+
"annex binding fact references",
|
|
752
|
+
);
|
|
753
|
+
|
|
754
|
+
const structuredQuestions = blueprint.questions.filter(
|
|
755
|
+
(question): question is z.infer<typeof AssuranceDocumentBlueprintQuestionV2StructuredSchema> =>
|
|
756
|
+
question.answerKind === AssuranceDocumentQuestionAnswerKind.STRUCTURED_VALUE,
|
|
757
|
+
);
|
|
758
|
+
const structuredQuestionsByFactRef = new Map(structuredQuestions.map((question) => [question.factRef, question]));
|
|
759
|
+
if (structuredQuestions.length !== blueprint.annexBindings.length) {
|
|
760
|
+
context.addIssue({ code: "custom", message: "every structured question requires exactly one annex binding", path: ["annexBindings"] });
|
|
761
|
+
}
|
|
762
|
+
blueprint.annexBindings.forEach((binding, bindingIndex) => {
|
|
763
|
+
const question = structuredQuestionsByFactRef.get(binding.factRef);
|
|
764
|
+
if (!question) {
|
|
765
|
+
context.addIssue({
|
|
766
|
+
code: "custom",
|
|
767
|
+
message: `annex binding references non-structured fact ${binding.factRef}`,
|
|
768
|
+
path: ["annexBindings", bindingIndex, "factRef"],
|
|
769
|
+
});
|
|
770
|
+
return;
|
|
771
|
+
}
|
|
772
|
+
if (JSON.stringify(question.structuredValueContract) !== JSON.stringify(binding.structuredValueContract)) {
|
|
773
|
+
context.addIssue({
|
|
774
|
+
code: "custom",
|
|
775
|
+
message: "annex binding contract identity must equal its structured question contract identity",
|
|
776
|
+
path: ["annexBindings", bindingIndex, "structuredValueContract"],
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
});
|
|
780
|
+
});
|
|
781
|
+
|
|
782
|
+
export const AssuranceDocumentBlueprintSchema = z.union([AssuranceDocumentBlueprintV1Schema, AssuranceDocumentBlueprintV2Schema]);
|
|
783
|
+
export type AssuranceDocumentBlueprint = z.infer<typeof AssuranceDocumentBlueprintSchema>;
|
|
784
|
+
|
|
785
|
+
/** Framework-owned definition metadata. It selects questions and gates; it never embeds app facts or legal prose. */
|
|
786
|
+
export const AssuranceDocumentDefinitionSchema = z
|
|
787
|
+
.strictObject({
|
|
788
|
+
identity: GovernedDocumentDefinitionIdentitySchema,
|
|
789
|
+
stableKindRef: AssuranceNamespacedRefSchema,
|
|
790
|
+
documentClass: z.enum(GovernedDocumentClass),
|
|
791
|
+
applicabilityKind: z.enum(AssuranceDocumentCatalogApplicabilityKind),
|
|
792
|
+
governanceSubjectKinds: z.array(z.enum(GovernedDocumentGovernanceSubjectKind)).min(1),
|
|
793
|
+
audienceKinds: z.array(z.enum(GovernedDocumentAudienceKind)).min(1),
|
|
794
|
+
requiredFactRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
795
|
+
requiredSectionRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
796
|
+
qualifiedReviewPolicyRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
797
|
+
sourcePolicyRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
798
|
+
publicationChannelKinds: z.array(z.enum(GovernedDocumentPublicationChannelKind)).min(1),
|
|
799
|
+
allowedInteractionKinds: z.array(z.enum(GovernedDocumentInteractionKind)),
|
|
800
|
+
retentionPolicyRef: AssuranceNamespacedRefSchema,
|
|
801
|
+
reviewTriggerRefs: z.array(AssuranceNamespacedRefSchema).min(1),
|
|
802
|
+
claimPolicyRef: AssuranceNamespacedRefSchema,
|
|
803
|
+
})
|
|
804
|
+
.superRefine((definition, context) => {
|
|
805
|
+
for (const [key, values] of [
|
|
806
|
+
["governanceSubjectKinds", definition.governanceSubjectKinds],
|
|
807
|
+
["audienceKinds", definition.audienceKinds],
|
|
808
|
+
["requiredFactRefs", definition.requiredFactRefs],
|
|
809
|
+
["requiredSectionRefs", definition.requiredSectionRefs],
|
|
810
|
+
["qualifiedReviewPolicyRefs", definition.qualifiedReviewPolicyRefs],
|
|
811
|
+
["sourcePolicyRefs", definition.sourcePolicyRefs],
|
|
812
|
+
["publicationChannelKinds", definition.publicationChannelKinds],
|
|
813
|
+
["allowedInteractionKinds", definition.allowedInteractionKinds],
|
|
814
|
+
["reviewTriggerRefs", definition.reviewTriggerRefs],
|
|
815
|
+
] as const)
|
|
816
|
+
addUniqueSortedIssue(values, context, [key], key);
|
|
817
|
+
});
|
|
818
|
+
export type AssuranceDocumentDefinition = z.infer<typeof AssuranceDocumentDefinitionSchema>;
|
|
819
|
+
|
|
820
|
+
const AssuranceDocumentAuthorityCatalogCommonSchema = z.strictObject({
|
|
821
|
+
catalogRef: AssuranceNamespacedRefSchema,
|
|
822
|
+
catalogVersion: GovernedDocumentPositiveSafeIntegerSchema,
|
|
823
|
+
verifiedAt: AssuranceIsoDateTimeSchema,
|
|
824
|
+
sourceMonitoringPolicies: z.array(AssuranceDocumentSourceMonitoringPolicySchema).min(1),
|
|
825
|
+
qualifiedReviewPolicies: z.array(AssuranceDocumentQualifiedReviewPolicySchema).min(1),
|
|
826
|
+
claimPolicies: z.array(AssuranceDocumentClaimPolicySchema).min(1),
|
|
827
|
+
definitions: z.array(AssuranceDocumentDefinitionSchema).min(1),
|
|
828
|
+
});
|
|
829
|
+
|
|
830
|
+
type AssuranceDocumentAuthorityCatalogCommon = z.infer<typeof AssuranceDocumentAuthorityCatalogCommonSchema>;
|
|
831
|
+
|
|
832
|
+
type AssuranceDocumentAuthorityCatalogCommonRefinementInput = Pick<
|
|
833
|
+
AssuranceDocumentAuthorityCatalogCommon,
|
|
834
|
+
"verifiedAt" | "sourceMonitoringPolicies" | "qualifiedReviewPolicies" | "claimPolicies" | "definitions"
|
|
835
|
+
>;
|
|
836
|
+
|
|
837
|
+
const refineAssuranceDocumentAuthorityCatalogCommon = (catalog: AssuranceDocumentAuthorityCatalogCommonRefinementInput, context: z.RefinementCtx): void => {
|
|
838
|
+
for (const [key, identities] of [
|
|
839
|
+
["sourceMonitoringPolicies", catalog.sourceMonitoringPolicies.map((value) => `${value.policyRef}@${value.policyVersion}`)],
|
|
840
|
+
["qualifiedReviewPolicies", catalog.qualifiedReviewPolicies.map((value) => `${value.policyRef}@${value.policyVersion}`)],
|
|
841
|
+
["claimPolicies", catalog.claimPolicies.map((value) => `${value.policyRef}@${value.policyVersion}`)],
|
|
842
|
+
["definitions", catalog.definitions.map((value) => `${value.identity.definitionRef}@${value.identity.definitionVersion}`)],
|
|
843
|
+
] as const)
|
|
844
|
+
addUniqueSortedIssue(identities, context, [key], `${key} identities`);
|
|
845
|
+
|
|
846
|
+
for (const [key, refs] of [
|
|
847
|
+
["sourceMonitoringPolicies", catalog.sourceMonitoringPolicies.map((value) => value.policyRef)],
|
|
848
|
+
["qualifiedReviewPolicies", catalog.qualifiedReviewPolicies.map((value) => value.policyRef)],
|
|
849
|
+
["claimPolicies", catalog.claimPolicies.map((value) => value.policyRef)],
|
|
850
|
+
["definitions", catalog.definitions.map((value) => value.stableKindRef)],
|
|
851
|
+
] as const)
|
|
852
|
+
addUniqueSortedIssue(refs, context, [key], `${key} unversioned references`);
|
|
853
|
+
|
|
854
|
+
const sourcePolicyRefs = new Set(catalog.sourceMonitoringPolicies.map((value) => value.policyRef));
|
|
855
|
+
const reviewPolicyRefs = new Set(catalog.qualifiedReviewPolicies.map((value) => value.policyRef));
|
|
856
|
+
const claimPolicyRefs = new Set(catalog.claimPolicies.map((value) => value.policyRef));
|
|
857
|
+
const definitionRefs = new Set<string>(catalog.definitions.map((value) => value.identity.definitionRef));
|
|
858
|
+
const reviewPoliciesByRef = new Map(catalog.qualifiedReviewPolicies.map((value) => [value.policyRef, value]));
|
|
859
|
+
catalog.sourceMonitoringPolicies.forEach((policy, policyIndex) => {
|
|
860
|
+
policy.dependentDefinitionRefs.forEach((ref) => {
|
|
861
|
+
if (!definitionRefs.has(ref)) {
|
|
862
|
+
context.addIssue({
|
|
863
|
+
code: "custom",
|
|
864
|
+
message: `source monitoring policy references unknown dependent definition ${ref}`,
|
|
865
|
+
path: ["sourceMonitoringPolicies", policyIndex, "dependentDefinitionRefs"],
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
if (policy.lastCheckedAt > catalog.verifiedAt) {
|
|
870
|
+
context.addIssue({
|
|
871
|
+
code: "custom",
|
|
872
|
+
message: "source monitoring cannot be checked after the catalog verification instant",
|
|
873
|
+
path: ["sourceMonitoringPolicies", policyIndex, "lastCheckedAt"],
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
});
|
|
877
|
+
catalog.definitions.forEach((definition, definitionIndex) => {
|
|
878
|
+
definition.sourcePolicyRefs.forEach((ref) => {
|
|
879
|
+
if (!sourcePolicyRefs.has(ref))
|
|
880
|
+
context.addIssue({ code: "custom", message: `unknown source monitoring policy ${ref}`, path: ["definitions", definitionIndex, "sourcePolicyRefs"] });
|
|
881
|
+
});
|
|
882
|
+
definition.qualifiedReviewPolicyRefs.forEach((ref) => {
|
|
883
|
+
if (!reviewPolicyRefs.has(ref))
|
|
884
|
+
context.addIssue({
|
|
885
|
+
code: "custom",
|
|
886
|
+
message: `unknown qualified review policy ${ref}`,
|
|
887
|
+
path: ["definitions", definitionIndex, "qualifiedReviewPolicyRefs"],
|
|
888
|
+
});
|
|
889
|
+
});
|
|
890
|
+
if (!claimPolicyRefs.has(definition.claimPolicyRef)) {
|
|
891
|
+
context.addIssue({
|
|
892
|
+
code: "custom",
|
|
893
|
+
message: `unknown claim policy ${definition.claimPolicyRef}`,
|
|
894
|
+
path: ["definitions", definitionIndex, "claimPolicyRef"],
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
const selectedReviewPolicies = definition.qualifiedReviewPolicyRefs
|
|
898
|
+
.map((ref) => reviewPoliciesByRef.get(ref))
|
|
899
|
+
.filter((policy): policy is AssuranceDocumentQualifiedReviewPolicy => policy !== undefined);
|
|
900
|
+
selectedReviewPolicies.forEach((policy) => {
|
|
901
|
+
if (!policy.documentClasses.includes(definition.documentClass)) {
|
|
902
|
+
context.addIssue({
|
|
903
|
+
code: "custom",
|
|
904
|
+
message: `qualified review policy ${policy.policyRef} does not govern document class ${definition.documentClass}`,
|
|
905
|
+
path: ["definitions", definitionIndex, "qualifiedReviewPolicyRefs"],
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
});
|
|
909
|
+
definition.audienceKinds.forEach((audience) => {
|
|
910
|
+
if (!selectedReviewPolicies.some((policy) => policy.audienceKinds.length === 0 || policy.audienceKinds.includes(audience))) {
|
|
911
|
+
context.addIssue({
|
|
912
|
+
code: "custom",
|
|
913
|
+
message: `no qualified review policy governs audience ${audience}`,
|
|
914
|
+
path: ["definitions", definitionIndex, "qualifiedReviewPolicyRefs"],
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
});
|
|
918
|
+
});
|
|
919
|
+
};
|
|
920
|
+
|
|
921
|
+
const AssuranceDocumentAuthorityCatalogV1Schema = AssuranceDocumentAuthorityCatalogCommonSchema.extend({
|
|
922
|
+
schemaVersion: z.literal(1),
|
|
923
|
+
catalogVersion: z.literal(1),
|
|
924
|
+
}).superRefine((catalog, context) => {
|
|
925
|
+
refineAssuranceDocumentAuthorityCatalogCommon(catalog, context);
|
|
926
|
+
catalog.qualifiedReviewPolicies.forEach((policy, policyIndex) => {
|
|
927
|
+
if ("reviewRequirements" in policy) {
|
|
928
|
+
context.addIssue({
|
|
929
|
+
code: "custom",
|
|
930
|
+
message: "retained catalog v1 must preserve the historical flat qualified-review policy shape",
|
|
931
|
+
path: ["qualifiedReviewPolicies", policyIndex],
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
});
|
|
936
|
+
|
|
937
|
+
type AssuranceDocumentAuthorityCatalogBlueprintRefinementInput = Omit<AssuranceDocumentAuthorityCatalogCommon, "catalogVersion"> & {
|
|
938
|
+
readonly schemaVersion?: 2 | 3;
|
|
939
|
+
readonly catalogVersion?: 2 | 3 | 4 | 5 | 6;
|
|
940
|
+
readonly blueprints?: readonly AssuranceDocumentBlueprint[];
|
|
941
|
+
};
|
|
942
|
+
|
|
943
|
+
const refineAssuranceDocumentAuthorityCatalogBlueprints = (
|
|
944
|
+
catalog: AssuranceDocumentAuthorityCatalogBlueprintRefinementInput,
|
|
945
|
+
context: z.RefinementCtx,
|
|
946
|
+
): void => {
|
|
947
|
+
refineAssuranceDocumentAuthorityCatalogCommon(catalog, context);
|
|
948
|
+
if (catalog.catalogVersion === undefined || catalog.blueprints === undefined) {
|
|
949
|
+
context.addIssue({ code: "custom", message: "blueprint catalogs require explicit version and blueprint members", path: [] });
|
|
950
|
+
return;
|
|
951
|
+
}
|
|
952
|
+
catalog.qualifiedReviewPolicies.forEach((policy, policyIndex) => {
|
|
953
|
+
const usesCurrentReviewRequirements = "reviewRequirements" in policy;
|
|
954
|
+
if (catalog.catalogVersion >= 5 && !usesCurrentReviewRequirements) {
|
|
955
|
+
context.addIssue({
|
|
956
|
+
code: "custom",
|
|
957
|
+
message: "catalog v5 and later must bind reviewer qualifications to each exact review kind",
|
|
958
|
+
path: ["qualifiedReviewPolicies", policyIndex],
|
|
959
|
+
});
|
|
960
|
+
}
|
|
961
|
+
if (catalog.catalogVersion < 5 && usesCurrentReviewRequirements) {
|
|
962
|
+
context.addIssue({
|
|
963
|
+
code: "custom",
|
|
964
|
+
message: "retained catalog v2-v4 must preserve the historical flat qualified-review policy shape",
|
|
965
|
+
path: ["qualifiedReviewPolicies", policyIndex],
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
});
|
|
969
|
+
addUniqueSortedIssue(
|
|
970
|
+
catalog.blueprints.map((blueprint) => `${blueprint.identity.blueprintRef}@${blueprint.identity.blueprintVersion}`),
|
|
971
|
+
context,
|
|
972
|
+
["blueprints"],
|
|
973
|
+
"blueprint identities",
|
|
974
|
+
);
|
|
975
|
+
addUniqueSortedIssue(
|
|
976
|
+
catalog.blueprints.map((blueprint) => `${blueprint.definition.definitionRef}@${blueprint.definition.definitionVersion}`),
|
|
977
|
+
context,
|
|
978
|
+
["blueprints"],
|
|
979
|
+
"blueprint definition identities",
|
|
980
|
+
);
|
|
981
|
+
|
|
982
|
+
const definitionsByIdentity = new Map(
|
|
983
|
+
catalog.definitions.map((definition) => [`${definition.identity.definitionRef}@${definition.identity.definitionVersion}`, definition]),
|
|
984
|
+
);
|
|
985
|
+
const blueprintDefinitionIdentities = catalog.blueprints
|
|
986
|
+
.map((blueprint) => `${blueprint.definition.definitionRef}@${blueprint.definition.definitionVersion}`)
|
|
987
|
+
.sort(compareCanonicalText);
|
|
988
|
+
const catalogDefinitionIdentities = [...definitionsByIdentity.keys()].sort(compareCanonicalText);
|
|
989
|
+
if (JSON.stringify(blueprintDefinitionIdentities) !== JSON.stringify(catalogDefinitionIdentities)) {
|
|
990
|
+
context.addIssue({ code: "custom", message: "blueprint catalogs require exactly one blueprint for every definition", path: ["blueprints"] });
|
|
991
|
+
}
|
|
992
|
+
const sourcePolicyRefs = new Set(catalog.sourceMonitoringPolicies.map((policy) => policy.policyRef));
|
|
993
|
+
const reviewPoliciesByRef = new Map(catalog.qualifiedReviewPolicies.map((policy) => [policy.policyRef, policy]));
|
|
994
|
+
const claimPoliciesByRef = new Map(catalog.claimPolicies.map((policy) => [policy.policyRef, policy]));
|
|
995
|
+
|
|
996
|
+
catalog.blueprints.forEach((blueprint, blueprintIndex) => {
|
|
997
|
+
const definitionIdentity = `${blueprint.definition.definitionRef}@${blueprint.definition.definitionVersion}`;
|
|
998
|
+
const definition = definitionsByIdentity.get(definitionIdentity);
|
|
999
|
+
if (!definition) {
|
|
1000
|
+
context.addIssue({
|
|
1001
|
+
code: "custom",
|
|
1002
|
+
message: `blueprint references unknown definition ${definitionIdentity}`,
|
|
1003
|
+
path: ["blueprints", blueprintIndex, "definition"],
|
|
1004
|
+
});
|
|
1005
|
+
return;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
const blueprintFactRefs = blueprint.questions.map((question) => question.factRef).sort(compareCanonicalText);
|
|
1009
|
+
const definitionFactRefs = [...definition.requiredFactRefs].sort(compareCanonicalText);
|
|
1010
|
+
if (JSON.stringify(blueprintFactRefs) !== JSON.stringify(definitionFactRefs)) {
|
|
1011
|
+
context.addIssue({
|
|
1012
|
+
code: "custom",
|
|
1013
|
+
message: "blueprint questions must cover the definition requiredFactRefs exactly",
|
|
1014
|
+
path: ["blueprints", blueprintIndex, "questions"],
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
const blueprintSectionRefs = blueprint.sections.map((section) => section.sectionRef).sort(compareCanonicalText);
|
|
1018
|
+
const definitionSectionRefs = [...definition.requiredSectionRefs].sort(compareCanonicalText);
|
|
1019
|
+
if (JSON.stringify(blueprintSectionRefs) !== JSON.stringify(definitionSectionRefs)) {
|
|
1020
|
+
context.addIssue({
|
|
1021
|
+
code: "custom",
|
|
1022
|
+
message: "blueprint sections must cover the definition requiredSectionRefs exactly",
|
|
1023
|
+
path: ["blueprints", blueprintIndex, "sections"],
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
blueprint.clauses.forEach((clause, clauseIndex) => {
|
|
1028
|
+
clause.sourcePolicyRefs.forEach((policyRef) => {
|
|
1029
|
+
if (!sourcePolicyRefs.has(policyRef) || !definition.sourcePolicyRefs.includes(policyRef)) {
|
|
1030
|
+
context.addIssue({
|
|
1031
|
+
code: "custom",
|
|
1032
|
+
message: `clause source policy ${policyRef} is not selected by its definition`,
|
|
1033
|
+
path: ["blueprints", blueprintIndex, "clauses", clauseIndex, "sourcePolicyRefs"],
|
|
1034
|
+
});
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1037
|
+
});
|
|
1038
|
+
const usedSourcePolicyRefs = blueprint.clauses
|
|
1039
|
+
.flatMap((clause) => clause.sourcePolicyRefs)
|
|
1040
|
+
.filter((policyRef, index, values) => values.indexOf(policyRef) === index)
|
|
1041
|
+
.sort(compareCanonicalText);
|
|
1042
|
+
const definitionSourcePolicyRefs = [...definition.sourcePolicyRefs].sort(compareCanonicalText);
|
|
1043
|
+
if (JSON.stringify(usedSourcePolicyRefs) !== JSON.stringify(definitionSourcePolicyRefs)) {
|
|
1044
|
+
context.addIssue({
|
|
1045
|
+
code: "custom",
|
|
1046
|
+
message: "blueprint clauses must use every source policy selected by the definition",
|
|
1047
|
+
path: ["blueprints", blueprintIndex, "clauses"],
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
blueprint.claimGuards.forEach((guard, guardIndex) => {
|
|
1052
|
+
const claimPolicy = claimPoliciesByRef.get(guard.claimPolicyRef);
|
|
1053
|
+
if (!claimPolicy || guard.claimPolicyRef !== definition.claimPolicyRef) {
|
|
1054
|
+
context.addIssue({
|
|
1055
|
+
code: "custom",
|
|
1056
|
+
message: `claim guard policy ${guard.claimPolicyRef} is not selected by its definition`,
|
|
1057
|
+
path: ["blueprints", blueprintIndex, "claimGuards", guardIndex, "claimPolicyRef"],
|
|
1058
|
+
});
|
|
1059
|
+
} else if (
|
|
1060
|
+
JSON.stringify([...guard.prohibitedClaims].sort(compareCanonicalText)) !== JSON.stringify([...claimPolicy.prohibitedClaims].sort(compareCanonicalText))
|
|
1061
|
+
) {
|
|
1062
|
+
context.addIssue({
|
|
1063
|
+
code: "custom",
|
|
1064
|
+
message: "claim guard must enforce every prohibition in its selected claim policy exactly",
|
|
1065
|
+
path: ["blueprints", blueprintIndex, "claimGuards", guardIndex, "prohibitedClaims"],
|
|
1066
|
+
});
|
|
1067
|
+
}
|
|
1068
|
+
});
|
|
1069
|
+
|
|
1070
|
+
const selectedReviewPolicies = definition.qualifiedReviewPolicyRefs
|
|
1071
|
+
.map((policyRef) => reviewPoliciesByRef.get(policyRef))
|
|
1072
|
+
.filter((policy): policy is AssuranceDocumentQualifiedReviewPolicy => policy !== undefined);
|
|
1073
|
+
const expectedReviewPairs = selectedReviewPolicies
|
|
1074
|
+
.flatMap((policy) => assuranceDocumentQualifiedReviewRequirements(policy).map((requirement) => `${policy.policyRef}\0${requirement.reviewKind}`))
|
|
1075
|
+
.sort(compareCanonicalText);
|
|
1076
|
+
const actualReviewPairs = blueprint.reviewChecklists.map((checklist) => `${checklist.reviewPolicyRef}\0${checklist.reviewKind}`).sort(compareCanonicalText);
|
|
1077
|
+
if (JSON.stringify(actualReviewPairs) !== JSON.stringify(expectedReviewPairs)) {
|
|
1078
|
+
context.addIssue({
|
|
1079
|
+
code: "custom",
|
|
1080
|
+
message: "blueprint review checklists must cover every selected policy review kind exactly once",
|
|
1081
|
+
path: ["blueprints", blueprintIndex, "reviewChecklists"],
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
});
|
|
1085
|
+
};
|
|
1086
|
+
|
|
1087
|
+
const AssuranceDocumentAuthorityCatalogV2BaseSchema = AssuranceDocumentAuthorityCatalogCommonSchema.extend({
|
|
1088
|
+
schemaVersion: z.literal(2),
|
|
1089
|
+
catalogVersion: z.union([z.literal(2), z.literal(3), z.literal(4), z.literal(5)]),
|
|
1090
|
+
blueprints: z.array(AssuranceDocumentBlueprintV1Schema).min(1),
|
|
1091
|
+
});
|
|
1092
|
+
const AssuranceDocumentAuthorityCatalogV2Schema = AssuranceDocumentAuthorityCatalogV2BaseSchema.superRefine(refineAssuranceDocumentAuthorityCatalogBlueprints);
|
|
1093
|
+
|
|
1094
|
+
/** Current authoring branch: blueprint v2 plus a closed, exactly consumed structured-value-contract registry. */
|
|
1095
|
+
export const AssuranceDocumentAuthorityCatalogV3Schema = AssuranceDocumentAuthorityCatalogCommonSchema.extend({
|
|
1096
|
+
schemaVersion: z.literal(3),
|
|
1097
|
+
catalogVersion: z.literal(6),
|
|
1098
|
+
blueprints: z.array(AssuranceDocumentBlueprintV2Schema).min(1),
|
|
1099
|
+
structuredValueContracts: z.array(AssuranceDocumentStructuredValueContractSchema).min(1),
|
|
1100
|
+
}).superRefine((catalog, context) => {
|
|
1101
|
+
refineAssuranceDocumentAuthorityCatalogBlueprints(catalog, context);
|
|
1102
|
+
addUniqueSortedIssue(
|
|
1103
|
+
catalog.structuredValueContracts.map((contract) => `${contract.contractRef}@${contract.contractVersion}`),
|
|
1104
|
+
context,
|
|
1105
|
+
["structuredValueContracts"],
|
|
1106
|
+
"structured value contract identities",
|
|
1107
|
+
);
|
|
1108
|
+
addUniqueSortedIssue(
|
|
1109
|
+
catalog.structuredValueContracts.map((contract) => contract.contractRef),
|
|
1110
|
+
context,
|
|
1111
|
+
["structuredValueContracts"],
|
|
1112
|
+
"structured value contract references",
|
|
1113
|
+
);
|
|
1114
|
+
|
|
1115
|
+
const contractsByIdentity = new Map(catalog.structuredValueContracts.map((contract) => [`${contract.contractRef}@${contract.contractVersion}`, contract]));
|
|
1116
|
+
const selectedContractIdentities: string[] = [];
|
|
1117
|
+
catalog.blueprints.forEach((blueprint, blueprintIndex) => {
|
|
1118
|
+
blueprint.annexBindings.forEach((binding, bindingIndex) => {
|
|
1119
|
+
const identity = `${binding.structuredValueContract.contractRef}@${binding.structuredValueContract.contractVersion}`;
|
|
1120
|
+
selectedContractIdentities.push(identity);
|
|
1121
|
+
const contract = contractsByIdentity.get(identity);
|
|
1122
|
+
if (!contract) {
|
|
1123
|
+
context.addIssue({
|
|
1124
|
+
code: "custom",
|
|
1125
|
+
message: `annex binding references unknown structured value contract ${identity}`,
|
|
1126
|
+
path: ["blueprints", blueprintIndex, "annexBindings", bindingIndex, "structuredValueContract"],
|
|
1127
|
+
});
|
|
1128
|
+
return;
|
|
1129
|
+
}
|
|
1130
|
+
if (JSON.stringify(contract.valueSchema) !== JSON.stringify(binding.valueSchema)) {
|
|
1131
|
+
context.addIssue({
|
|
1132
|
+
code: "custom",
|
|
1133
|
+
message: "annex binding value-schema identity must equal the catalog contract value-schema identity",
|
|
1134
|
+
path: ["blueprints", blueprintIndex, "annexBindings", bindingIndex, "valueSchema"],
|
|
1135
|
+
});
|
|
1136
|
+
}
|
|
1137
|
+
if (JSON.stringify(contract.processor) !== JSON.stringify(binding.processor)) {
|
|
1138
|
+
context.addIssue({
|
|
1139
|
+
code: "custom",
|
|
1140
|
+
message: "annex binding processor identity must equal the catalog contract processor identity",
|
|
1141
|
+
path: ["blueprints", blueprintIndex, "annexBindings", bindingIndex, "processor"],
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
});
|
|
1145
|
+
});
|
|
1146
|
+
|
|
1147
|
+
const declaredContractIdentities = [...contractsByIdentity.keys()].sort(compareCanonicalText);
|
|
1148
|
+
const orderedSelectedContractIdentities = [...selectedContractIdentities].sort(compareCanonicalText);
|
|
1149
|
+
if (!valuesAreUnique(selectedContractIdentities) || JSON.stringify(orderedSelectedContractIdentities) !== JSON.stringify(declaredContractIdentities)) {
|
|
1150
|
+
context.addIssue({
|
|
1151
|
+
code: "custom",
|
|
1152
|
+
message: "catalog v3 requires every structured value contract to be selected by exactly one annex binding",
|
|
1153
|
+
path: ["structuredValueContracts"],
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
|
|
1158
|
+
/** Retained v1/v2 catalogs remain parse-only; every newly authored catalog uses v3/catalogVersion 6. */
|
|
1159
|
+
export const AssuranceDocumentAuthorityCatalogSchema = z.discriminatedUnion("schemaVersion", [
|
|
1160
|
+
AssuranceDocumentAuthorityCatalogV1Schema,
|
|
1161
|
+
AssuranceDocumentAuthorityCatalogV2Schema,
|
|
1162
|
+
AssuranceDocumentAuthorityCatalogV3Schema,
|
|
1163
|
+
]);
|
|
1164
|
+
export type AssuranceDocumentAuthorityCatalog = z.infer<typeof AssuranceDocumentAuthorityCatalogSchema>;
|
|
1165
|
+
|
|
1166
|
+
const canonicalizeJsonValue = (value: unknown): unknown => {
|
|
1167
|
+
if (Array.isArray(value)) return value.map(canonicalizeJsonValue);
|
|
1168
|
+
if (value !== null && typeof value === "object") {
|
|
1169
|
+
return Object.fromEntries(
|
|
1170
|
+
Object.entries(value)
|
|
1171
|
+
.sort(([left], [right]) => compareCanonicalText(left, right))
|
|
1172
|
+
.map(([key, nested]) => [key, canonicalizeJsonValue(nested)]),
|
|
1173
|
+
);
|
|
1174
|
+
}
|
|
1175
|
+
return value;
|
|
1176
|
+
};
|
|
1177
|
+
|
|
1178
|
+
/** Validate that each monitored source is exact, current and rights-authorized inside the same engine-owned registry snapshot. */
|
|
1179
|
+
export const collectAssuranceDocumentAuthorityCatalogIssues = (input: {
|
|
1180
|
+
readonly catalog: AssuranceDocumentAuthorityCatalog;
|
|
1181
|
+
readonly sourceRegistry: AssuranceSourceRegistry;
|
|
1182
|
+
readonly evaluatedAt: string;
|
|
1183
|
+
}): string[] => {
|
|
1184
|
+
const catalog = AssuranceDocumentAuthorityCatalogSchema.parse(input.catalog);
|
|
1185
|
+
const registry = AssuranceSourceRegistrySchema.parse(input.sourceRegistry);
|
|
1186
|
+
const sourceRecords = new Map(registry.sources.map((source) => [`${source.identity.sourceRef}@${source.identity.sourceVersion}`, source]));
|
|
1187
|
+
const issues: string[] = [];
|
|
1188
|
+
if (catalog.verifiedAt > input.evaluatedAt) issues.push(`document authority catalog is verified after evaluation time ${input.evaluatedAt}`);
|
|
1189
|
+
if (registry.verifiedAt > input.evaluatedAt) issues.push(`source registry is verified after evaluation time ${input.evaluatedAt}`);
|
|
1190
|
+
catalog.sourceMonitoringPolicies.forEach((policy) => {
|
|
1191
|
+
const key = `${policy.source.sourceRef}@${policy.source.sourceVersion}`;
|
|
1192
|
+
const source = sourceRecords.get(key);
|
|
1193
|
+
if (!source) {
|
|
1194
|
+
issues.push(`source monitoring policy ${policy.policyRef} references source ${key} outside the authority registry`);
|
|
1195
|
+
return;
|
|
1196
|
+
}
|
|
1197
|
+
if (source.canonicalLocator !== policy.canonicalLocator || source.lifecycleStatus !== policy.expectedLifecycleStatus) {
|
|
1198
|
+
issues.push(`source monitoring policy ${policy.policyRef} does not match current source identity metadata`);
|
|
1199
|
+
}
|
|
1200
|
+
const rights = deriveAssuranceRightsAuthorization(source.rights, policy.requiredSourceUses, input.evaluatedAt);
|
|
1201
|
+
if (!rights.authorized) issues.push(`source monitoring policy ${policy.policyRef} is not rights-authorized for ${rights.requestedUses.join(", ")}`);
|
|
1202
|
+
if (policy.lastCheckedAt > input.evaluatedAt)
|
|
1203
|
+
issues.push(`source monitoring policy ${policy.policyRef} was checked after evaluation time ${input.evaluatedAt}`);
|
|
1204
|
+
if (policy.monitoringStatus !== AssuranceDocumentSourceMonitoringStatus.CURRENT || policy.nextCheckOn < input.evaluatedAt.slice(0, 10)) {
|
|
1205
|
+
issues.push(`source monitoring policy ${policy.policyRef} is not current at ${input.evaluatedAt}`);
|
|
1206
|
+
}
|
|
1207
|
+
});
|
|
1208
|
+
return issues;
|
|
1209
|
+
};
|
|
1210
|
+
```
|