@wildo-ai/saas-specifications 1.1.7 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/esm/_core/application-specification-family-identity.schemas.d.ts +9 -0
  2. package/dist/esm/_core/application-specification-family-identity.schemas.d.ts.map +1 -1
  3. package/dist/esm/_core/application-specification-family-identity.schemas.js +9 -0
  4. package/dist/esm/_core/application-specification-family-identity.schemas.js.map +1 -1
  5. package/dist/esm/_core/brand/brand-name-choice.d.ts +136 -0
  6. package/dist/esm/_core/brand/brand-name-choice.d.ts.map +1 -0
  7. package/dist/esm/_core/brand/brand-name-choice.js +193 -0
  8. package/dist/esm/_core/brand/brand-name-choice.js.map +1 -0
  9. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.d.ts +108 -0
  10. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.d.ts.map +1 -0
  11. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.js +59 -0
  12. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.js.map +1 -0
  13. package/dist/esm/_core/brand/brand-name-screening-validation.d.ts +51 -0
  14. package/dist/esm/_core/brand/brand-name-screening-validation.d.ts.map +1 -0
  15. package/dist/esm/_core/brand/brand-name-screening-validation.js +157 -0
  16. package/dist/esm/_core/brand/brand-name-screening-validation.js.map +1 -0
  17. package/dist/esm/_core/brand/brand-name-screening-view.d.ts +120 -0
  18. package/dist/esm/_core/brand/brand-name-screening-view.d.ts.map +1 -0
  19. package/dist/esm/_core/brand/brand-name-screening-view.js +47 -0
  20. package/dist/esm/_core/brand/brand-name-screening-view.js.map +1 -0
  21. package/dist/esm/_core/brand/brand-name-screening.family-aspects.d.ts +3 -0
  22. package/dist/esm/_core/brand/brand-name-screening.family-aspects.d.ts.map +1 -0
  23. package/dist/esm/_core/brand/brand-name-screening.family-aspects.js +42 -0
  24. package/dist/esm/_core/brand/brand-name-screening.family-aspects.js.map +1 -0
  25. package/dist/esm/_core/brand/brand-name-screening.schemas.d.ts +310 -0
  26. package/dist/esm/_core/brand/brand-name-screening.schemas.d.ts.map +1 -0
  27. package/dist/esm/_core/brand/brand-name-screening.schemas.js +272 -0
  28. package/dist/esm/_core/brand/brand-name-screening.schemas.js.map +1 -0
  29. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +23 -0
  30. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
  31. package/dist/esm/_core/brand/brand-snapshot.schemas.js +32 -0
  32. package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
  33. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts +10 -0
  34. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
  35. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +57 -0
  36. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
  37. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +89 -0
  38. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
  39. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts +79 -19
  40. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts.map +1 -1
  41. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js +61 -11
  42. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js.map +1 -1
  43. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -1
  44. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +18 -2
  45. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -1
  46. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts +28 -4
  47. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts.map +1 -1
  48. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js +53 -5
  49. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js.map +1 -1
  50. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts +24 -4
  51. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts.map +1 -1
  52. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js +64 -4
  53. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js.map +1 -1
  54. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts +59 -0
  55. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts.map +1 -1
  56. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.js +64 -0
  57. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.js.map +1 -1
  58. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts +3 -0
  59. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts.map +1 -1
  60. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js +16 -0
  61. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js.map +1 -1
  62. package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts +7 -1
  63. package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts.map +1 -1
  64. package/dist/esm/_core/capability-composition/capability-composition-validation.js +34 -28
  65. package/dist/esm/_core/capability-composition/capability-composition-validation.js.map +1 -1
  66. package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts +75 -4
  67. package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts.map +1 -1
  68. package/dist/esm/_core/capability-composition/capability-composition.schemas.js +62 -4
  69. package/dist/esm/_core/capability-composition/capability-composition.schemas.js.map +1 -1
  70. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts.map +1 -1
  71. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js +7 -0
  72. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js.map +1 -1
  73. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts +153 -0
  74. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts.map +1 -0
  75. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js +241 -0
  76. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js.map +1 -0
  77. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.d.ts +8 -1
  78. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.d.ts.map +1 -1
  79. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js +19 -1
  80. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js.map +1 -1
  81. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts +61 -3
  82. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts.map +1 -1
  83. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js +73 -3
  84. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js.map +1 -1
  85. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js +1 -1
  86. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js.map +1 -1
  87. package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts.map +1 -1
  88. package/dist/esm/_core/experience-plan/experience-plan.schemas.js +1 -0
  89. package/dist/esm/_core/experience-plan/experience-plan.schemas.js.map +1 -1
  90. package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -1
  91. package/dist/esm/_core/family-aspects.registry.js +2 -0
  92. package/dist/esm/_core/family-aspects.registry.js.map +1 -1
  93. package/dist/esm/_core/index.d.ts +6 -0
  94. package/dist/esm/_core/index.d.ts.map +1 -1
  95. package/dist/esm/_core/index.js +6 -0
  96. package/dist/esm/_core/index.js.map +1 -1
  97. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.d.ts.map +1 -1
  98. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js +5 -1
  99. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js.map +1 -1
  100. package/dist/esm/_core/market/market-icp.schemas.d.ts +7 -0
  101. package/dist/esm/_core/market/market-icp.schemas.d.ts.map +1 -1
  102. package/dist/esm/_core/market/market-icp.schemas.js +7 -0
  103. package/dist/esm/_core/market/market-icp.schemas.js.map +1 -1
  104. package/dist/esm/_core/market/market-language-coverage.d.ts +62 -0
  105. package/dist/esm/_core/market/market-language-coverage.d.ts.map +1 -0
  106. package/dist/esm/_core/market/market-language-coverage.js +48 -0
  107. package/dist/esm/_core/market/market-language-coverage.js.map +1 -0
  108. package/dist/esm/_core/market/market-snapshot-validation.js +2 -2
  109. package/dist/esm/_core/market/market-snapshot-validation.js.map +1 -1
  110. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts +63 -2
  111. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts.map +1 -1
  112. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js +73 -5
  113. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js.map +1 -1
  114. package/dist/esm/application-creation/application-line.application-creation.schemas.d.ts.map +1 -1
  115. package/dist/esm/application-creation/application-line.application-creation.schemas.js +2 -0
  116. package/dist/esm/application-creation/application-line.application-creation.schemas.js.map +1 -1
  117. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +28 -0
  118. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  119. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +19 -1
  120. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  121. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +1 -0
  122. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
  123. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +1 -0
  124. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
  125. package/dist/esm/application-creation.exports.d.ts +7 -0
  126. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  127. package/dist/esm/application-creation.exports.js +7 -0
  128. package/dist/esm/application-creation.exports.js.map +1 -1
  129. package/dist/esm/assurance/application-risk-signals.derivations.d.ts +20 -0
  130. package/dist/esm/assurance/application-risk-signals.derivations.d.ts.map +1 -1
  131. package/dist/esm/assurance/application-risk-signals.derivations.js +81 -0
  132. package/dist/esm/assurance/application-risk-signals.derivations.js.map +1 -1
  133. package/dist/esm/assurance/governed-document-release.d.ts +9 -0
  134. package/dist/esm/assurance/governed-document-release.d.ts.map +1 -1
  135. package/dist/esm/assurance/governed-document-release.js +9 -0
  136. package/dist/esm/assurance/governed-document-release.js.map +1 -1
  137. package/dist/esm/companion-exports.d.ts +10 -1
  138. package/dist/esm/companion-exports.d.ts.map +1 -1
  139. package/dist/esm/companion-exports.js.map +1 -1
  140. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts +1 -0
  141. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
  142. package/package.json +8 -8
  143. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts +0 -24
  144. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts.map +0 -1
  145. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js +0 -24
  146. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js.map +0 -1
  147. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -38,6 +38,8 @@ import { BusinessModelAuthoredMetadataSchema } from './business-model-authored-m
38
38
  * - **`targetSummary`** — who the plan is for, in prose ("mid-market teams
39
39
  * of 10-50"). Optional. A human summary, distinct from the typed
40
40
  * `targetIcpRefs` cross-reference.
41
+ * - **`proposalBasis`** — on a PROPOSED plan only: what the proposal was
42
+ * derived from (see `PricingTiersStatus` on the snapshot). Optional prose.
41
43
  * - **`targetIcpRefs`** / **`includesRequirementRefs`** — OPTIONAL flat
42
44
  * cross-references into the market family (ICP segments this plan targets)
43
45
  * and the requirements family (functional requirements this plan
@@ -112,6 +114,20 @@ export const PricingPlanConfigSchema = z.object({
112
114
  * Flat opaque strings (see `targetIcpRefs`).
113
115
  */
114
116
  includesRequirementRefs: z.array(NonEmptyStringSchema).optional(),
117
+ /**
118
+ * WHY this tier exists, present only on a PROPOSED plan — the snapshot's
119
+ * `pricingTiers` is `PricingTiersStatus.PROPOSED`, i.e. the creator asked for
120
+ * the tiers to be proposed rather than naming them. Prose naming what the
121
+ * proposal was derived from: the ICP segment it serves and the requirements
122
+ * that separate it from the tier beside it ("serves icp-indie-maker; holds
123
+ * back the team-planning requirements the Team tier unlocks").
124
+ *
125
+ * Required on every plan of a proposed sketch and forbidden on every plan of
126
+ * a stated one (`validateBusinessModelLiteSnapshot` reports both). A basis on
127
+ * a creator-stated plan would claim a proposal nobody made; a proposal with no
128
+ * basis is a tier nobody can check.
129
+ */
130
+ proposalBasis: NonEmptyStringSchema.optional(),
115
131
  /** Optional per-entity authoring provenance. */
116
132
  authored: BusinessModelAuthoredMetadataSchema.optional(),
117
133
  });
@@ -1 +1 @@
1
- {"version":3,"file":"pricing-plan.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/business-model-lite/pricing-plan.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,6GAA6G;AAC7G,+GAA+G;AAC/G,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,mCAAmC,EAAE,MAAM,4CAA4C,CAAC;AAEjG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,gBAWX;AAXD,WAAY,gBAAgB;IAC1B,oDAAoD;IACpD,2CAAuB,CAAA;IACvB,qDAAqD;IACrD,yCAAqB,CAAA;IACrB,oEAAoE;IACpE,2CAAuB,CAAA;IACvB,4EAA4E;IAC5E,qCAAiB,CAAA;IACjB,mDAAmD;IACnD,qCAAiB,CAAA;AACnB,CAAC,EAXW,gBAAgB,KAAhB,gBAAgB,QAW3B;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,yEAAyE;IACzE,GAAG,EAAE,oBAAoB;IACzB,kEAAkE;IAClE,IAAI,EAAE,oBAAoB;IAC1B;;;OAGG;IACH,UAAU,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IAC3C;;;OAGG;IACH,aAAa,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IAC9C,oEAAoE;IACpE,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;IAChF;;;OAGG;IACH,QAAQ,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IACzC;;;OAGG;IACH,aAAa,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IAC9C;;;;OAIG;IACH,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE;IACvD;;;OAGG;IACH,uBAAuB,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE;IACjE,gDAAgD;IAChD,QAAQ,EAAE,mCAAmC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC;AAEH,gEAAgE","sourcesContent":["import { z } from 'zod';\n// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —\n// never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.\nimport '@wildo-ai/zod-decorators';\n\nimport { NonEmptyStringSchema } from '../market/market-references.schemas';\nimport { PricingPlanRefSchema } from './business-model-references.schemas';\nimport { BusinessModelAuthoredMetadataSchema } from './business-model-authored-metadata.schemas';\n\n/**\n * @wildo_source:part:start business-model.pricing-plan.config facet:layer:specification facet:family:business-model\n *\n * One **pricing plan** — a single tier / package in a product's pricing\n * sketch (\"Free\", \"Team Pro\", \"Enterprise\"). A ref-addressable collection\n * entity on `BusinessModelLiteSnapshot` (`pricing-plan-<slug>`), so the\n * top-down catalog can address an individual plan and later refinement can\n * reconcile against it.\n *\n * A pricing plan is a **planning-artifact** concept and is deliberately\n * distinct from the live billing / Stripe product-catalog runtime — the two\n * are NOT merged (framework mindset: each carries its own semantic weight).\n * A plan here is a design-time SKETCH of a package a product intends to\n * sell; the billing catalog is the operational source of truth for what is\n * actually chargeable. This family never becomes the billing runtime.\n *\n * What earns its place here (scaffold depth, Phase J1):\n * - **`ref`** — the spec identity (`pricing-plan-<slug>`), never `id`.\n * - **`name`** — a short human label for the plan (required prose).\n * - **`pricePoint`** — WHAT the plan costs, as FREE PROSE\n * (\"$29 / seat / month\", \"custom\", \"free\"). Optional. Deliberately NOT a\n * typed money value — see the deferral note below.\n * - **`billingPeriod`** — the cadence of the price, as FREE PROSE\n * (\"monthly\", \"annual\", \"one-time\"). Optional prose (not a typed\n * interval).\n * - **`pricingModel`** — coarse `PricingModelAxis` classification of HOW the\n * price scales (flat / per-seat / per-usage / tiered / custom). Optional.\n * - **`includes`** — what the plan bundles, in prose (\"all Team features +\n * SSO + audit log\"). Optional. A human summary, distinct from the typed\n * `includesRequirementRefs` cross-reference.\n * - **`targetSummary`** — who the plan is for, in prose (\"mid-market teams\n * of 10-50\"). Optional. A human summary, distinct from the typed\n * `targetIcpRefs` cross-reference.\n * - **`targetIcpRefs`** / **`includesRequirementRefs`** — OPTIONAL flat\n * cross-references into the market family (ICP segments this plan targets)\n * and the requirements family (functional requirements this plan\n * includes). Opaque strings by the `_core` reference convention — the\n * market / requirements schemas are NOT imported (families stay decoupled;\n * the catalog resolves the refs, and the snapshot validator can cross-check\n * them against a supplied set, fail-soft).\n *\n * Deliberately NOT modelled here (scaffold depth, Phase J1): typed money /\n * currency values, discount / coupon engines, unit economics (LTV / CAC),\n * price elasticity, tiered usage-bracket tables, and revenue forecasting.\n * Those are a Phase-J2 concern — a plan here is a prose-level pricing sketch\n * with a coarse scaling axis, not a computed financial model (framework\n * mindset: breadth before depth, no premature financial taxonomy).\n */\n\n/**\n * Coarse classification of HOW a pricing plan's price scales — the pricing\n * MODEL axis (as distinct from the product-level revenue model, see\n * `RevenueModelKind` on the snapshot). Fixed vocabulary (enum, per project\n * rule — enums over literal unions), covering the common scaling shapes at\n * scaffold depth. `CUSTOM` catches bespoke / \"contact us\" pricing the fixed\n * buckets miss. Optional on a plan.\n */\nexport enum PricingModelAxis {\n /** One fixed price regardless of usage or seats. */\n FLAT_RATE = 'flat_rate',\n /** Price scales with the number of seats / users. */\n PER_SEAT = 'per_seat',\n /** Price scales with metered usage (API calls, storage, events). */\n PER_USAGE = 'per_usage',\n /** Stepped tiers / brackets (price changes at usage or seat thresholds). */\n TIERED = 'tiered',\n /** Bespoke / negotiated / \"contact us\" pricing. */\n CUSTOM = 'custom',\n}\n\nexport const PricingPlanConfigSchema = z.object({\n /** Spec identity — kebab-case, `pricing-plan-` prefixed (never `id`). */\n ref: PricingPlanRefSchema,\n /** Short human label for the plan (e.g. \"Team Pro\"). Required. */\n name: NonEmptyStringSchema,\n /**\n * What the plan costs — FREE PROSE at scaffold depth (\"$29 / seat /\n * month\", \"free\", \"custom\"). A typed money / currency value is Phase-J2.\n */\n pricePoint: NonEmptyStringSchema.optional(),\n /**\n * The billing cadence — FREE PROSE (\"monthly\", \"annual\", \"one-time\"). A\n * typed interval model is Phase-J2.\n */\n billingPeriod: NonEmptyStringSchema.optional(),\n /** Coarse price-scaling classification — see `PricingModelAxis`. */\n pricingModel: z.enum(PricingModelAxis).systemEnum('PricingModelAxis').optional(),\n /**\n * What the plan bundles, in prose (\"all Team features + SSO\"). A human\n * summary — distinct from the typed `includesRequirementRefs`.\n */\n includes: NonEmptyStringSchema.optional(),\n /**\n * Who the plan is for, in prose (\"mid-market teams of 10-50\"). A human\n * summary — distinct from the typed `targetIcpRefs`.\n */\n targetSummary: NonEmptyStringSchema.optional(),\n /**\n * Optional cross-references to market ICP segments this plan targets. Flat\n * opaque strings (the catalog resolves them against the market snapshot;\n * the market schemas are not imported here).\n */\n targetIcpRefs: z.array(NonEmptyStringSchema).optional(),\n /**\n * Optional cross-references to functional requirements this plan includes.\n * Flat opaque strings (see `targetIcpRefs`).\n */\n includesRequirementRefs: z.array(NonEmptyStringSchema).optional(),\n /** Optional per-entity authoring provenance. */\n authored: BusinessModelAuthoredMetadataSchema.optional(),\n});\nexport type PricingPlanConfig = z.infer<typeof PricingPlanConfigSchema>;\n/** @wildo_source:part:end business-model.pricing-plan.config */\n"]}
1
+ {"version":3,"file":"pricing-plan.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/business-model-lite/pricing-plan.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,6GAA6G;AAC7G,+GAA+G;AAC/G,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,mCAAmC,EAAE,MAAM,4CAA4C,CAAC;AAEjG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,gBAWX;AAXD,WAAY,gBAAgB;IAC1B,oDAAoD;IACpD,2CAAuB,CAAA;IACvB,qDAAqD;IACrD,yCAAqB,CAAA;IACrB,oEAAoE;IACpE,2CAAuB,CAAA;IACvB,4EAA4E;IAC5E,qCAAiB,CAAA;IACjB,mDAAmD;IACnD,qCAAiB,CAAA;AACnB,CAAC,EAXW,gBAAgB,KAAhB,gBAAgB,QAW3B;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,yEAAyE;IACzE,GAAG,EAAE,oBAAoB;IACzB,kEAAkE;IAClE,IAAI,EAAE,oBAAoB;IAC1B;;;OAGG;IACH,UAAU,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IAC3C;;;OAGG;IACH,aAAa,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IAC9C,oEAAoE;IACpE,YAAY,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;IAChF;;;OAGG;IACH,QAAQ,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IACzC;;;OAGG;IACH,aAAa,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IAC9C;;;;OAIG;IACH,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE;IACvD;;;OAGG;IACH,uBAAuB,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE;IACjE;;;;;;;;;;;;OAYG;IACH,aAAa,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IAC9C,gDAAgD;IAChD,QAAQ,EAAE,mCAAmC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC;AAEH,gEAAgE","sourcesContent":["import { z } from 'zod';\n// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —\n// never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.\nimport '@wildo-ai/zod-decorators';\n\nimport { NonEmptyStringSchema } from '../market/market-references.schemas';\nimport { PricingPlanRefSchema } from './business-model-references.schemas';\nimport { BusinessModelAuthoredMetadataSchema } from './business-model-authored-metadata.schemas';\n\n/**\n * @wildo_source:part:start business-model.pricing-plan.config facet:layer:specification facet:family:business-model\n *\n * One **pricing plan** — a single tier / package in a product's pricing\n * sketch (\"Free\", \"Team Pro\", \"Enterprise\"). A ref-addressable collection\n * entity on `BusinessModelLiteSnapshot` (`pricing-plan-<slug>`), so the\n * top-down catalog can address an individual plan and later refinement can\n * reconcile against it.\n *\n * A pricing plan is a **planning-artifact** concept and is deliberately\n * distinct from the live billing / Stripe product-catalog runtime — the two\n * are NOT merged (framework mindset: each carries its own semantic weight).\n * A plan here is a design-time SKETCH of a package a product intends to\n * sell; the billing catalog is the operational source of truth for what is\n * actually chargeable. This family never becomes the billing runtime.\n *\n * What earns its place here (scaffold depth, Phase J1):\n * - **`ref`** — the spec identity (`pricing-plan-<slug>`), never `id`.\n * - **`name`** — a short human label for the plan (required prose).\n * - **`pricePoint`** — WHAT the plan costs, as FREE PROSE\n * (\"$29 / seat / month\", \"custom\", \"free\"). Optional. Deliberately NOT a\n * typed money value — see the deferral note below.\n * - **`billingPeriod`** — the cadence of the price, as FREE PROSE\n * (\"monthly\", \"annual\", \"one-time\"). Optional prose (not a typed\n * interval).\n * - **`pricingModel`** — coarse `PricingModelAxis` classification of HOW the\n * price scales (flat / per-seat / per-usage / tiered / custom). Optional.\n * - **`includes`** — what the plan bundles, in prose (\"all Team features +\n * SSO + audit log\"). Optional. A human summary, distinct from the typed\n * `includesRequirementRefs` cross-reference.\n * - **`targetSummary`** — who the plan is for, in prose (\"mid-market teams\n * of 10-50\"). Optional. A human summary, distinct from the typed\n * `targetIcpRefs` cross-reference.\n * - **`proposalBasis`** — on a PROPOSED plan only: what the proposal was\n * derived from (see `PricingTiersStatus` on the snapshot). Optional prose.\n * - **`targetIcpRefs`** / **`includesRequirementRefs`** — OPTIONAL flat\n * cross-references into the market family (ICP segments this plan targets)\n * and the requirements family (functional requirements this plan\n * includes). Opaque strings by the `_core` reference convention — the\n * market / requirements schemas are NOT imported (families stay decoupled;\n * the catalog resolves the refs, and the snapshot validator can cross-check\n * them against a supplied set, fail-soft).\n *\n * Deliberately NOT modelled here (scaffold depth, Phase J1): typed money /\n * currency values, discount / coupon engines, unit economics (LTV / CAC),\n * price elasticity, tiered usage-bracket tables, and revenue forecasting.\n * Those are a Phase-J2 concern — a plan here is a prose-level pricing sketch\n * with a coarse scaling axis, not a computed financial model (framework\n * mindset: breadth before depth, no premature financial taxonomy).\n */\n\n/**\n * Coarse classification of HOW a pricing plan's price scales — the pricing\n * MODEL axis (as distinct from the product-level revenue model, see\n * `RevenueModelKind` on the snapshot). Fixed vocabulary (enum, per project\n * rule — enums over literal unions), covering the common scaling shapes at\n * scaffold depth. `CUSTOM` catches bespoke / \"contact us\" pricing the fixed\n * buckets miss. Optional on a plan.\n */\nexport enum PricingModelAxis {\n /** One fixed price regardless of usage or seats. */\n FLAT_RATE = 'flat_rate',\n /** Price scales with the number of seats / users. */\n PER_SEAT = 'per_seat',\n /** Price scales with metered usage (API calls, storage, events). */\n PER_USAGE = 'per_usage',\n /** Stepped tiers / brackets (price changes at usage or seat thresholds). */\n TIERED = 'tiered',\n /** Bespoke / negotiated / \"contact us\" pricing. */\n CUSTOM = 'custom',\n}\n\nexport const PricingPlanConfigSchema = z.object({\n /** Spec identity — kebab-case, `pricing-plan-` prefixed (never `id`). */\n ref: PricingPlanRefSchema,\n /** Short human label for the plan (e.g. \"Team Pro\"). Required. */\n name: NonEmptyStringSchema,\n /**\n * What the plan costs — FREE PROSE at scaffold depth (\"$29 / seat /\n * month\", \"free\", \"custom\"). A typed money / currency value is Phase-J2.\n */\n pricePoint: NonEmptyStringSchema.optional(),\n /**\n * The billing cadence — FREE PROSE (\"monthly\", \"annual\", \"one-time\"). A\n * typed interval model is Phase-J2.\n */\n billingPeriod: NonEmptyStringSchema.optional(),\n /** Coarse price-scaling classification — see `PricingModelAxis`. */\n pricingModel: z.enum(PricingModelAxis).systemEnum('PricingModelAxis').optional(),\n /**\n * What the plan bundles, in prose (\"all Team features + SSO\"). A human\n * summary — distinct from the typed `includesRequirementRefs`.\n */\n includes: NonEmptyStringSchema.optional(),\n /**\n * Who the plan is for, in prose (\"mid-market teams of 10-50\"). A human\n * summary — distinct from the typed `targetIcpRefs`.\n */\n targetSummary: NonEmptyStringSchema.optional(),\n /**\n * Optional cross-references to market ICP segments this plan targets. Flat\n * opaque strings (the catalog resolves them against the market snapshot;\n * the market schemas are not imported here).\n */\n targetIcpRefs: z.array(NonEmptyStringSchema).optional(),\n /**\n * Optional cross-references to functional requirements this plan includes.\n * Flat opaque strings (see `targetIcpRefs`).\n */\n includesRequirementRefs: z.array(NonEmptyStringSchema).optional(),\n /**\n * WHY this tier exists, present only on a PROPOSED plan — the snapshot's\n * `pricingTiers` is `PricingTiersStatus.PROPOSED`, i.e. the creator asked for\n * the tiers to be proposed rather than naming them. Prose naming what the\n * proposal was derived from: the ICP segment it serves and the requirements\n * that separate it from the tier beside it (\"serves icp-indie-maker; holds\n * back the team-planning requirements the Team tier unlocks\").\n *\n * Required on every plan of a proposed sketch and forbidden on every plan of\n * a stated one (`validateBusinessModelLiteSnapshot` reports both). A basis on\n * a creator-stated plan would claim a proposal nobody made; a proposal with no\n * basis is a tier nobody can check.\n */\n proposalBasis: NonEmptyStringSchema.optional(),\n /** Optional per-entity authoring provenance. */\n authored: BusinessModelAuthoredMetadataSchema.optional(),\n});\nexport type PricingPlanConfig = z.infer<typeof PricingPlanConfigSchema>;\n/** @wildo_source:part:end business-model.pricing-plan.config */\n"]}
@@ -6,7 +6,13 @@ export declare enum CapabilityCompositionFindingCode {
6
6
  /** One scenario decided twice; the two decisions could contradict each other. */
7
7
  DUPLICATE_SCENARIO_DECISION = "DUPLICATE_SCENARIO_DECISION",
8
8
  /** A disposition whose basis says something else — OWNED without an owner, DECLINED on a basis that implies need. */
9
- DISPOSITION_BASIS_MISMATCH = "DISPOSITION_BASIS_MISMATCH"
9
+ DISPOSITION_BASIS_MISMATCH = "DISPOSITION_BASIS_MISMATCH",
10
+ /**
11
+ * `locales` is wrong for the decision carrying it: a NEEDED `add-locale` that names no language (the
12
+ * foundation would compose nothing while the record says a locale is needed), or `locales` on any other
13
+ * decision (a value nothing reads, which reads as a decision nobody took).
14
+ */
15
+ LOCALES_MISPLACED = "LOCALES_MISPLACED"
10
16
  }
11
17
  export interface CapabilityCompositionFinding {
12
18
  readonly code: CapabilityCompositionFindingCode;
@@ -1 +1 @@
1
- {"version":3,"file":"capability-composition-validation.d.ts","sourceRoot":"","sources":["../../../../../src/_core/capability-composition/capability-composition-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,sBAAsB,EACtB,KAAK,qBAAqB,EAC3B,MAAM,kCAAkC,CAAC;AAE1C,iGAAiG;AACjG,oBAAY,gCAAgC;IAC1C,yGAAyG;IACzG,oBAAoB,yBAAyB;IAC7C,iFAAiF;IACjF,2BAA2B,gCAAgC;IAC3D,qHAAqH;IACrH,0BAA0B,+BAA+B;CAC1D;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,IAAI,EAAE,gCAAgC,CAAC;IAChD,QAAQ,CAAC,WAAW,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAkBD;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,WAAW,EAAE,qBAAqB,GAAG,SAAS,4BAA4B,EAAE,CAyDzH"}
1
+ {"version":3,"file":"capability-composition-validation.d.ts","sourceRoot":"","sources":["../../../../../src/_core/capability-composition/capability-composition-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,sBAAsB,EACtB,KAAK,qBAAqB,EAC3B,MAAM,kCAAkC,CAAC;AAE1C,iGAAiG;AACjG,oBAAY,gCAAgC;IAC1C,yGAAyG;IACzG,oBAAoB,yBAAyB;IAC7C,iFAAiF;IACjF,2BAA2B,gCAAgC;IAC3D,qHAAqH;IACrH,0BAA0B,+BAA+B;IACzD;;;;OAIG;IACH,iBAAiB,sBAAsB;CACxC;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,IAAI,EAAE,gCAAgC,CAAC;IAChD,QAAQ,CAAC,WAAW,EAAE,sBAAsB,GAAG,IAAI,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,WAAW,EAAE,qBAAqB,GAAG,SAAS,4BAA4B,EAAE,CAuEzH"}
@@ -1,4 +1,4 @@
1
- import { CompositionBasis, CompositionDisposition, CompositionScenarioRef, } from './capability-composition.schemas.js';
1
+ import { COMPOSITION_BASIS_DISPOSITION, CompositionBasis, CompositionDisposition, CompositionScenarioRef, } from './capability-composition.schemas.js';
2
2
  /** Deterministic finding over a capability composition; coherence beyond structural validity. */
3
3
  export var CapabilityCompositionFindingCode;
4
4
  (function (CapabilityCompositionFindingCode) {
@@ -8,21 +8,13 @@ export var CapabilityCompositionFindingCode;
8
8
  CapabilityCompositionFindingCode["DUPLICATE_SCENARIO_DECISION"] = "DUPLICATE_SCENARIO_DECISION";
9
9
  /** A disposition whose basis says something else — OWNED without an owner, DECLINED on a basis that implies need. */
10
10
  CapabilityCompositionFindingCode["DISPOSITION_BASIS_MISMATCH"] = "DISPOSITION_BASIS_MISMATCH";
11
+ /**
12
+ * `locales` is wrong for the decision carrying it: a NEEDED `add-locale` that names no language (the
13
+ * foundation would compose nothing while the record says a locale is needed), or `locales` on any other
14
+ * decision (a value nothing reads, which reads as a decision nobody took).
15
+ */
16
+ CapabilityCompositionFindingCode["LOCALES_MISPLACED"] = "LOCALES_MISPLACED";
11
17
  })(CapabilityCompositionFindingCode || (CapabilityCompositionFindingCode = {}));
12
- /** The bases that mean "another step owns it" — the only ones an OWNED_BY_ANOTHER_STEP decision may carry. */
13
- const OWNERSHIP_BASES = new Set([
14
- CompositionBasis.DOMAIN_PLAN_OWNS_MODULES_AND_RESOURCES,
15
- CompositionBasis.BUILD_TASKS_OWN_PER_ARTIFACT_SCENARIOS,
16
- CompositionBasis.PROVIDER_DECISION_OWNS_PROVIDERS,
17
- CompositionBasis.DEPLOYMENT_OWNS_ENVIRONMENTS,
18
- CompositionBasis.INTEGRATION_PLAN_OWNS_WORKERS_AND_MINIONS,
19
- CompositionBasis.OPERATOR_OPTS_INTO_OPTIONAL_LAYOUT,
20
- ]);
21
- /** The bases that mean "declined" — the only ones a DECLINED decision may carry. */
22
- const DECLINE_BASES = new Set([
23
- CompositionBasis.NO_DECLARATION_IMPLIES_IT,
24
- CompositionBasis.NO_DECLARATION_DECIDES_IT,
25
- ]);
26
18
  /**
27
19
  * Every finding over a composition. Total over {@link CompositionScenarioRef}: a scenario the framework
28
20
  * ships and the record never decided about is reported by name, which is what makes the record a
@@ -40,35 +32,49 @@ export function validateCapabilityComposition(composition) {
40
32
  });
41
33
  }
42
34
  seen.add(decision.scenarioRef);
43
- const ownershipBasis = OWNERSHIP_BASES.has(decision.basis);
44
- const declineBasis = DECLINE_BASES.has(decision.basis);
35
+ /*
36
+ * The pairing is read off ONE table, `COMPOSITION_BASIS_DISPOSITION`, which the derivation's typed
37
+ * constructors also read — so the producer and this check cannot disagree about what a basis means.
38
+ */
39
+ const basisDisposition = COMPOSITION_BASIS_DISPOSITION[decision.basis];
40
+ if (basisDisposition !== decision.disposition) {
41
+ findings.push({
42
+ code: CapabilityCompositionFindingCode.DISPOSITION_BASIS_MISMATCH,
43
+ scenarioRef: decision.scenarioRef,
44
+ message: `${decision.scenarioRef} is ${decision.disposition} but carries basis ${decision.basis}, which justifies ${basisDisposition}.`,
45
+ });
46
+ continue;
47
+ }
48
+ const localeDecisionNeeded = decision.scenarioRef === CompositionScenarioRef.ADD_LOCALE && decision.disposition === CompositionDisposition.NEEDED;
49
+ if (localeDecisionNeeded ? (decision.locales ?? []).length === 0 : decision.locales !== undefined) {
50
+ findings.push({
51
+ code: CapabilityCompositionFindingCode.LOCALES_MISPLACED,
52
+ scenarioRef: decision.scenarioRef,
53
+ message: localeDecisionNeeded
54
+ ? `${decision.scenarioRef} is NEEDED but names no locale to publish.`
55
+ : `${decision.scenarioRef} is ${decision.disposition} and carries locales, which only a NEEDED add-locale decides.`,
56
+ });
57
+ }
45
58
  switch (decision.disposition) {
46
59
  case CompositionDisposition.OWNED_BY_ANOTHER_STEP:
47
- if (!ownershipBasis || decision.ownedBy === undefined) {
60
+ if (decision.ownedBy === undefined) {
48
61
  findings.push({
49
62
  code: CapabilityCompositionFindingCode.DISPOSITION_BASIS_MISMATCH,
50
63
  scenarioRef: decision.scenarioRef,
51
- message: `${decision.scenarioRef} is OWNED_BY_ANOTHER_STEP but ${ownershipBasis ? 'names no owner' : `carries basis ${decision.basis}, which names no owner`}.`,
64
+ message: `${decision.scenarioRef} is OWNED_BY_ANOTHER_STEP but names no owner.`,
52
65
  });
53
66
  }
54
67
  break;
55
68
  case CompositionDisposition.DECLINED:
56
- if (!declineBasis || (decision.basis === CompositionBasis.NO_DECLARATION_DECIDES_IT && decision.missingDeclaration === undefined)) {
69
+ if (decision.basis === CompositionBasis.NO_DECLARATION_DECIDES_IT && decision.missingDeclaration === undefined) {
57
70
  findings.push({
58
71
  code: CapabilityCompositionFindingCode.DISPOSITION_BASIS_MISMATCH,
59
72
  scenarioRef: decision.scenarioRef,
60
- message: `${decision.scenarioRef} is DECLINED but ${declineBasis ? 'names no missing declaration' : `carries basis ${decision.basis}, which implies a need`}.`,
73
+ message: `${decision.scenarioRef} is DECLINED on ${decision.basis} but names no missing declaration.`,
61
74
  });
62
75
  }
63
76
  break;
64
77
  case CompositionDisposition.NEEDED:
65
- if (ownershipBasis || declineBasis) {
66
- findings.push({
67
- code: CapabilityCompositionFindingCode.DISPOSITION_BASIS_MISMATCH,
68
- scenarioRef: decision.scenarioRef,
69
- message: `${decision.scenarioRef} is NEEDED on basis ${decision.basis}, which does not name a declaration implying it.`,
70
- });
71
- }
72
78
  break;
73
79
  default: {
74
80
  const unhandled = decision.disposition;
@@ -1 +1 @@
1
- {"version":3,"file":"capability-composition-validation.js","sourceRoot":"","sources":["../../../../../src/_core/capability-composition/capability-composition-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,GAEvB,MAAM,kCAAkC,CAAC;AAE1C,iGAAiG;AACjG,MAAM,CAAN,IAAY,gCAOX;AAPD,WAAY,gCAAgC;IAC1C,yGAAyG;IACzG,iFAA6C,CAAA;IAC7C,iFAA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,CAAC,CAAC;gBACR,MAAM,SAAS,GAAU,QAAQ,CAAC,WAAW,CAAC;gBAC9C,MAAM,IAAI,KAAK,CAAC,qCAAqC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YAC7E,CAAC;QACH,CAAC;IACH,CAAC;IACD,KAAK,MAAM,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,EAAE,CAAC;QAChE,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC;YAAE,SAAS;QACpC,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,gCAAgC,CAAC,oBAAoB;YAC3D,WAAW;YACX,OAAO,EAAE,GAAG,WAAW,iFAAiF;SACzG,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import {\n CompositionBasis,\n CompositionDisposition,\n CompositionScenarioRef,\n type CapabilityComposition,\n} from './capability-composition.schemas';\n\n/** Deterministic finding over a capability composition; coherence beyond structural validity. */\nexport enum CapabilityCompositionFindingCode {\n /** A scenario the framework ships that the composition never decided about — the record is not total. */\n SCENARIO_NOT_DECIDED = 'SCENARIO_NOT_DECIDED',\n /** One scenario decided twice; the two decisions could contradict each other. */\n DUPLICATE_SCENARIO_DECISION = 'DUPLICATE_SCENARIO_DECISION',\n /** A disposition whose basis says something else — OWNED without an owner, DECLINED on a basis that implies need. */\n DISPOSITION_BASIS_MISMATCH = 'DISPOSITION_BASIS_MISMATCH',\n}\n\nexport interface CapabilityCompositionFinding {\n readonly code: CapabilityCompositionFindingCode;\n readonly scenarioRef: CompositionScenarioRef | null;\n readonly message: string;\n}\n\n/** The bases that mean \"another step owns it\" — the only ones an OWNED_BY_ANOTHER_STEP decision may carry. */\nconst OWNERSHIP_BASES: ReadonlySet<CompositionBasis> = new Set([\n CompositionBasis.DOMAIN_PLAN_OWNS_MODULES_AND_RESOURCES,\n CompositionBasis.BUILD_TASKS_OWN_PER_ARTIFACT_SCENARIOS,\n CompositionBasis.PROVIDER_DECISION_OWNS_PROVIDERS,\n CompositionBasis.DEPLOYMENT_OWNS_ENVIRONMENTS,\n CompositionBasis.INTEGRATION_PLAN_OWNS_WORKERS_AND_MINIONS,\n CompositionBasis.OPERATOR_OPTS_INTO_OPTIONAL_LAYOUT,\n]);\n\n/** The bases that mean \"declined\" — the only ones a DECLINED decision may carry. */\nconst DECLINE_BASES: ReadonlySet<CompositionBasis> = new Set([\n CompositionBasis.NO_DECLARATION_IMPLIES_IT,\n CompositionBasis.NO_DECLARATION_DECIDES_IT,\n]);\n\n/**\n * Every finding over a composition. Total over {@link CompositionScenarioRef}: a scenario the framework\n * ships and the record never decided about is reported by name, which is what makes the record a\n * measurement rather than a list.\n */\nexport function validateCapabilityComposition(composition: CapabilityComposition): readonly CapabilityCompositionFinding[] {\n const findings: CapabilityCompositionFinding[] = [];\n const seen = new Set<CompositionScenarioRef>();\n for (const decision of composition.scenarioDecisions) {\n if (seen.has(decision.scenarioRef)) {\n findings.push({\n code: CapabilityCompositionFindingCode.DUPLICATE_SCENARIO_DECISION,\n scenarioRef: decision.scenarioRef,\n message: `${decision.scenarioRef} is decided more than once.`,\n });\n }\n seen.add(decision.scenarioRef);\n const ownershipBasis = OWNERSHIP_BASES.has(decision.basis);\n const declineBasis = DECLINE_BASES.has(decision.basis);\n switch (decision.disposition) {\n case CompositionDisposition.OWNED_BY_ANOTHER_STEP:\n if (!ownershipBasis || decision.ownedBy === undefined) {\n findings.push({\n code: CapabilityCompositionFindingCode.DISPOSITION_BASIS_MISMATCH,\n scenarioRef: decision.scenarioRef,\n message: `${decision.scenarioRef} is OWNED_BY_ANOTHER_STEP but ${ownershipBasis ? 'names no owner' : `carries basis ${decision.basis}, which names no owner`}.`,\n });\n }\n break;\n case CompositionDisposition.DECLINED:\n if (!declineBasis || (decision.basis === CompositionBasis.NO_DECLARATION_DECIDES_IT && decision.missingDeclaration === undefined)) {\n findings.push({\n code: CapabilityCompositionFindingCode.DISPOSITION_BASIS_MISMATCH,\n scenarioRef: decision.scenarioRef,\n message: `${decision.scenarioRef} is DECLINED but ${declineBasis ? 'names no missing declaration' : `carries basis ${decision.basis}, which implies a need`}.`,\n });\n }\n break;\n case CompositionDisposition.NEEDED:\n if (ownershipBasis || declineBasis) {\n findings.push({\n code: CapabilityCompositionFindingCode.DISPOSITION_BASIS_MISMATCH,\n scenarioRef: decision.scenarioRef,\n message: `${decision.scenarioRef} is NEEDED on basis ${decision.basis}, which does not name a declaration implying it.`,\n });\n }\n break;\n default: {\n const unhandled: never = decision.disposition;\n throw new Error(`Unhandled composition disposition ${String(unhandled)}.`);\n }\n }\n }\n for (const scenarioRef of Object.values(CompositionScenarioRef)) {\n if (seen.has(scenarioRef)) continue;\n findings.push({\n code: CapabilityCompositionFindingCode.SCENARIO_NOT_DECIDED,\n scenarioRef,\n message: `${scenarioRef} is a scenario the framework ships and this composition never decided about it.`,\n });\n }\n return findings;\n}\n"]}
1
+ {"version":3,"file":"capability-composition-validation.js","sourceRoot":"","sources":["../../../../../src/_core/capability-composition/capability-composition-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,GAEvB,MAAM,kCAAkC,CAAC;AAE1C,iGAAiG;AACjG,MAAM,CAAN,IAAY,gCAaX;AAbD,WAAY,gCAAgC;IAC1C,yGAAyG;IACzG,iFAA6C,CAAA;IAC7C,iFAAiF;IACjF,+FAA2D,CAAA;IAC3D,qHAAqH;IACrH,6FAAyD,CAAA;IACzD;;;;OAIG;IACH,2EAAuC,CAAA;AACzC,CAAC,EAbW,gCAAgC,KAAhC,gCAAgC,QAa3C;AAQD;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAAC,WAAkC;IAC9E,MAAM,QAAQ,GAAmC,EAAE,CAAC;IACpD,MAAM,IAAI,GAAG,IAAI,GAAG,EAA0B,CAAC;IAC/C,KAAK,MAAM,QAAQ,IAAI,WAAW,CAAC,iBAAiB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AS;QACpC,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,gCAAgC,CAAC,oBAAoB;YAC3D,WAAW;YACX,OAAO,EAAE,GAAG,WAAW,iFAAiF;SACzG,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import {\n COMPOSITION_BASIS_DISPOSITION,\n CompositionBasis,\n CompositionDisposition,\n CompositionScenarioRef,\n type CapabilityComposition,\n} from './capability-composition.schemas';\n\n/** Deterministic finding over a capability composition; coherence beyond structural validity. */\nexport enum CapabilityCompositionFindingCode {\n /** A scenario the framework ships that the composition never decided about — the record is not total. */\n SCENARIO_NOT_DECIDED = 'SCENARIO_NOT_DECIDED',\n /** One scenario decided twice; the two decisions could contradict each other. */\n DUPLICATE_SCENARIO_DECISION = 'DUPLICATE_SCENARIO_DECISION',\n /** A disposition whose basis says something else — OWNED without an owner, DECLINED on a basis that implies need. */\n DISPOSITION_BASIS_MISMATCH = 'DISPOSITION_BASIS_MISMATCH',\n /**\n * `locales` is wrong for the decision carrying it: a NEEDED `add-locale` that names no language (the\n * foundation would compose nothing while the record says a locale is needed), or `locales` on any other\n * decision (a value nothing reads, which reads as a decision nobody took).\n */\n LOCALES_MISPLACED = 'LOCALES_MISPLACED',\n}\n\nexport interface CapabilityCompositionFinding {\n readonly code: CapabilityCompositionFindingCode;\n readonly scenarioRef: CompositionScenarioRef | null;\n readonly message: string;\n}\n\n/**\n * Every finding over a composition. Total over {@link CompositionScenarioRef}: a scenario the framework\n * ships and the record never decided about is reported by name, which is what makes the record a\n * measurement rather than a list.\n */\nexport function validateCapabilityComposition(composition: CapabilityComposition): readonly CapabilityCompositionFinding[] {\n const findings: CapabilityCompositionFinding[] = [];\n const seen = new Set<CompositionScenarioRef>();\n for (const decision of composition.scenarioDecisions) {\n if (seen.has(decision.scenarioRef)) {\n findings.push({\n code: CapabilityCompositionFindingCode.DUPLICATE_SCENARIO_DECISION,\n scenarioRef: decision.scenarioRef,\n message: `${decision.scenarioRef} is decided more than once.`,\n });\n }\n seen.add(decision.scenarioRef);\n /*\n * The pairing is read off ONE table, `COMPOSITION_BASIS_DISPOSITION`, which the derivation's typed\n * constructors also read — so the producer and this check cannot disagree about what a basis means.\n */\n const basisDisposition = COMPOSITION_BASIS_DISPOSITION[decision.basis];\n if (basisDisposition !== decision.disposition) {\n findings.push({\n code: CapabilityCompositionFindingCode.DISPOSITION_BASIS_MISMATCH,\n scenarioRef: decision.scenarioRef,\n message: `${decision.scenarioRef} is ${decision.disposition} but carries basis ${decision.basis}, which justifies ${basisDisposition}.`,\n });\n continue;\n }\n const localeDecisionNeeded = decision.scenarioRef === CompositionScenarioRef.ADD_LOCALE && decision.disposition === CompositionDisposition.NEEDED;\n if (localeDecisionNeeded ? (decision.locales ?? []).length === 0 : decision.locales !== undefined) {\n findings.push({\n code: CapabilityCompositionFindingCode.LOCALES_MISPLACED,\n scenarioRef: decision.scenarioRef,\n message: localeDecisionNeeded\n ? `${decision.scenarioRef} is NEEDED but names no locale to publish.`\n : `${decision.scenarioRef} is ${decision.disposition} and carries locales, which only a NEEDED add-locale decides.`,\n });\n }\n switch (decision.disposition) {\n case CompositionDisposition.OWNED_BY_ANOTHER_STEP:\n if (decision.ownedBy === undefined) {\n findings.push({\n code: CapabilityCompositionFindingCode.DISPOSITION_BASIS_MISMATCH,\n scenarioRef: decision.scenarioRef,\n message: `${decision.scenarioRef} is OWNED_BY_ANOTHER_STEP but names no owner.`,\n });\n }\n break;\n case CompositionDisposition.DECLINED:\n if (decision.basis === CompositionBasis.NO_DECLARATION_DECIDES_IT && decision.missingDeclaration === undefined) {\n findings.push({\n code: CapabilityCompositionFindingCode.DISPOSITION_BASIS_MISMATCH,\n scenarioRef: decision.scenarioRef,\n message: `${decision.scenarioRef} is DECLINED on ${decision.basis} but names no missing declaration.`,\n });\n }\n break;\n case CompositionDisposition.NEEDED:\n break;\n default: {\n const unhandled: never = decision.disposition;\n throw new Error(`Unhandled composition disposition ${String(unhandled)}.`);\n }\n }\n }\n for (const scenarioRef of Object.values(CompositionScenarioRef)) {\n if (seen.has(scenarioRef)) continue;\n findings.push({\n code: CapabilityCompositionFindingCode.SCENARIO_NOT_DECIDED,\n scenarioRef,\n message: `${scenarioRef} is a scenario the framework ships and this composition never decided about it.`,\n });\n }\n return findings;\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import '@wildo-ai/zod-decorators';
3
+ import { AvailableLanguage } from '@wildo-ai/presets-components-models';
3
4
  /**
4
5
  * @wildo_source:part:start capability-composition.config facet:layer:specification facet:family:capability-composition
5
6
  *
@@ -104,12 +105,28 @@ export declare enum CompositionBasis {
104
105
  */
105
106
  INTEGRATION_PLAN_OWNS_WORKERS_AND_MINIONS = "INTEGRATION_PLAN_OWNS_WORKERS_AND_MINIONS",
106
107
  /**
107
- * The application's configuration declares the languages it serves (`appPreferences.languages`), and
108
- * that decides whether its website is published in more than one locale. A HOST fact rather than a
109
- * family: no specification family declares languages, and the configuration already does, so asking
110
- * anyone would re-state it.
108
+ * The application's configuration declares MORE THAN ONE language (`appPreferences.languages`), so its
109
+ * website is published in a locale for each beyond the primary. A HOST fact rather than a family: no
110
+ * specification family declares languages, and the configuration already does, so asking anyone would
111
+ * re-state it.
112
+ *
113
+ * A NEED basis only. A one-language configuration implies no second locale, and that is
114
+ * {@link CompositionBasis.NO_DECLARATION_IMPLIES_IT} — the configuration was read and implies nothing.
115
+ * Until 2026-10-01 the derivation used this basis for both answers, and the validator refused every
116
+ * one-language application on its first run.
111
117
  */
112
118
  APPLICATION_CONFIG_DECLARES_LANGUAGES = "APPLICATION_CONFIG_DECLARES_LANGUAGES",
119
+ /**
120
+ * The market snapshot targets countries (a CORE or EXPANSION ICP's geographies) whose languages the
121
+ * application's configuration does not serve, so the website needs a locale for each — named in the
122
+ * decision's detail. Derived by `measureMarketLanguageCoverage`, never asked: both halves are typed
123
+ * declarations (ISO country codes on the ICPs, `appPreferences.languages` in the configuration).
124
+ *
125
+ * Takes precedence over {@link CompositionBasis.APPLICATION_CONFIG_DECLARES_LANGUAGES} when both hold,
126
+ * because it is the one that names a gap: the configuration and the market disagree, and the coherence
127
+ * report says so as well.
128
+ */
129
+ MARKET_TARGETS_UNSERVED_LANGUAGES = "MARKET_TARGETS_UNSERVED_LANGUAGES",
113
130
  /**
114
131
  * An optional LAYOUT library (the 3D layout, #1827) is the operator's opt-in. Nothing in a product definition
115
132
  * decides a rendering style: most applications are 2D, and one becomes 3D because its operator composes it —
@@ -121,6 +138,42 @@ export declare enum CompositionBasis {
121
138
  /** No typed declaration exists yet that could decide it; `missingDeclaration` names the one that would. */
122
139
  NO_DECLARATION_DECIDES_IT = "NO_DECLARATION_DECIDES_IT"
123
140
  }
141
+ /**
142
+ * The ONE disposition each basis can justify. Total over {@link CompositionBasis}, so a basis added
143
+ * tomorrow does not compile until somebody says which disposition it supports.
144
+ *
145
+ * A basis is a REASON, and a reason points one way: "the domain plan owns modules" cannot justify
146
+ * NEEDED, "no declaration implies it" cannot justify NEEDED, "the market declares an inbound web
147
+ * channel" cannot justify DECLINED. `validateCapabilityComposition` refuses any decision whose basis
148
+ * this table maps elsewhere, and the derivation's constructors are typed by {@link CompositionBasisFor},
149
+ * so the producer cannot even write the pairing the validator refuses.
150
+ *
151
+ * It exists because the pairing used to live in the validator only, as two hand-kept sets, while the
152
+ * derivation wrote whatever pair it chose. On 2026-10-01 it wrote DECLINED with
153
+ * `APPLICATION_CONFIG_DECLARES_LANGUAGES` for every one-language application; nothing stopped it until
154
+ * the landing refused the record, on a real first run.
155
+ */
156
+ export declare const COMPOSITION_BASIS_DISPOSITION: {
157
+ readonly MARKET_DECLARES_INBOUND_WEB_CHANNEL: CompositionDisposition.NEEDED;
158
+ readonly BRAND_BRIEF_LANDED: CompositionDisposition.NEEDED;
159
+ readonly BUSINESS_MODEL_DECLARES_PRICING_PLANS: CompositionDisposition.NEEDED;
160
+ readonly MARKET_TARGETS_LEGAL_ENTITIES: CompositionDisposition.NEEDED;
161
+ readonly REQUIREMENTS_DECLARE_PORTABILITY: CompositionDisposition.NEEDED;
162
+ readonly APPLICATION_CONFIG_DECLARES_LANGUAGES: CompositionDisposition.NEEDED;
163
+ readonly MARKET_TARGETS_UNSERVED_LANGUAGES: CompositionDisposition.NEEDED;
164
+ readonly DOMAIN_PLAN_OWNS_MODULES_AND_RESOURCES: CompositionDisposition.OWNED_BY_ANOTHER_STEP;
165
+ readonly BUILD_TASKS_OWN_PER_ARTIFACT_SCENARIOS: CompositionDisposition.OWNED_BY_ANOTHER_STEP;
166
+ readonly PROVIDER_DECISION_OWNS_PROVIDERS: CompositionDisposition.OWNED_BY_ANOTHER_STEP;
167
+ readonly DEPLOYMENT_OWNS_ENVIRONMENTS: CompositionDisposition.OWNED_BY_ANOTHER_STEP;
168
+ readonly INTEGRATION_PLAN_OWNS_WORKERS_AND_MINIONS: CompositionDisposition.OWNED_BY_ANOTHER_STEP;
169
+ readonly OPERATOR_OPTS_INTO_OPTIONAL_LAYOUT: CompositionDisposition.OWNED_BY_ANOTHER_STEP;
170
+ readonly NO_DECLARATION_IMPLIES_IT: CompositionDisposition.DECLINED;
171
+ readonly NO_DECLARATION_DECIDES_IT: CompositionDisposition.DECLINED;
172
+ };
173
+ /** The bases that can justify disposition `D` — what a typed decision constructor accepts. */
174
+ export type CompositionBasisFor<D extends CompositionDisposition> = {
175
+ [B in CompositionBasis]: (typeof COMPOSITION_BASIS_DISPOSITION)[B] extends D ? B : never;
176
+ }[CompositionBasis];
124
177
  /** One scenario's decision, with the declaration it was read from. */
125
178
  export declare const CompositionDecisionSchema: z.ZodObject<{
126
179
  scenarioRef: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof CompositionScenarioRef>>;
@@ -132,6 +185,15 @@ export declare const CompositionDecisionSchema: z.ZodObject<{
132
185
  ownedBy: z.ZodOptional<z.ZodString>;
133
186
  /** For NO_DECLARATION_DECIDES_IT: the typed declaration that would decide it, so the gap is a named field rather than a question. */
134
187
  missingDeclaration: z.ZodOptional<z.ZodString>;
188
+ /**
189
+ * For a NEEDED `add-locale`: the languages the website publishes a locale for, beyond its primary.
190
+ *
191
+ * Carried on the decision so the foundation APPLIES what was decided instead of deciding it again.
192
+ * Before the market could decide a locale, the foundation re-read the configuration's languages and
193
+ * that was the same answer; once a market language the configuration does not serve can make a
194
+ * locale NEEDED, only the decision knows the full set.
195
+ */
196
+ locales: z.ZodOptional<z.ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof AvailableLanguage>>>>;
135
197
  }, z.core.$strict>;
136
198
  export type CompositionDecision = z.infer<typeof CompositionDecisionSchema>;
137
199
  /**
@@ -153,6 +215,15 @@ export declare const CapabilityCompositionSchema: z.ZodObject<{
153
215
  ownedBy: z.ZodOptional<z.ZodString>;
154
216
  /** For NO_DECLARATION_DECIDES_IT: the typed declaration that would decide it, so the gap is a named field rather than a question. */
155
217
  missingDeclaration: z.ZodOptional<z.ZodString>;
218
+ /**
219
+ * For a NEEDED `add-locale`: the languages the website publishes a locale for, beyond its primary.
220
+ *
221
+ * Carried on the decision so the foundation APPLIES what was decided instead of deciding it again.
222
+ * Before the market could decide a locale, the foundation re-read the configuration's languages and
223
+ * that was the same answer; once a market language the configuration does not serve can make a
224
+ * locale NEEDED, only the decision knows the full set.
225
+ */
226
+ locales: z.ZodOptional<z.ZodArray<import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof AvailableLanguage>>>>;
156
227
  }, z.core.$strict>>;
157
228
  }, z.core.$strip>;
158
229
  export type CapabilityComposition = z.infer<typeof CapabilityCompositionSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"capability-composition.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/capability-composition/capability-composition.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,0BAA0B,CAAC;AAElC;;;;;;;;;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IAE9H,2DAA2D;;IAE3D,qIAAqI;;kBAErI,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B;;;;;;QAhBtC,8HAA8H;;QAE9H,2DAA2D;;QAE3D,qIAAqI;;;iBA0BrI,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,2DAA2D"}
1
+ {"version":3,"file":"capability-composition.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/capability-composition/capability-composition.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,oBAAY,4BAA4B;IACtC,EAAE,OAAO;CACV;AAED;;;;;;GAMG;AACH,oBAAY,sBAAsB;IAChC,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,oBAAoB,yBAAyB;IAC7C,WAAW,gBAAgB;IAC3B,mBAAmB,wBAAwB;IAC3C,kBAAkB,uBAAuB;IACzC,iBAAiB,sBAAsB;IACvC,UAAU,eAAe;IACzB,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;IACnC,YAAY,iBAAiB;IAC7B,wBAAwB,6BAA6B;IACrD,eAAe,oBAAoB;IACnC,UAAU,eAAe;IACzB;;;;OAIG;IACH,aAAa,kBAAkB;CAChC;AAED;;;;;;;;GAQG;AACH,oBAAY,sBAAsB;IAChC,oEAAoE;IACpE,MAAM,WAAW;IACjB,wGAAwG;IACxG,QAAQ,aAAa;IACrB,wFAAwF;IACxF,qBAAqB,0BAA0B;CAChD;AAED;;;;GAIG;AACH,oBAAY,gBAAgB;IAC1B,qJAAqJ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C;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,2DAA2D"}
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  // Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —
3
3
  // never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.
4
4
  import '@wildo-ai/zod-decorators';
5
+ import { AvailableLanguage } from '@wildo-ai/presets-components-models';
5
6
  /**
6
7
  * @wildo_source:part:start capability-composition.config facet:layer:specification facet:family:capability-composition
7
8
  *
@@ -110,12 +111,28 @@ export var CompositionBasis;
110
111
  */
111
112
  CompositionBasis["INTEGRATION_PLAN_OWNS_WORKERS_AND_MINIONS"] = "INTEGRATION_PLAN_OWNS_WORKERS_AND_MINIONS";
112
113
  /**
113
- * The application's configuration declares the languages it serves (`appPreferences.languages`), and
114
- * that decides whether its website is published in more than one locale. A HOST fact rather than a
115
- * family: no specification family declares languages, and the configuration already does, so asking
116
- * anyone would re-state it.
114
+ * The application's configuration declares MORE THAN ONE language (`appPreferences.languages`), so its
115
+ * website is published in a locale for each beyond the primary. A HOST fact rather than a family: no
116
+ * specification family declares languages, and the configuration already does, so asking anyone would
117
+ * re-state it.
118
+ *
119
+ * A NEED basis only. A one-language configuration implies no second locale, and that is
120
+ * {@link CompositionBasis.NO_DECLARATION_IMPLIES_IT} — the configuration was read and implies nothing.
121
+ * Until 2026-10-01 the derivation used this basis for both answers, and the validator refused every
122
+ * one-language application on its first run.
117
123
  */
118
124
  CompositionBasis["APPLICATION_CONFIG_DECLARES_LANGUAGES"] = "APPLICATION_CONFIG_DECLARES_LANGUAGES";
125
+ /**
126
+ * The market snapshot targets countries (a CORE or EXPANSION ICP's geographies) whose languages the
127
+ * application's configuration does not serve, so the website needs a locale for each — named in the
128
+ * decision's detail. Derived by `measureMarketLanguageCoverage`, never asked: both halves are typed
129
+ * declarations (ISO country codes on the ICPs, `appPreferences.languages` in the configuration).
130
+ *
131
+ * Takes precedence over {@link CompositionBasis.APPLICATION_CONFIG_DECLARES_LANGUAGES} when both hold,
132
+ * because it is the one that names a gap: the configuration and the market disagree, and the coherence
133
+ * report says so as well.
134
+ */
135
+ CompositionBasis["MARKET_TARGETS_UNSERVED_LANGUAGES"] = "MARKET_TARGETS_UNSERVED_LANGUAGES";
119
136
  /**
120
137
  * An optional LAYOUT library (the 3D layout, #1827) is the operator's opt-in. Nothing in a product definition
121
138
  * decides a rendering style: most applications are 2D, and one becomes 3D because its operator composes it —
@@ -127,6 +144,38 @@ export var CompositionBasis;
127
144
  /** No typed declaration exists yet that could decide it; `missingDeclaration` names the one that would. */
128
145
  CompositionBasis["NO_DECLARATION_DECIDES_IT"] = "NO_DECLARATION_DECIDES_IT";
129
146
  })(CompositionBasis || (CompositionBasis = {}));
147
+ /**
148
+ * The ONE disposition each basis can justify. Total over {@link CompositionBasis}, so a basis added
149
+ * tomorrow does not compile until somebody says which disposition it supports.
150
+ *
151
+ * A basis is a REASON, and a reason points one way: "the domain plan owns modules" cannot justify
152
+ * NEEDED, "no declaration implies it" cannot justify NEEDED, "the market declares an inbound web
153
+ * channel" cannot justify DECLINED. `validateCapabilityComposition` refuses any decision whose basis
154
+ * this table maps elsewhere, and the derivation's constructors are typed by {@link CompositionBasisFor},
155
+ * so the producer cannot even write the pairing the validator refuses.
156
+ *
157
+ * It exists because the pairing used to live in the validator only, as two hand-kept sets, while the
158
+ * derivation wrote whatever pair it chose. On 2026-10-01 it wrote DECLINED with
159
+ * `APPLICATION_CONFIG_DECLARES_LANGUAGES` for every one-language application; nothing stopped it until
160
+ * the landing refused the record, on a real first run.
161
+ */
162
+ export const COMPOSITION_BASIS_DISPOSITION = {
163
+ [CompositionBasis.MARKET_DECLARES_INBOUND_WEB_CHANNEL]: CompositionDisposition.NEEDED,
164
+ [CompositionBasis.BRAND_BRIEF_LANDED]: CompositionDisposition.NEEDED,
165
+ [CompositionBasis.BUSINESS_MODEL_DECLARES_PRICING_PLANS]: CompositionDisposition.NEEDED,
166
+ [CompositionBasis.MARKET_TARGETS_LEGAL_ENTITIES]: CompositionDisposition.NEEDED,
167
+ [CompositionBasis.REQUIREMENTS_DECLARE_PORTABILITY]: CompositionDisposition.NEEDED,
168
+ [CompositionBasis.APPLICATION_CONFIG_DECLARES_LANGUAGES]: CompositionDisposition.NEEDED,
169
+ [CompositionBasis.MARKET_TARGETS_UNSERVED_LANGUAGES]: CompositionDisposition.NEEDED,
170
+ [CompositionBasis.DOMAIN_PLAN_OWNS_MODULES_AND_RESOURCES]: CompositionDisposition.OWNED_BY_ANOTHER_STEP,
171
+ [CompositionBasis.BUILD_TASKS_OWN_PER_ARTIFACT_SCENARIOS]: CompositionDisposition.OWNED_BY_ANOTHER_STEP,
172
+ [CompositionBasis.PROVIDER_DECISION_OWNS_PROVIDERS]: CompositionDisposition.OWNED_BY_ANOTHER_STEP,
173
+ [CompositionBasis.DEPLOYMENT_OWNS_ENVIRONMENTS]: CompositionDisposition.OWNED_BY_ANOTHER_STEP,
174
+ [CompositionBasis.INTEGRATION_PLAN_OWNS_WORKERS_AND_MINIONS]: CompositionDisposition.OWNED_BY_ANOTHER_STEP,
175
+ [CompositionBasis.OPERATOR_OPTS_INTO_OPTIONAL_LAYOUT]: CompositionDisposition.OWNED_BY_ANOTHER_STEP,
176
+ [CompositionBasis.NO_DECLARATION_IMPLIES_IT]: CompositionDisposition.DECLINED,
177
+ [CompositionBasis.NO_DECLARATION_DECIDES_IT]: CompositionDisposition.DECLINED,
178
+ };
130
179
  const NonEmptyStringSchema = z.string().trim().min(1);
131
180
  /** One scenario's decision, with the declaration it was read from. */
132
181
  export const CompositionDecisionSchema = z.strictObject({
@@ -139,6 +188,15 @@ export const CompositionDecisionSchema = z.strictObject({
139
188
  ownedBy: NonEmptyStringSchema.optional(),
140
189
  /** For NO_DECLARATION_DECIDES_IT: the typed declaration that would decide it, so the gap is a named field rather than a question. */
141
190
  missingDeclaration: NonEmptyStringSchema.optional(),
191
+ /**
192
+ * For a NEEDED `add-locale`: the languages the website publishes a locale for, beyond its primary.
193
+ *
194
+ * Carried on the decision so the foundation APPLIES what was decided instead of deciding it again.
195
+ * Before the market could decide a locale, the foundation re-read the configuration's languages and
196
+ * that was the same answer; once a market language the configuration does not serve can make a
197
+ * locale NEEDED, only the decision knows the full set.
198
+ */
199
+ locales: z.array(z.enum(AvailableLanguage).systemEnum('AvailableLanguage')).optional(),
142
200
  });
143
201
  /**
144
202
  * THE capability-composition payload — one decision per scenario the framework ships.
@@ -1 +1 @@
1
- {"version":3,"file":"capability-composition.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/capability-composition/capability-composition.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,6GAA6G;AAC7G,+GAA+G;AAC/G,OAAO,0BAA0B,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAN,IAAY,4BAEX;AAFD,WAAY,4BAA4B;IACtC,yCAAS,CAAA;AACX,CAAC,EAFW,4BAA4B,KAA5B,4BAA4B,QAEvC;AAED;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,sBAqBX;AArBD,WAAY,sBAAsB;IAChC,mDAAyB,CAAA;IACzB,uDAA6B,CAAA;IAC7B,uEAA6C,CAAA;IAC7C,qDAA2B,CAAA;IAC3B,qEAA2C,CAAA;IAC3C,mEAAyC,CAAA;IACzC,iEAAuC,CAAA;IACvC,mDAAyB,CAAA;IACzB,6DAAmC,CAAA;IACnC,6DAAmC,CAAA;IACnC,uDAA6B,CAAA;IAC7B,+EAAqD,CAAA;IACrD,6DAAmC,CAAA;IACnC,mDAAyB,CAAA;IACzB;;;;OAIG;IACH,yDAA+B,CAAA;AACjC,CAAC,EArBW,sBAAsB,KAAtB,sBAAsB,QAqBjC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,oEAAoE;IACpE,2CAAiB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E,oBAAoB;IAC5B,2DAA2D;IAC3D,OAAO,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IACxC,qIAAqI;IACrI,kBAAkB,EAAE,oBAAoB,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC;AAGH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC,EAAE,CAAC;IACtF;;;;;;;;;;OAUG;IACH,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7D,CAAC,CAAC;AAEH,2DAA2D","sourcesContent":["import { z } from 'zod';\n// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —\n// never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.\nimport '@wildo-ai/zod-decorators';\n\n/**\n * @wildo_source:part:start capability-composition.config facet:layer:specification facet:family:capability-composition\n *\n * WHICH composition scenarios this application needs — the typed declaration the foundation\n * executor applies (#1491).\n *\n * ## Why a family, and why it is DERIVED\n *\n * `templates/saas/scenarios/` shipped fourteen composition scenarios and the journey applied two of\n * them (`add-module`, `add-resource`), both read off the domain plan. Nothing decided whether an\n * application has a website, a documentation portal, a worker, a minion, a second locale or\n * another environment, so twelve scenarios were reachable only by a human typing `wildo compose`.\n *\n * This family is that decision, recorded — and it is DERIVED, never asked. Every disposition below\n * names the declaration it was read from (a market channel, a brand brief, a pricing plan, an ICP\n * archetype) or names the typed declaration that would decide it and does not exist yet. A question\n * to the creator is not among the bases, by construction: `derive-before-you-ask.md` asks what\n * already decides a value, and for every scenario here something does — or nothing does, and the\n * honest record is DECLINED with the missing declaration named, not a form field.\n *\n * TOTAL over {@link CompositionScenarioRef}: a composition holds exactly one decision per scenario,\n * so a scenario added to the framework tomorrow is reported as undecided by every existing\n * application rather than silently omitted (the `undeclaredRetentionClasses` pattern).\n */\nexport enum CapabilityCompositionVersion {\n V1 = 'v1',\n}\n\n/**\n * The composition scenarios the framework ships — one member per folder under\n * `templates/saas/scenarios/`, in the value the `wildo compose <ref>` command takes.\n *\n * Closed on purpose: a scenario ref is the address of a template the composition engine loads, and a\n * ref this vocabulary does not name is one no application can be composed with.\n */\nexport enum CompositionScenarioRef {\n ADD_MODULE = 'add-module',\n ADD_RESOURCE = 'add-resource',\n ADD_CUSTOM_OPERATION = 'add-custom-operation',\n ADD_WEBSITE = 'add-website',\n ADD_WEBSITE_SECTION = 'add-website-section',\n ADD_MARKETING_PAGE = 'add-marketing-page',\n ADD_TECHNICAL_DOC = 'add-technical-doc',\n ADD_MINION = 'add-minion',\n ADD_WORKER_NODE = 'add-worker-node',\n ADD_WORKER_RUST = 'add-worker-rust',\n ADD_PROVIDER = 'add-provider',\n ADD_FILE_PICKER_PROVIDER = 'add-file-picker-provider',\n ADD_ENVIRONMENT = 'add-environment',\n ADD_LOCALE = 'add-locale',\n /**\n * Adopt the optional 3D layout library (#1827): declare `@wildo-ai/presets-components-3d` and register ONE\n * layout. An operator's opt-in (Paul, 2026-09-27: an application is 3D because it installs the library, with no\n * switch), so no declaration derives it and the journey never applies it.\n */\n ADD_3D_LAYOUT = 'add-3d-layout',\n}\n\n/**\n * What the composition says about one scenario.\n *\n * Three members, and the third is the one that keeps the record honest: several scenarios are\n * applied by a DIFFERENT step (the domain composition applies `add-module`, a build task applies\n * `add-website-section`, the provider decision applies `add-provider`). Recording them as DECLINED\n * would read as \"this application has no modules\"; omitting them would break totality. So the\n * record says who owns them instead.\n */\nexport enum CompositionDisposition {\n /** The application needs it; the foundation executor applies it. */\n NEEDED = 'NEEDED',\n /** Nothing the application declares implies it, or no declaration exists that could — see the basis. */\n DECLINED = 'DECLINED',\n /** Another step applies this scenario, named in `ownedBy`; this record only says so. */\n OWNED_BY_ANOTHER_STEP = 'OWNED_BY_ANOTHER_STEP',\n}\n\n/**\n * WHAT decided a disposition — a closed vocabulary, because a composition decision is a statement\n * about the product and a free-text reason cannot be checked. Every member names a DERIVATION from\n * a declaration the application already carries, or names the absence of one.\n */\nexport enum CompositionBasis {\n /** The market snapshot declares an inbound web channel (organic or paid search, content, owned or paid social) — traffic that lands on a website. */\n MARKET_DECLARES_INBOUND_WEB_CHANNEL = 'MARKET_DECLARES_INBOUND_WEB_CHANNEL',\n /** A brand brief has landed: the product has a public identity to present. */\n BRAND_BRIEF_LANDED = 'BRAND_BRIEF_LANDED',\n /** The business model declares pricing plans, which a public pricing page presents. */\n BUSINESS_MODEL_DECLARES_PRICING_PLANS = 'BUSINESS_MODEL_DECLARES_PRICING_PLANS',\n /** The market snapshot targets legal entities (a CORE or EXPANSION ICP of archetype LEGAL_ENTITY): an organisation's buyers expect administrator and integration documentation. */\n MARKET_TARGETS_LEGAL_ENTITIES = 'MARKET_TARGETS_LEGAL_ENTITIES',\n /** The requirements declare a PORTABILITY non-functional requirement: data leaves through documented interfaces. */\n REQUIREMENTS_DECLARE_PORTABILITY = 'REQUIREMENTS_DECLARE_PORTABILITY',\n /** The domain plan owns modules and resources; the foundation's domain composition applies them. */\n DOMAIN_PLAN_OWNS_MODULES_AND_RESOURCES = 'DOMAIN_PLAN_OWNS_MODULES_AND_RESOURCES',\n /** A per-artifact scenario (an operation, a page, a section) is applied by the build task that produces the artifact. */\n BUILD_TASKS_OWN_PER_ARTIFACT_SCENARIOS = 'BUILD_TASKS_OWN_PER_ARTIFACT_SCENARIOS',\n /** Which provider serves a capability is the foundation's provider decision, not a composition question. */\n PROVIDER_DECISION_OWNS_PROVIDERS = 'PROVIDER_DECISION_OWNS_PROVIDERS',\n /** A deployment environment is an operator's act, taken when the application is deployed. */\n DEPLOYMENT_OWNS_ENVIRONMENTS = 'DEPLOYMENT_OWNS_ENVIRONMENTS',\n /**\n * The integration plan owns the workers and minions; the foundation composes one scenario per\n * surface it declares (#1495). The application-level twin of\n * {@link CompositionBasis.DOMAIN_PLAN_OWNS_MODULES_AND_RESOURCES}.\n */\n INTEGRATION_PLAN_OWNS_WORKERS_AND_MINIONS = 'INTEGRATION_PLAN_OWNS_WORKERS_AND_MINIONS',\n /**\n * The application's configuration declares the languages it serves (`appPreferences.languages`), and\n * that decides whether its website is published in more than one locale. A HOST fact rather than a\n * family: no specification family declares languages, and the configuration already does, so asking\n * anyone would re-state it.\n */\n APPLICATION_CONFIG_DECLARES_LANGUAGES = 'APPLICATION_CONFIG_DECLARES_LANGUAGES',\n /**\n * An optional LAYOUT library (the 3D layout, #1827) is the operator's opt-in. Nothing in a product definition\n * decides a rendering style: most applications are 2D, and one becomes 3D because its operator composes it —\n * a decision about how the shell is drawn, not about what the product does.\n */\n OPERATOR_OPTS_INTO_OPTIONAL_LAYOUT = 'OPERATOR_OPTS_INTO_OPTIONAL_LAYOUT',\n /** The declarations that could imply it are present and do not — measured, not assumed. */\n NO_DECLARATION_IMPLIES_IT = 'NO_DECLARATION_IMPLIES_IT',\n /** No typed declaration exists yet that could decide it; `missingDeclaration` names the one that would. */\n NO_DECLARATION_DECIDES_IT = 'NO_DECLARATION_DECIDES_IT',\n}\n\nconst NonEmptyStringSchema = z.string().trim().min(1);\n\n/** One scenario's decision, with the declaration it was read from. */\nexport const CompositionDecisionSchema = z.strictObject({\n scenarioRef: z.enum(CompositionScenarioRef).systemEnum('CompositionScenarioRef'),\n disposition: z.enum(CompositionDisposition).systemEnum('CompositionDisposition'),\n basis: z.enum(CompositionBasis).systemEnum('CompositionBasis'),\n /** The derivation in one sentence — which entries decided it, so a reader can check the claim against the family it names. */\n detail: NonEmptyStringSchema,\n /** For OWNED_BY_ANOTHER_STEP: the step that applies it. */\n ownedBy: NonEmptyStringSchema.optional(),\n /** For NO_DECLARATION_DECIDES_IT: the typed declaration that would decide it, so the gap is a named field rather than a question. */\n missingDeclaration: NonEmptyStringSchema.optional(),\n});\nexport type CompositionDecision = z.infer<typeof CompositionDecisionSchema>;\n\n/**\n * THE capability-composition payload — one decision per scenario the framework ships.\n *\n * **Artifact-family id: `capability-composition`.** Produced by `bottom_up.capability-composition`\n * (a runner-owned derivation, never a model), consumed by `bottom_up.foundation`, which applies the\n * NEEDED scenarios and records each applied and each declined one with its basis.\n */\nexport const CapabilityCompositionSchema = z.object({\n version: z.enum(CapabilityCompositionVersion).default(CapabilityCompositionVersion.V1),\n /*\n * `scenarioDecisions`, not `decisions`, and the reason is not style.\n *\n * The workbench's field words are ONE namespace keyed by the COLLECTION name — `tasks.objective`,\n * `decisions.disposition` — shared across every family, because a field name declared by five\n * aspects means the same thing in all five. The placement plan already owns `decisions`, and its\n * `disposition` is `PLACED | DECLINED` while this one's is `NEEDED | DECLINED |\n * OWNED_BY_ANOTHER_STEP`. Two different vocabularies under one key is exactly the merge this\n * repository calls a trick, and the collision would have been silent: one family's words would\n * simply have won.\n */\n scenarioDecisions: z.array(CompositionDecisionSchema).min(1),\n});\nexport type CapabilityComposition = z.infer<typeof CapabilityCompositionSchema>;\n/** @wildo_source:part:end capability-composition.config */\n"]}
1
+ {"version":3,"file":"capability-composition.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/capability-composition/capability-composition.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,6GAA6G;AAC7G,+GAA+G;AAC/G,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAN,IAAY,4BAEX;AAFD,WAAY,4BAA4B;IACtC,yCAAS,CAAA;AACX,CAAC,EAFW,4BAA4B,KAA5B,4BAA4B,QAEvC;AAED;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,sBAqBX;AArBD,WAAY,sBAAsB;IAChC,mDAAyB,CAAA;IACzB,uDAA6B,CAAA;IAC7B,uEAA6C,CAAA;IAC7C,qDAA2B,CAAA;IAC3B,qEAA2C,CAAA;IAC3C,mEAAyC,CAA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AAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,wBAAwB,CAAC;IAChF,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,UAAU,CAAC,wBAAwB,CAAC;IAChF,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAC9D,8HAA8H;IAC9H,MAAM,EAAE,oBAAoB;IAC5B,2DAA2D;IAC3D,OAAO,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IACxC,qIAAqI;IACrI,kBAAkB,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IACnD;;;;;;;OAOG;IACH,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC,QAAQ,EAAE;CACvF,CAAC,CAAC;AAGH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC,OAAO,CAAC,4BAA4B,CAAC,EAAE,CAAC;IACtF;;;;;;;;;;OAUG;IACH,iBAAiB,EAAE,CAAC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC7D,CAAC,CAAC;AAEH,2DAA2D","sourcesContent":["import { z } from 'zod';\n// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —\n// never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.\nimport '@wildo-ai/zod-decorators';\nimport { AvailableLanguage } from '@wildo-ai/presets-components-models';\n\n/**\n * @wildo_source:part:start capability-composition.config facet:layer:specification facet:family:capability-composition\n *\n * WHICH composition scenarios this application needs — the typed declaration the foundation\n * executor applies (#1491).\n *\n * ## Why a family, and why it is DERIVED\n *\n * `templates/saas/scenarios/` shipped fourteen composition scenarios and the journey applied two of\n * them (`add-module`, `add-resource`), both read off the domain plan. Nothing decided whether an\n * application has a website, a documentation portal, a worker, a minion, a second locale or\n * another environment, so twelve scenarios were reachable only by a human typing `wildo compose`.\n *\n * This family is that decision, recorded — and it is DERIVED, never asked. Every disposition below\n * names the declaration it was read from (a market channel, a brand brief, a pricing plan, an ICP\n * archetype) or names the typed declaration that would decide it and does not exist yet. A question\n * to the creator is not among the bases, by construction: `derive-before-you-ask.md` asks what\n * already decides a value, and for every scenario here something does — or nothing does, and the\n * honest record is DECLINED with the missing declaration named, not a form field.\n *\n * TOTAL over {@link CompositionScenarioRef}: a composition holds exactly one decision per scenario,\n * so a scenario added to the framework tomorrow is reported as undecided by every existing\n * application rather than silently omitted (the `undeclaredRetentionClasses` pattern).\n */\nexport enum CapabilityCompositionVersion {\n V1 = 'v1',\n}\n\n/**\n * The composition scenarios the framework ships — one member per folder under\n * `templates/saas/scenarios/`, in the value the `wildo compose <ref>` command takes.\n *\n * Closed on purpose: a scenario ref is the address of a template the composition engine loads, and a\n * ref this vocabulary does not name is one no application can be composed with.\n */\nexport enum CompositionScenarioRef {\n ADD_MODULE = 'add-module',\n ADD_RESOURCE = 'add-resource',\n ADD_CUSTOM_OPERATION = 'add-custom-operation',\n ADD_WEBSITE = 'add-website',\n ADD_WEBSITE_SECTION = 'add-website-section',\n ADD_MARKETING_PAGE = 'add-marketing-page',\n ADD_TECHNICAL_DOC = 'add-technical-doc',\n ADD_MINION = 'add-minion',\n ADD_WORKER_NODE = 'add-worker-node',\n ADD_WORKER_RUST = 'add-worker-rust',\n ADD_PROVIDER = 'add-provider',\n ADD_FILE_PICKER_PROVIDER = 'add-file-picker-provider',\n ADD_ENVIRONMENT = 'add-environment',\n ADD_LOCALE = 'add-locale',\n /**\n * Adopt the optional 3D layout library (#1827): declare `@wildo-ai/presets-components-3d` and register ONE\n * layout. An operator's opt-in (Paul, 2026-09-27: an application is 3D because it installs the library, with no\n * switch), so no declaration derives it and the journey never applies it.\n */\n ADD_3D_LAYOUT = 'add-3d-layout',\n}\n\n/**\n * What the composition says about one scenario.\n *\n * Three members, and the third is the one that keeps the record honest: several scenarios are\n * applied by a DIFFERENT step (the domain composition applies `add-module`, a build task applies\n * `add-website-section`, the provider decision applies `add-provider`). Recording them as DECLINED\n * would read as \"this application has no modules\"; omitting them would break totality. So the\n * record says who owns them instead.\n */\nexport enum CompositionDisposition {\n /** The application needs it; the foundation executor applies it. */\n NEEDED = 'NEEDED',\n /** Nothing the application declares implies it, or no declaration exists that could — see the basis. */\n DECLINED = 'DECLINED',\n /** Another step applies this scenario, named in `ownedBy`; this record only says so. */\n OWNED_BY_ANOTHER_STEP = 'OWNED_BY_ANOTHER_STEP',\n}\n\n/**\n * WHAT decided a disposition — a closed vocabulary, because a composition decision is a statement\n * about the product and a free-text reason cannot be checked. Every member names a DERIVATION from\n * a declaration the application already carries, or names the absence of one.\n */\nexport enum CompositionBasis {\n /** The market snapshot declares an inbound web channel (organic or paid search, content, owned or paid social) — traffic that lands on a website. */\n MARKET_DECLARES_INBOUND_WEB_CHANNEL = 'MARKET_DECLARES_INBOUND_WEB_CHANNEL',\n /** A brand brief has landed: the product has a public identity to present. */\n BRAND_BRIEF_LANDED = 'BRAND_BRIEF_LANDED',\n /** The business model declares pricing plans, which a public pricing page presents. */\n BUSINESS_MODEL_DECLARES_PRICING_PLANS = 'BUSINESS_MODEL_DECLARES_PRICING_PLANS',\n /** The market snapshot targets legal entities (a CORE or EXPANSION ICP of archetype LEGAL_ENTITY): an organisation's buyers expect administrator and integration documentation. */\n MARKET_TARGETS_LEGAL_ENTITIES = 'MARKET_TARGETS_LEGAL_ENTITIES',\n /** The requirements declare a PORTABILITY non-functional requirement: data leaves through documented interfaces. */\n REQUIREMENTS_DECLARE_PORTABILITY = 'REQUIREMENTS_DECLARE_PORTABILITY',\n /** The domain plan owns modules and resources; the foundation's domain composition applies them. */\n DOMAIN_PLAN_OWNS_MODULES_AND_RESOURCES = 'DOMAIN_PLAN_OWNS_MODULES_AND_RESOURCES',\n /** A per-artifact scenario (an operation, a page, a section) is applied by the build task that produces the artifact. */\n BUILD_TASKS_OWN_PER_ARTIFACT_SCENARIOS = 'BUILD_TASKS_OWN_PER_ARTIFACT_SCENARIOS',\n /** Which provider serves a capability is the foundation's provider decision, not a composition question. */\n PROVIDER_DECISION_OWNS_PROVIDERS = 'PROVIDER_DECISION_OWNS_PROVIDERS',\n /** A deployment environment is an operator's act, taken when the application is deployed. */\n DEPLOYMENT_OWNS_ENVIRONMENTS = 'DEPLOYMENT_OWNS_ENVIRONMENTS',\n /**\n * The integration plan owns the workers and minions; the foundation composes one scenario per\n * surface it declares (#1495). The application-level twin of\n * {@link CompositionBasis.DOMAIN_PLAN_OWNS_MODULES_AND_RESOURCES}.\n */\n INTEGRATION_PLAN_OWNS_WORKERS_AND_MINIONS = 'INTEGRATION_PLAN_OWNS_WORKERS_AND_MINIONS',\n /**\n * The application's configuration declares MORE THAN ONE language (`appPreferences.languages`), so its\n * website is published in a locale for each beyond the primary. A HOST fact rather than a family: no\n * specification family declares languages, and the configuration already does, so asking anyone would\n * re-state it.\n *\n * A NEED basis only. A one-language configuration implies no second locale, and that is\n * {@link CompositionBasis.NO_DECLARATION_IMPLIES_IT} — the configuration was read and implies nothing.\n * Until 2026-10-01 the derivation used this basis for both answers, and the validator refused every\n * one-language application on its first run.\n */\n APPLICATION_CONFIG_DECLARES_LANGUAGES = 'APPLICATION_CONFIG_DECLARES_LANGUAGES',\n /**\n * The market snapshot targets countries (a CORE or EXPANSION ICP's geographies) whose languages the\n * application's configuration does not serve, so the website needs a locale for each — named in the\n * decision's detail. Derived by `measureMarketLanguageCoverage`, never asked: both halves are typed\n * declarations (ISO country codes on the ICPs, `appPreferences.languages` in the configuration).\n *\n * Takes precedence over {@link CompositionBasis.APPLICATION_CONFIG_DECLARES_LANGUAGES} when both hold,\n * because it is the one that names a gap: the configuration and the market disagree, and the coherence\n * report says so as well.\n */\n MARKET_TARGETS_UNSERVED_LANGUAGES = 'MARKET_TARGETS_UNSERVED_LANGUAGES',\n /**\n * An optional LAYOUT library (the 3D layout, #1827) is the operator's opt-in. Nothing in a product definition\n * decides a rendering style: most applications are 2D, and one becomes 3D because its operator composes it —\n * a decision about how the shell is drawn, not about what the product does.\n */\n OPERATOR_OPTS_INTO_OPTIONAL_LAYOUT = 'OPERATOR_OPTS_INTO_OPTIONAL_LAYOUT',\n /** The declarations that could imply it are present and do not — measured, not assumed. */\n NO_DECLARATION_IMPLIES_IT = 'NO_DECLARATION_IMPLIES_IT',\n /** No typed declaration exists yet that could decide it; `missingDeclaration` names the one that would. */\n NO_DECLARATION_DECIDES_IT = 'NO_DECLARATION_DECIDES_IT',\n}\n\n/**\n * The ONE disposition each basis can justify. Total over {@link CompositionBasis}, so a basis added\n * tomorrow does not compile until somebody says which disposition it supports.\n *\n * A basis is a REASON, and a reason points one way: \"the domain plan owns modules\" cannot justify\n * NEEDED, \"no declaration implies it\" cannot justify NEEDED, \"the market declares an inbound web\n * channel\" cannot justify DECLINED. `validateCapabilityComposition` refuses any decision whose basis\n * this table maps elsewhere, and the derivation's constructors are typed by {@link CompositionBasisFor},\n * so the producer cannot even write the pairing the validator refuses.\n *\n * It exists because the pairing used to live in the validator only, as two hand-kept sets, while the\n * derivation wrote whatever pair it chose. On 2026-10-01 it wrote DECLINED with\n * `APPLICATION_CONFIG_DECLARES_LANGUAGES` for every one-language application; nothing stopped it until\n * the landing refused the record, on a real first run.\n */\nexport const COMPOSITION_BASIS_DISPOSITION = {\n [CompositionBasis.MARKET_DECLARES_INBOUND_WEB_CHANNEL]: CompositionDisposition.NEEDED,\n [CompositionBasis.BRAND_BRIEF_LANDED]: CompositionDisposition.NEEDED,\n [CompositionBasis.BUSINESS_MODEL_DECLARES_PRICING_PLANS]: CompositionDisposition.NEEDED,\n [CompositionBasis.MARKET_TARGETS_LEGAL_ENTITIES]: CompositionDisposition.NEEDED,\n [CompositionBasis.REQUIREMENTS_DECLARE_PORTABILITY]: CompositionDisposition.NEEDED,\n [CompositionBasis.APPLICATION_CONFIG_DECLARES_LANGUAGES]: CompositionDisposition.NEEDED,\n [CompositionBasis.MARKET_TARGETS_UNSERVED_LANGUAGES]: CompositionDisposition.NEEDED,\n [CompositionBasis.DOMAIN_PLAN_OWNS_MODULES_AND_RESOURCES]: CompositionDisposition.OWNED_BY_ANOTHER_STEP,\n [CompositionBasis.BUILD_TASKS_OWN_PER_ARTIFACT_SCENARIOS]: CompositionDisposition.OWNED_BY_ANOTHER_STEP,\n [CompositionBasis.PROVIDER_DECISION_OWNS_PROVIDERS]: CompositionDisposition.OWNED_BY_ANOTHER_STEP,\n [CompositionBasis.DEPLOYMENT_OWNS_ENVIRONMENTS]: CompositionDisposition.OWNED_BY_ANOTHER_STEP,\n [CompositionBasis.INTEGRATION_PLAN_OWNS_WORKERS_AND_MINIONS]: CompositionDisposition.OWNED_BY_ANOTHER_STEP,\n [CompositionBasis.OPERATOR_OPTS_INTO_OPTIONAL_LAYOUT]: CompositionDisposition.OWNED_BY_ANOTHER_STEP,\n [CompositionBasis.NO_DECLARATION_IMPLIES_IT]: CompositionDisposition.DECLINED,\n [CompositionBasis.NO_DECLARATION_DECIDES_IT]: CompositionDisposition.DECLINED,\n} as const satisfies Readonly<Record<CompositionBasis, CompositionDisposition>>;\n\n/** The bases that can justify disposition `D` — what a typed decision constructor accepts. */\nexport type CompositionBasisFor<D extends CompositionDisposition> = {\n [B in CompositionBasis]: (typeof COMPOSITION_BASIS_DISPOSITION)[B] extends D ? B : never;\n}[CompositionBasis];\n\nconst NonEmptyStringSchema = z.string().trim().min(1);\n\n/** One scenario's decision, with the declaration it was read from. */\nexport const CompositionDecisionSchema = z.strictObject({\n scenarioRef: z.enum(CompositionScenarioRef).systemEnum('CompositionScenarioRef'),\n disposition: z.enum(CompositionDisposition).systemEnum('CompositionDisposition'),\n basis: z.enum(CompositionBasis).systemEnum('CompositionBasis'),\n /** The derivation in one sentence — which entries decided it, so a reader can check the claim against the family it names. */\n detail: NonEmptyStringSchema,\n /** For OWNED_BY_ANOTHER_STEP: the step that applies it. */\n ownedBy: NonEmptyStringSchema.optional(),\n /** For NO_DECLARATION_DECIDES_IT: the typed declaration that would decide it, so the gap is a named field rather than a question. */\n missingDeclaration: NonEmptyStringSchema.optional(),\n /**\n * For a NEEDED `add-locale`: the languages the website publishes a locale for, beyond its primary.\n *\n * Carried on the decision so the foundation APPLIES what was decided instead of deciding it again.\n * Before the market could decide a locale, the foundation re-read the configuration's languages and\n * that was the same answer; once a market language the configuration does not serve can make a\n * locale NEEDED, only the decision knows the full set.\n */\n locales: z.array(z.enum(AvailableLanguage).systemEnum('AvailableLanguage')).optional(),\n});\nexport type CompositionDecision = z.infer<typeof CompositionDecisionSchema>;\n\n/**\n * THE capability-composition payload — one decision per scenario the framework ships.\n *\n * **Artifact-family id: `capability-composition`.** Produced by `bottom_up.capability-composition`\n * (a runner-owned derivation, never a model), consumed by `bottom_up.foundation`, which applies the\n * NEEDED scenarios and records each applied and each declined one with its basis.\n */\nexport const CapabilityCompositionSchema = z.object({\n version: z.enum(CapabilityCompositionVersion).default(CapabilityCompositionVersion.V1),\n /*\n * `scenarioDecisions`, not `decisions`, and the reason is not style.\n *\n * The workbench's field words are ONE namespace keyed by the COLLECTION name — `tasks.objective`,\n * `decisions.disposition` — shared across every family, because a field name declared by five\n * aspects means the same thing in all five. The placement plan already owns `decisions`, and its\n * `disposition` is `PLACED | DECLINED` while this one's is `NEEDED | DECLINED |\n * OWNED_BY_ANOTHER_STEP`. Two different vocabularies under one key is exactly the merge this\n * repository calls a trick, and the collision would have been silent: one family's words would\n * simply have won.\n */\n scenarioDecisions: z.array(CompositionDecisionSchema).min(1),\n});\nexport type CapabilityComposition = z.infer<typeof CapabilityCompositionSchema>;\n/** @wildo_source:part:end capability-composition.config */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"computed-document-facts.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/compliance-documents/computed-document-facts.schemas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B,CAAC;IAClD,QAAQ,CAAC,mBAAmB,EAAE,SAAS,sBAAsB,EAAE,GAAG,SAAS,CAAC;IAC5E,QAAQ,CAAC,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,CAAC;IAC7E,QAAQ,CAAC,iCAAiC,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gCAAgC,CAAC,CAAC,GAAG,SAAS,CAAC;IACpH,QAAQ,CAAC,WAAW,EAAE,SAAS,mBAAmB,EAAE,GAAG,SAAS,CAAC;IACjE,QAAQ,CAAC,yBAAyB,CAAC,EAAE,SAAS,4BAA4B,EAAE,GAAG,SAAS,CAAC;CAC1F,GAAG,SAAS,oBAAoB,EAAE,GAAG,SAAS,CAoC9C;AAgBD,sEAAsE;AACtE,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,wCAAwC,GAAG,SAAS,0BAA0B,EAAE,CAiBvI;AA+BD,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,oCAAoC,EAC5C,OAAO,EAAE,SAAS,0BAA0B,EAAE,GAC7C,oCAAoC,CA4CtC"}
1
+ {"version":3,"file":"computed-document-facts.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/compliance-documents/computed-document-facts.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,kBAAkB,EAIlB,KAAK,qCAAqC,EAC1C,KAAK,mBAAmB,EACxB,KAAK,oCAAoC,EACzC,KAAK,4BAA4B,EACjC,KAAK,4BAA4B,EACjC,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACtC,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,0DAA0D,EAG1D,oBAAoB,EAEpB,KAAK,yCAAyC,EAC9C,KAAK,oCAAoC,EAC1C,MAAM,iGAAiG,CAAC;AAEzG,OAAO,EAIL,KAAK,4BAA4B,EAClC,MAAM,8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,4BAA4B,EAAE,GAAG,SAAS,CAAC;CAC1F,GAAG,SAAS,oBAAoB,EAAE,GAAG,SAAS,CAoC9C;AAgBD,sEAAsE;AACtE,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,wCAAwC,GAAG,SAAS,0BAA0B,EAAE,CAiBvI;AA+BD,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,oCAAoC,EAC5C,OAAO,EAAE,SAAS,0BAA0B,EAAE,GAC7C,oCAAoC,CA4CtC"}
@@ -242,6 +242,12 @@ function computeRetentionRules(inputs) {
242
242
  * - `safeguardGaps` — a declared origin jurisdiction a TRANSFER names no safeguard for.
243
243
  * An EMPTY register with no configured recipient states that nothing is transferred through a processor;
244
244
  * the operator's own establishment is stated by `controller-and-contact`.
245
+ *
246
+ * `operatorHostingRegions` is WHERE the operator's own infrastructure holds the data
247
+ * (`operatorComplianceIdentity.hostingRegions`, #2285), beside the processors' regions, because a register says
248
+ * nothing about the operator's own processing. `null` means the operator has not declared it, and is stated as
249
+ * such: never "hosted nowhere", and never a reason to round the position up to "no international transfer".
250
+ * Whether a hosting region makes a transfer stays the operator's recorded determination, never computed here.
245
251
  */
246
252
  function computeInternationalTransfers(inputs) {
247
253
  const register = inputs.processorRegister;
@@ -276,6 +282,7 @@ function computeInternationalTransfers(inputs) {
276
282
  ...classification.undeclaredProviderRefs,
277
283
  ],
278
284
  safeguardGaps,
285
+ operatorHostingRegions: inputs.operatorComplianceIdentity?.hostingRegions === undefined ? null : [...inputs.operatorComplianceIdentity.hostingRegions],
279
286
  };
280
287
  }
281
288
  /**