@wildo-ai/saas-specifications 1.1.1 → 1.1.2

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 (423) hide show
  1. package/dist/assurance/external-framework-mapping.json +980 -0
  2. package/dist/esm/_core/brand/brand.family-aspects.d.ts +3 -0
  3. package/dist/esm/_core/brand/brand.family-aspects.d.ts.map +1 -0
  4. package/dist/esm/_core/brand/brand.family-aspects.js +51 -0
  5. package/dist/esm/_core/brand/brand.family-aspects.js.map +1 -0
  6. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts +3 -0
  7. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -0
  8. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +28 -0
  9. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -0
  10. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts +3 -0
  11. package/dist/esm/_core/business-model-lite/business-model.family-aspects.d.ts.map +1 -0
  12. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js +21 -0
  13. package/dist/esm/_core/business-model-lite/business-model.family-aspects.js.map +1 -0
  14. package/dist/esm/_core/chart-view-specification.schemas.d.ts +11 -0
  15. package/dist/esm/_core/chart-view-specification.schemas.d.ts.map +1 -1
  16. package/dist/esm/_core/chart-view-specification.schemas.js.map +1 -1
  17. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts +85 -0
  18. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.d.ts.map +1 -1
  19. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js +41 -0
  20. package/dist/esm/_core/compliance-documents/compliance-document-candidate-generation.schemas.js.map +1 -1
  21. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts +168 -2
  22. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.d.ts.map +1 -1
  23. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js +98 -9
  24. package/dist/esm/_core/compliance-documents/compliance-document-candidate.schemas.js.map +1 -1
  25. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts +12 -0
  26. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.d.ts.map +1 -0
  27. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js +47 -0
  28. package/dist/esm/_core/compliance-documents/compliance-documents.family-aspects.js.map +1 -0
  29. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.d.ts.map +1 -1
  30. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js +8 -3
  31. package/dist/esm/_core/compliance-documents/document-fact-specification-generation.schemas.js.map +1 -1
  32. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts +21 -0
  33. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.d.ts.map +1 -0
  34. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js +40 -0
  35. package/dist/esm/_core/compliance-documents/processor-register.family-aspects.js.map +1 -0
  36. package/dist/esm/_core/composite-view-specification.schemas.d.ts +11 -0
  37. package/dist/esm/_core/composite-view-specification.schemas.d.ts.map +1 -1
  38. package/dist/esm/_core/composite-view-specification.schemas.js.map +1 -1
  39. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts +3 -0
  40. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.d.ts.map +1 -0
  41. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js +32 -0
  42. package/dist/esm/_core/domain-plan/domain-plan.family-aspects.js.map +1 -0
  43. package/dist/esm/_core/execution-view-specification.schemas.d.ts +11 -0
  44. package/dist/esm/_core/execution-view-specification.schemas.d.ts.map +1 -1
  45. package/dist/esm/_core/execution-view-specification.schemas.js.map +1 -1
  46. package/dist/esm/_core/family-aspects.registry.d.ts +18 -0
  47. package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -0
  48. package/dist/esm/_core/family-aspects.registry.js +60 -0
  49. package/dist/esm/_core/family-aspects.registry.js.map +1 -0
  50. package/dist/esm/_core/family-aspects.schemas.d.ts +122 -0
  51. package/dist/esm/_core/family-aspects.schemas.d.ts.map +1 -0
  52. package/dist/esm/_core/family-aspects.schemas.js +15 -0
  53. package/dist/esm/_core/family-aspects.schemas.js.map +1 -0
  54. package/dist/esm/_core/feature-drafts/capability-map-output-set-generation.schemas.d.ts +11 -11
  55. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts +3 -0
  56. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.d.ts.map +1 -0
  57. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js +25 -0
  58. package/dist/esm/_core/feature-drafts/feature-drafts.family-aspects.js.map +1 -0
  59. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts +11 -0
  60. package/dist/esm/_core/flows-actors-view-specification.schemas.d.ts.map +1 -1
  61. package/dist/esm/_core/flows-actors-view-specification.schemas.js.map +1 -1
  62. package/dist/esm/_core/frontend-component-specification.schemas.d.ts.map +1 -1
  63. package/dist/esm/_core/frontend-component-specification.schemas.js +19 -1
  64. package/dist/esm/_core/frontend-component-specification.schemas.js.map +1 -1
  65. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts +11 -0
  66. package/dist/esm/_core/full-custom-view-specification.schemas.d.ts.map +1 -1
  67. package/dist/esm/_core/full-custom-view-specification.schemas.js.map +1 -1
  68. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts +11 -0
  69. package/dist/esm/_core/guidance-flow-specification.schemas.d.ts.map +1 -1
  70. package/dist/esm/_core/guidance-flow-specification.schemas.js +14 -0
  71. package/dist/esm/_core/guidance-flow-specification.schemas.js.map +1 -1
  72. package/dist/esm/_core/index.d.ts +2 -0
  73. package/dist/esm/_core/index.d.ts.map +1 -1
  74. package/dist/esm/_core/index.js +2 -0
  75. package/dist/esm/_core/index.js.map +1 -1
  76. package/dist/esm/_core/market/market-snapshot-generation.schemas.d.ts +22 -22
  77. package/dist/esm/_core/market/market.family-aspects.d.ts +9 -0
  78. package/dist/esm/_core/market/market.family-aspects.d.ts.map +1 -0
  79. package/dist/esm/_core/market/market.family-aspects.js +227 -0
  80. package/dist/esm/_core/market/market.family-aspects.js.map +1 -0
  81. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts +11 -0
  82. package/dist/esm/_core/onboarding-view-specification.schemas.d.ts.map +1 -1
  83. package/dist/esm/_core/onboarding-view-specification.schemas.js +14 -0
  84. package/dist/esm/_core/onboarding-view-specification.schemas.js.map +1 -1
  85. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts +3 -0
  86. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.d.ts.map +1 -0
  87. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js +31 -0
  88. package/dist/esm/_core/placement-plan/placement-plan.family-aspects.js.map +1 -0
  89. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts +9 -0
  90. package/dist/esm/_core/requirements/requirements.family-aspects.d.ts.map +1 -0
  91. package/dist/esm/_core/requirements/requirements.family-aspects.js +40 -0
  92. package/dist/esm/_core/requirements/requirements.family-aspects.js.map +1 -0
  93. package/dist/esm/_core/resource-specification.schemas.d.ts +22 -0
  94. package/dist/esm/_core/resource-specification.schemas.d.ts.map +1 -1
  95. package/dist/esm/_core/resource-specification.schemas.js.map +1 -1
  96. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts +3 -0
  97. package/dist/esm/_core/roadmap/roadmap.family-aspects.d.ts.map +1 -0
  98. package/dist/esm/_core/roadmap/roadmap.family-aspects.js +26 -0
  99. package/dist/esm/_core/roadmap/roadmap.family-aspects.js.map +1 -0
  100. package/dist/esm/_core/vision/vision.family-aspects.d.ts +11 -0
  101. package/dist/esm/_core/vision/vision.family-aspects.d.ts.map +1 -0
  102. package/dist/esm/_core/vision/vision.family-aspects.js +63 -0
  103. package/dist/esm/_core/vision/vision.family-aspects.js.map +1 -0
  104. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts +188 -33
  105. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.d.ts.map +1 -1
  106. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js +158 -57
  107. package/dist/esm/application-creation/application-document-fact-specification.application-creation.schemas.js.map +1 -1
  108. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts +38 -4
  109. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.d.ts.map +1 -1
  110. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js +37 -3
  111. package/dist/esm/application-creation/application-specification-family-identity.application-creation.schemas.js.map +1 -1
  112. package/dist/esm/application-creation/document-facts.family-aspects.d.ts +12 -0
  113. package/dist/esm/application-creation/document-facts.family-aspects.d.ts.map +1 -0
  114. package/dist/esm/application-creation/document-facts.family-aspects.js +37 -0
  115. package/dist/esm/application-creation/document-facts.family-aspects.js.map +1 -0
  116. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts +3 -0
  117. package/dist/esm/application-creation/document-release-policy.family-aspects.d.ts.map +1 -0
  118. package/dist/esm/application-creation/document-release-policy.family-aspects.js +23 -0
  119. package/dist/esm/application-creation/document-release-policy.family-aspects.js.map +1 -0
  120. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +93 -62
  121. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  122. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +114 -59
  123. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  124. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +2 -0
  125. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
  126. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +2 -0
  127. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
  128. package/dist/esm/application-creation.exports.d.ts +11 -0
  129. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  130. package/dist/esm/application-creation.exports.js +11 -0
  131. package/dist/esm/application-creation.exports.js.map +1 -1
  132. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +976 -2
  133. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts.map +1 -1
  134. package/dist/esm/assurance/assurance-authority-basis.definitions.js +2026 -61
  135. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  136. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts +1 -0
  137. package/dist/esm/assurance/assurance-authority-basis.schemas.d.ts.map +1 -1
  138. package/dist/esm/assurance/assurance-document-system.definitions.d.ts.map +1 -1
  139. package/dist/esm/assurance/assurance-document-system.definitions.js +18 -3
  140. package/dist/esm/assurance/assurance-document-system.definitions.js.map +1 -1
  141. package/dist/esm/assurance/assurance-document-system.schemas.d.ts +32 -2
  142. package/dist/esm/assurance/assurance-document-system.schemas.d.ts.map +1 -1
  143. package/dist/esm/assurance/assurance-document-system.schemas.js +32 -2
  144. package/dist/esm/assurance/assurance-document-system.schemas.js.map +1 -1
  145. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts +90 -0
  146. package/dist/esm/assurance/assurance-external-framework-mapping.d.ts.map +1 -0
  147. package/dist/esm/assurance/assurance-external-framework-mapping.js +134 -0
  148. package/dist/esm/assurance/assurance-external-framework-mapping.js.map +1 -0
  149. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts +71 -1
  150. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  151. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +545 -5
  152. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  153. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts +141 -0
  154. package/dist/esm/assurance/assurance-program-generation.schemas.d.ts.map +1 -0
  155. package/dist/esm/assurance/assurance-program-generation.schemas.js +377 -0
  156. package/dist/esm/assurance/assurance-program-generation.schemas.js.map +1 -0
  157. package/dist/esm/assurance/assurance-program.family-aspects.d.ts +13 -0
  158. package/dist/esm/assurance/assurance-program.family-aspects.d.ts.map +1 -0
  159. package/dist/esm/assurance/assurance-program.family-aspects.js +16 -0
  160. package/dist/esm/assurance/assurance-program.family-aspects.js.map +1 -0
  161. package/dist/esm/assurance/assurance-program.schemas.d.ts +30 -6
  162. package/dist/esm/assurance/assurance-program.schemas.d.ts.map +1 -1
  163. package/dist/esm/assurance/assurance-program.schemas.js +29 -6
  164. package/dist/esm/assurance/assurance-program.schemas.js.map +1 -1
  165. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts +1 -0
  166. package/dist/esm/assurance/assurance-source-registry.definitions.d.ts.map +1 -1
  167. package/dist/esm/assurance/assurance-source-registry.definitions.js +12 -0
  168. package/dist/esm/assurance/assurance-source-registry.definitions.js.map +1 -1
  169. package/dist/esm/assurance/assurance-sources.schemas.d.ts +76 -0
  170. package/dist/esm/assurance/assurance-sources.schemas.d.ts.map +1 -1
  171. package/dist/esm/assurance/assurance-sources.schemas.js +59 -0
  172. package/dist/esm/assurance/assurance-sources.schemas.js.map +1 -1
  173. package/dist/esm/assurance/document-publication.family-aspects.d.ts +29 -0
  174. package/dist/esm/assurance/document-publication.family-aspects.d.ts.map +1 -0
  175. package/dist/esm/assurance/document-publication.family-aspects.js +48 -0
  176. package/dist/esm/assurance/document-publication.family-aspects.js.map +1 -0
  177. package/dist/esm/assurance.exports.d.ts +2 -0
  178. package/dist/esm/assurance.exports.d.ts.map +1 -1
  179. package/dist/esm/assurance.exports.js +2 -0
  180. package/dist/esm/assurance.exports.js.map +1 -1
  181. package/dist/esm/companion-exports.d.ts +19 -2
  182. package/dist/esm/companion-exports.d.ts.map +1 -1
  183. package/dist/esm/companion-exports.js.map +1 -1
  184. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.d.ts.map +1 -1
  185. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js +2 -0
  186. package/dist/esm/engine/applications/resources/application-api-keys.resource.specification.js.map +1 -1
  187. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.d.ts.map +1 -1
  188. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js +3 -1
  189. package/dist/esm/engine/applications/resources/application-metadata.resource.specification.js.map +1 -1
  190. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.d.ts.map +1 -1
  191. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js +3 -1
  192. package/dist/esm/engine/applications/resources/application-oauth-clients.resource.specification.js.map +1 -1
  193. package/dist/esm/engine/applications/resources/application-versions.resource.specification.d.ts.map +1 -1
  194. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js +3 -1
  195. package/dist/esm/engine/applications/resources/application-versions.resource.specification.js.map +1 -1
  196. package/dist/esm/engine/applications/resources/applications.resource.specification.d.ts.map +1 -1
  197. package/dist/esm/engine/applications/resources/applications.resource.specification.js +3 -1
  198. package/dist/esm/engine/applications/resources/applications.resource.specification.js.map +1 -1
  199. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts +36 -0
  200. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.d.ts.map +1 -0
  201. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js +193 -0
  202. package/dist/esm/engine/auth/resources/consumable-tokens.resource.specification.js.map +1 -0
  203. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts +1 -1
  204. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.d.ts.map +1 -1
  205. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js +2 -0
  206. package/dist/esm/engine/auth/resources/oauth-consent-grants.resource.specification.js.map +1 -1
  207. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.d.ts.map +1 -1
  208. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js +2 -0
  209. package/dist/esm/engine/auth/resources/organization-api-keys.resource.specification.js.map +1 -1
  210. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.d.ts.map +1 -1
  211. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js +3 -1
  212. package/dist/esm/engine/auth/resources/organization-oauth-clients.resource.specification.js.map +1 -1
  213. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts +1 -1
  214. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.d.ts.map +1 -1
  215. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js +2 -0
  216. package/dist/esm/engine/auth/resources/platform-access-grants.resource.specification.js.map +1 -1
  217. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.d.ts.map +1 -1
  218. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js +2 -0
  219. package/dist/esm/engine/auth/resources/scim-provisioning-config.resource.specification.js.map +1 -1
  220. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.d.ts.map +1 -1
  221. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js +2 -0
  222. package/dist/esm/engine/auth/resources/scim-tokens.resource.specification.js.map +1 -1
  223. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.d.ts.map +1 -1
  224. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js +2 -0
  225. package/dist/esm/engine/auth/resources/siem-delivery-dlq.resource.specification.js.map +1 -1
  226. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.d.ts.map +1 -1
  227. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js +6 -4
  228. package/dist/esm/engine/auth/resources/siem-export-config.resource.specification.js.map +1 -1
  229. package/dist/esm/engine/auth/resources/sso-config.resource.specification.d.ts.map +1 -1
  230. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js +2 -0
  231. package/dist/esm/engine/auth/resources/sso-config.resource.specification.js.map +1 -1
  232. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.d.ts.map +1 -1
  233. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js +2 -0
  234. package/dist/esm/engine/auth/resources/sso-connections.resource.specification.js.map +1 -1
  235. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts +2 -2
  236. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.d.ts.map +1 -1
  237. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js +2 -0
  238. package/dist/esm/engine/billing/resources/billing-accounts.resource.specification.js.map +1 -1
  239. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts +8 -8
  240. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.d.ts.map +1 -1
  241. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js +2 -0
  242. package/dist/esm/engine/billing/resources/credit-pools.resource.specification.js.map +1 -1
  243. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts +2 -2
  244. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.d.ts.map +1 -1
  245. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js +2 -0
  246. package/dist/esm/engine/billing/resources/invoice-refs.resource.specification.js.map +1 -1
  247. package/dist/esm/engine/billing/resources/prices.resource.specification.d.ts.map +1 -1
  248. package/dist/esm/engine/billing/resources/prices.resource.specification.js +3 -1
  249. package/dist/esm/engine/billing/resources/prices.resource.specification.js.map +1 -1
  250. package/dist/esm/engine/billing/resources/products.resource.specification.d.ts.map +1 -1
  251. package/dist/esm/engine/billing/resources/products.resource.specification.js +3 -1
  252. package/dist/esm/engine/billing/resources/products.resource.specification.js.map +1 -1
  253. package/dist/esm/engine/billing/resources/promotions.resource.specification.d.ts.map +1 -1
  254. package/dist/esm/engine/billing/resources/promotions.resource.specification.js +2 -0
  255. package/dist/esm/engine/billing/resources/promotions.resource.specification.js.map +1 -1
  256. package/dist/esm/engine/billing/resources/referrals.resource.specification.d.ts.map +1 -1
  257. package/dist/esm/engine/billing/resources/referrals.resource.specification.js +3 -1
  258. package/dist/esm/engine/billing/resources/referrals.resource.specification.js.map +1 -1
  259. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts +6 -6
  260. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.d.ts.map +1 -1
  261. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js +2 -0
  262. package/dist/esm/engine/billing/resources/subscriptions.resource.specification.js.map +1 -1
  263. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts +6 -6
  264. package/dist/esm/engine/billing/resources/usage-records.resource.specification.d.ts.map +1 -1
  265. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js +2 -0
  266. package/dist/esm/engine/billing/resources/usage-records.resource.specification.js.map +1 -1
  267. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.d.ts.map +1 -1
  268. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js +2 -0
  269. package/dist/esm/engine/compliance/resources/audit-logs.resource.specification.js.map +1 -1
  270. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  271. package/dist/esm/engine/engine-resource-specifications.registry.js +5 -0
  272. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  273. package/dist/esm/engine/engine-resource-sub-domain.d.ts +63 -0
  274. package/dist/esm/engine/engine-resource-sub-domain.d.ts.map +1 -0
  275. package/dist/esm/engine/engine-resource-sub-domain.js +87 -0
  276. package/dist/esm/engine/engine-resource-sub-domain.js.map +1 -0
  277. package/dist/esm/engine/errors/error-messages.specification.d.ts.map +1 -1
  278. package/dist/esm/engine/errors/error-messages.specification.js +30 -1
  279. package/dist/esm/engine/errors/error-messages.specification.js.map +1 -1
  280. package/dist/esm/engine/features/resources/application-features.resource.specification.d.ts.map +1 -1
  281. package/dist/esm/engine/features/resources/application-features.resource.specification.js +2 -0
  282. package/dist/esm/engine/features/resources/application-features.resource.specification.js.map +1 -1
  283. package/dist/esm/engine/features/resources/organization-features.resource.specification.d.ts.map +1 -1
  284. package/dist/esm/engine/features/resources/organization-features.resource.specification.js +2 -0
  285. package/dist/esm/engine/features/resources/organization-features.resource.specification.js.map +1 -1
  286. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts +1 -1
  287. package/dist/esm/engine/features/resources/user-features.resource.specification.d.ts.map +1 -1
  288. package/dist/esm/engine/features/resources/user-features.resource.specification.js +2 -0
  289. package/dist/esm/engine/features/resources/user-features.resource.specification.js.map +1 -1
  290. package/dist/esm/engine/files/resources/files.resource.specification.d.ts.map +1 -1
  291. package/dist/esm/engine/files/resources/files.resource.specification.js +2 -0
  292. package/dist/esm/engine/files/resources/files.resource.specification.js.map +1 -1
  293. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts +3 -3
  294. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.d.ts.map +1 -1
  295. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js +12 -0
  296. package/dist/esm/engine/flows-actors/resources/a2a-push-delivery-log.resource.specification.js.map +1 -1
  297. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts +3 -3
  298. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.d.ts.map +1 -1
  299. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js +2 -0
  300. package/dist/esm/engine/flows-actors/resources/a2a-token-budget-state.resource.specification.js.map +1 -1
  301. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts +3 -3
  302. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.d.ts.map +1 -1
  303. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js +2 -0
  304. package/dist/esm/engine/flows-actors/resources/flow-actor-executions.resource.specification.js.map +1 -1
  305. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts +3 -3
  306. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.d.ts.map +1 -1
  307. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +3 -1
  308. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
  309. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.d.ts.map +1 -1
  310. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js +8 -3
  311. package/dist/esm/engine/frontend-components/app/public-layout-main-container.frontend-component.specification.js.map +1 -1
  312. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts +1 -1
  313. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.d.ts.map +1 -1
  314. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js +3 -0
  315. package/dist/esm/engine/guidance/resources/guidance-state.resource.specification.js.map +1 -1
  316. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts +1 -1
  317. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.d.ts.map +1 -1
  318. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js +3 -0
  319. package/dist/esm/engine/guidance/resources/lifecycle-state.resource.specification.js.map +1 -1
  320. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts +1 -1
  321. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.d.ts.map +1 -1
  322. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js +3 -0
  323. package/dist/esm/engine/guidance/resources/progression-state.resource.specification.js.map +1 -1
  324. package/dist/esm/engine/index.d.ts +1 -0
  325. package/dist/esm/engine/index.d.ts.map +1 -1
  326. package/dist/esm/engine/index.js +1 -0
  327. package/dist/esm/engine/index.js.map +1 -1
  328. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.d.ts.map +1 -1
  329. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js +2 -0
  330. package/dist/esm/engine/infrastructure/resources/data-seed-runs.resource.specification.js.map +1 -1
  331. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.d.ts.map +1 -1
  332. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +2 -0
  333. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  334. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
  335. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js +2 -0
  336. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.js.map +1 -1
  337. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.d.ts.map +1 -1
  338. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js +2 -0
  339. package/dist/esm/engine/infrastructure/resources/job-payload-storage.resource.specification.js.map +1 -1
  340. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.d.ts.map +1 -1
  341. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js +2 -0
  342. package/dist/esm/engine/notifications/resources/m2m-webhook-delivery-log.resource.specification.js.map +1 -1
  343. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts +1 -1
  344. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.d.ts.map +1 -1
  345. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js +3 -0
  346. package/dist/esm/engine/notifications/resources/notification-badges.resource.specification.js.map +1 -1
  347. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.d.ts.map +1 -1
  348. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js +2 -0
  349. package/dist/esm/engine/notifications/resources/webhook-config.resource.specification.js.map +1 -1
  350. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts +1 -1
  351. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.d.ts.map +1 -1
  352. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js +2 -0
  353. package/dist/esm/engine/organizations/resources/organization-members.resource.specification.js.map +1 -1
  354. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.d.ts.map +1 -1
  355. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js +2 -0
  356. package/dist/esm/engine/organizations/resources/organization-notifications.resource.specification.js.map +1 -1
  357. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.d.ts.map +1 -1
  358. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js +2 -0
  359. package/dist/esm/engine/organizations/resources/organization-preferences.resource.specification.js.map +1 -1
  360. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.d.ts.map +1 -1
  361. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js +2 -0
  362. package/dist/esm/engine/organizations/resources/organization-profiles.resource.specification.js.map +1 -1
  363. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.d.ts.map +1 -1
  364. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js +2 -0
  365. package/dist/esm/engine/organizations/resources/organization-unit-members.resource.specification.js.map +1 -1
  366. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.d.ts.map +1 -1
  367. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +2 -0
  368. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
  369. package/dist/esm/engine/organizations/resources/organizations.resource.specification.d.ts.map +1 -1
  370. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js +2 -0
  371. package/dist/esm/engine/organizations/resources/organizations.resource.specification.js.map +1 -1
  372. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.d.ts.map +1 -1
  373. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js +2 -0
  374. package/dist/esm/engine/users/resources/anonymous-users.resource.specification.js.map +1 -1
  375. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts +1 -1
  376. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.d.ts.map +1 -1
  377. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js +2 -0
  378. package/dist/esm/engine/users/resources/inbound-contacts.resource.specification.js.map +1 -1
  379. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts +1 -1
  380. package/dist/esm/engine/users/resources/user-credentials.resource.specification.d.ts.map +1 -1
  381. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js +2 -0
  382. package/dist/esm/engine/users/resources/user-credentials.resource.specification.js.map +1 -1
  383. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts +1 -1
  384. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.d.ts.map +1 -1
  385. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js +2 -0
  386. package/dist/esm/engine/users/resources/user-identity-links.resource.specification.js.map +1 -1
  387. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +1 -1
  388. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts.map +1 -1
  389. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js +2 -0
  390. package/dist/esm/engine/users/resources/user-preferences.resource.specification.js.map +1 -1
  391. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts +1 -1
  392. package/dist/esm/engine/users/resources/user-profiles.resource.specification.d.ts.map +1 -1
  393. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js +2 -0
  394. package/dist/esm/engine/users/resources/user-profiles.resource.specification.js.map +1 -1
  395. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +1 -1
  396. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
  397. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +2 -0
  398. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  399. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts +1 -1
  400. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.d.ts.map +1 -1
  401. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js +2 -0
  402. package/dist/esm/engine/users/resources/user-self-profiles.resource.specification.js.map +1 -1
  403. package/dist/esm/engine/users/resources/user-self.resource.specification.d.ts.map +1 -1
  404. package/dist/esm/engine/users/resources/user-self.resource.specification.js +3 -1
  405. package/dist/esm/engine/users/resources/user-self.resource.specification.js.map +1 -1
  406. package/dist/esm/engine/users/resources/users.resource.specification.d.ts.map +1 -1
  407. package/dist/esm/engine/users/resources/users.resource.specification.js +2 -0
  408. package/dist/esm/engine/users/resources/users.resource.specification.js.map +1 -1
  409. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts +5 -0
  410. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.d.ts.map +1 -1
  411. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js +385 -9
  412. package/dist/esm/technical-documentation/engine-documentation-specification-catalog.companion.js.map +1 -1
  413. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js +1 -1
  414. package/dist/esm/technical-documentation/technical-documentation-units.schemas.js.map +1 -1
  415. package/dist/tsconfig.build.tsbuildinfo +1 -0
  416. package/package.json +8 -8
  417. package/dist/esm/.builder.pid +0 -9
  418. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts +0 -0
  419. package/dist/esm/_core/business-coverage/coverage-findings-validation.d.ts.map +0 -0
  420. package/dist/esm/_core/business-coverage/coverage-findings-validation.js.map +0 -0
  421. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts +0 -0
  422. package/dist/esm/_core/business-coverage/coverage-findings.schemas.d.ts.map +0 -0
  423. package/dist/esm/_core/business-coverage/coverage-findings.schemas.js.map +0 -0
@@ -98,31 +98,54 @@ const ApplicationDocumentFactDeclarationAuthorityCommonSchema = z.strictObject({
98
98
  authorityVersion: GovernedDocumentPositiveSafeIntegerSchema,
99
99
  });
100
100
  /**
101
- * Authority metadata authored for one accepted document fact.
101
+ * The DERIVED authority: the accepted semantic member itself is the authority, so the host binds its
102
+ * exact family head and validation receipts and there is no human to name.
102
103
  *
103
- * `APPLICATION_SPECIFICATION` means the accepted semantic member itself is
104
- * the authority and the host must bind its exact family head and validation
105
- * receipts. Human decisions retain their actual decision instant and named
106
- * accountable actors; accepting the surrounding specification never rewrites
107
- * that instant or silently upgrades the authority kind.
104
+ * It carries no `decidedAt`, and that absence is the whole reason a generator may produce it: there is
105
+ * no decision instant to invent and no accountable actor to fabricate.
106
+ */
107
+ const ApplicationDocumentFactDeclarationApplicationSpecificationAuthoritySchema = ApplicationDocumentFactDeclarationAuthorityCommonSchema.extend({
108
+ factAuthorityKind: z.literal(AssuranceDocumentFactAuthorityKind.APPLICATION_SPECIFICATION),
109
+ });
110
+ /** A creator's decision: a named human, at a real instant. */
111
+ const ApplicationDocumentFactDeclarationCreatorDecisionAuthoritySchema = ApplicationDocumentFactDeclarationAuthorityCommonSchema.extend({
112
+ factAuthorityKind: z.literal(AssuranceDocumentFactAuthorityKind.CREATOR_DECISION),
113
+ decidedByRef: AuthoredNamespacedRefSchema,
114
+ decidedAt: AssuranceIsoDateTimeSchema,
115
+ });
116
+ /** A qualified review: a named author, a named reviewer, their qualifications, and what they disclose. */
117
+ const ApplicationDocumentFactDeclarationQualifiedReviewAuthoritySchema = ApplicationDocumentFactDeclarationAuthorityCommonSchema.extend({
118
+ factAuthorityKind: z.literal(AssuranceDocumentFactAuthorityKind.QUALIFIED_REVIEW),
119
+ authorRef: AuthoredNamespacedRefSchema,
120
+ reviewerRef: AuthoredNamespacedRefSchema,
121
+ reviewerQualificationRefs: z.array(AuthoredNamespacedRefSchema).min(1),
122
+ independenceDisclosure: z.string().trim().min(1),
123
+ decidedAt: AssuranceIsoDateTimeSchema,
124
+ });
125
+ /**
126
+ * Every authority kind — the READER's union.
127
+ *
128
+ * A consumer that reads facts does not care which family a declaration came from: the document asserts
129
+ * the FACT. So this stays whole, and the two WRITER unions below are its disjoint halves.
130
+ *
131
+ * Human decisions retain their actual decision instant and named accountable actors; accepting the
132
+ * surrounding specification never rewrites that instant or silently upgrades the authority kind.
108
133
  */
109
134
  export const ApplicationDocumentFactDeclarationAuthoritySchema = z.discriminatedUnion("factAuthorityKind", [
110
- ApplicationDocumentFactDeclarationAuthorityCommonSchema.extend({
111
- factAuthorityKind: z.literal(AssuranceDocumentFactAuthorityKind.APPLICATION_SPECIFICATION),
112
- }),
113
- ApplicationDocumentFactDeclarationAuthorityCommonSchema.extend({
114
- factAuthorityKind: z.literal(AssuranceDocumentFactAuthorityKind.CREATOR_DECISION),
115
- decidedByRef: AuthoredNamespacedRefSchema,
116
- decidedAt: AssuranceIsoDateTimeSchema,
117
- }),
118
- ApplicationDocumentFactDeclarationAuthorityCommonSchema.extend({
119
- factAuthorityKind: z.literal(AssuranceDocumentFactAuthorityKind.QUALIFIED_REVIEW),
120
- authorRef: AuthoredNamespacedRefSchema,
121
- reviewerRef: AuthoredNamespacedRefSchema,
122
- reviewerQualificationRefs: z.array(AuthoredNamespacedRefSchema).min(1),
123
- independenceDisclosure: z.string().trim().min(1),
124
- decidedAt: AssuranceIsoDateTimeSchema,
125
- }),
135
+ ApplicationDocumentFactDeclarationApplicationSpecificationAuthoritySchema,
136
+ ApplicationDocumentFactDeclarationCreatorDecisionAuthoritySchema,
137
+ ApplicationDocumentFactDeclarationQualifiedReviewAuthoritySchema,
138
+ ]);
139
+ /**
140
+ * The AUTHORED half — a human said it.
141
+ *
142
+ * Kept as a union rather than folded into one shape because the two differ in what they must disclose:
143
+ * a creator decision names who decided, a qualified review additionally names who reviewed, against
144
+ * what qualifications, and how independent they were.
145
+ */
146
+ const ApplicationAuthoredDocumentFactDeclarationAuthoritySchema = z.discriminatedUnion("factAuthorityKind", [
147
+ ApplicationDocumentFactDeclarationCreatorDecisionAuthoritySchema,
148
+ ApplicationDocumentFactDeclarationQualifiedReviewAuthoritySchema,
126
149
  ]);
127
150
  const ApplicationDocumentFactDeclarationCommonSchema = z.strictObject({
128
151
  declarationRef: AuthoredNamespacedRefSchema,
@@ -131,26 +154,16 @@ const ApplicationDocumentFactDeclarationCommonSchema = z.strictObject({
131
154
  factVersion: GovernedDocumentPositiveSafeIntegerSchema,
132
155
  governanceScope: AuthoredGovernanceScopeSchema,
133
156
  sensitivityRef: AuthoredNamespacedRefSchema,
134
- authority: ApplicationDocumentFactDeclarationAuthoritySchema,
135
157
  validUntil: AssuranceIsoDateTimeSchema.optional(),
136
158
  });
137
159
  /**
138
- * One raw application-owned fact decision. The host, not the application,
139
- * derives contribution ids, digests, accepted-head identities, semantic-member
140
- * digests and validation-receipt joins from this declaration.
160
+ * The namespace, ordering and instant rules a declaration must satisfy whoever wrote it.
161
+ *
162
+ * Shared deliberately: the DERIVED and AUTHORED families differ in WHO may assert a fact, never in what
163
+ * a well-formed assertion looks like. Two copies of these rules would drift into two grammars for one
164
+ * vocabulary — `invariant-call-site-enumeration.md` #4.
141
165
  */
142
- export const ApplicationDocumentFactDeclarationSchema = z
143
- .discriminatedUnion("resolutionKind", [
144
- ApplicationDocumentFactDeclarationCommonSchema.extend({
145
- resolutionKind: z.literal(ApplicationAssuranceDocumentFactContributionResolutionKind.KNOWN),
146
- value: z.json(),
147
- }),
148
- ApplicationDocumentFactDeclarationCommonSchema.extend({
149
- resolutionKind: z.literal(ApplicationAssuranceDocumentFactContributionResolutionKind.NOT_APPLICABLE),
150
- reason: z.string().trim().min(1),
151
- }),
152
- ])
153
- .superRefine((declaration, context) => {
166
+ const refineDocumentFactDeclaration = (declaration, context) => {
154
167
  if (!declaration.declarationRef.startsWith("document-fact-declaration:")) {
155
168
  context.addIssue({ code: "custom", message: "declarationRef must use the document-fact-declaration: namespace", path: ["declarationRef"] });
156
169
  }
@@ -179,34 +192,69 @@ export const ApplicationDocumentFactDeclarationSchema = z
179
192
  if (authorityInstant && declaration.validUntil && Date.parse(declaration.validUntil) <= Date.parse(authorityInstant)) {
180
193
  context.addIssue({ code: "custom", message: "validUntil must follow the human authority decision", path: ["validUntil"] });
181
194
  }
182
- });
183
- const applicationDocumentFactDeclarationScopeKey = (declaration) => `${declaration.factRef}@${declaration.factVersion}:${JSON.stringify(declaration.governanceScope)}`;
195
+ };
184
196
  /**
185
- * @wildo_source:part:start saas.specifications.application-document-fact-specification.contract facet:layer:specification facet:family:assurance
197
+ * The two declaration shapes a FILE is parsed against. They differ in exactly one field — who may
198
+ * assert the fact — and share every other rule through {@link refineDocumentFactDeclaration}.
186
199
  *
187
- * Accepted application declaration of governed-document facts that cannot be
188
- * inferred from framework code. Import from
189
- * `@wildo-ai/saas-specifications/application-creation`.
200
+ * Written out rather than produced by a shared factory, and that is a measured decision: a generic
201
+ * `<TAuthority extends z.ZodType<…>>` helper compiles, but Zod's `.extend()` cannot carry a generic
202
+ * schema's output into the extended object's inferred type, so every declaration came back missing its
203
+ * `authority` field. A factory that erases the one property the split exists to constrain is worse than
204
+ * two explicit unions.
205
+ */
206
+ /**
207
+ * A DERIVED declaration — `document-facts`, the family a producer writes.
190
208
  *
191
- * This family carries raw decisions only. It never authors contribution
192
- * digests, accepted-head identities, validation receipts, reviewer grants,
193
- * document approvals or releases. The trusted application-creation host seals
194
- * each declaration into the exact contribution form required by the fact
195
- * resolver. A missing family or missing declaration therefore remains a
196
- * visible fact gap.
209
+ * Its authority union has exactly one member, and that is the point of the split (#192): the
210
+ * `refinement.document-facts` producer regenerates this whole file, so a human decision left in it is
211
+ * silently overwritten on the next run. Narrowing the TYPE is what makes "a generator may never write a
212
+ * `CREATOR_DECISION`" structural instead of a rule somebody has to remember — the generation contract
213
+ * already said so in prose (`document-fact-specification-generation.schemas.ts`) and nothing enforced
214
+ * it on the file the generator lands.
215
+ */
216
+ export const ApplicationDerivedDocumentFactDeclarationSchema = z
217
+ .discriminatedUnion("resolutionKind", [
218
+ ApplicationDocumentFactDeclarationCommonSchema.extend({
219
+ authority: ApplicationDocumentFactDeclarationApplicationSpecificationAuthoritySchema,
220
+ resolutionKind: z.literal(ApplicationAssuranceDocumentFactContributionResolutionKind.KNOWN),
221
+ value: z.json(),
222
+ }),
223
+ ApplicationDocumentFactDeclarationCommonSchema.extend({
224
+ authority: ApplicationDocumentFactDeclarationApplicationSpecificationAuthoritySchema,
225
+ resolutionKind: z.literal(ApplicationAssuranceDocumentFactContributionResolutionKind.NOT_APPLICABLE),
226
+ reason: z.string().trim().min(1),
227
+ }),
228
+ ])
229
+ .superRefine((declaration, context) => refineDocumentFactDeclaration(declaration, context));
230
+ /**
231
+ * An AUTHORED declaration — `document-facts-authored`, the family only a human writes.
197
232
  *
198
- * One snapshot may contain facts for several document definitions, but it may
199
- * contain only one current declaration for a given fact version and governance
200
- * scope. Replacing a decision requires a new declaration/specification version
201
- * and normal specification-family acceptance; conflicting current values are
202
- * rejected at the authoring boundary instead of being hidden downstream.
233
+ * The mirror of the rule above: nothing here may claim `APPLICATION_SPECIFICATION` authority, because a
234
+ * fact the accepted specification can answer belongs in the derived family where it stays in step with
235
+ * the specification. Filing one here would freeze a derivable answer at the moment somebody typed it.
203
236
  */
204
- export const ApplicationDocumentFactSpecificationSchema = z
237
+ export const ApplicationAuthoredDocumentFactDeclarationSchema = z
238
+ .discriminatedUnion("resolutionKind", [
239
+ ApplicationDocumentFactDeclarationCommonSchema.extend({
240
+ authority: ApplicationAuthoredDocumentFactDeclarationAuthoritySchema,
241
+ resolutionKind: z.literal(ApplicationAssuranceDocumentFactContributionResolutionKind.KNOWN),
242
+ value: z.json(),
243
+ }),
244
+ ApplicationDocumentFactDeclarationCommonSchema.extend({
245
+ authority: ApplicationAuthoredDocumentFactDeclarationAuthoritySchema,
246
+ resolutionKind: z.literal(ApplicationAssuranceDocumentFactContributionResolutionKind.NOT_APPLICABLE),
247
+ reason: z.string().trim().min(1),
248
+ }),
249
+ ])
250
+ .superRefine((declaration, context) => refineDocumentFactDeclaration(declaration, context));
251
+ const applicationDocumentFactDeclarationScopeKey = (declaration) => `${declaration.factRef}@${declaration.factVersion}:${JSON.stringify(declaration.governanceScope)}`;
252
+ const buildDocumentFactSpecificationSchema = (declarationSchema) => z
205
253
  .strictObject({
206
254
  schemaVersion: z.literal(1),
207
255
  specificationRef: AuthoredNamespacedRefSchema,
208
256
  specificationVersion: GovernedDocumentPositiveSafeIntegerSchema,
209
- declarations: z.array(ApplicationDocumentFactDeclarationSchema).min(1),
257
+ declarations: z.array(declarationSchema).min(1),
210
258
  })
211
259
  .superRefine((specification, context) => {
212
260
  if (!specification.specificationRef.startsWith("document-fact-specification:")) {
@@ -229,7 +277,54 @@ export const ApplicationDocumentFactSpecificationSchema = z
229
277
  });
230
278
  }
231
279
  });
280
+ /**
281
+ * @wildo_source:part:start saas.specifications.application-document-fact-specification.contract facet:layer:specification facet:family:assurance
282
+ *
283
+ * Accepted application declaration of governed-document facts THE ACCEPTED SPECIFICATION ANSWERS.
284
+ * Import from `@wildo-ai/saas-specifications/application-creation`.
285
+ *
286
+ * This family carries raw decisions only. It never authors contribution
287
+ * digests, accepted-head identities, validation receipts, reviewer grants,
288
+ * document approvals or releases. The trusted application-creation host seals
289
+ * each declaration into the exact contribution form required by the fact
290
+ * resolver. A missing family or missing declaration therefore remains a
291
+ * visible fact gap.
292
+ *
293
+ * One snapshot may contain facts for several document definitions, but it may
294
+ * contain only one current declaration for a given fact version and governance
295
+ * scope. Replacing a decision requires a new declaration/specification version
296
+ * and normal specification-family acceptance; conflicting current values are
297
+ * rejected at the authoring boundary instead of being hidden downstream.
298
+ *
299
+ * ## This file is REGENERATED, and that is why it accepts one authority kind
300
+ *
301
+ * `refinement.document-facts` rewrites it whole. Before #192 the same file also held the facts only a
302
+ * human may establish, so the next producer run silently deleted them — and there was no compare-and-
303
+ * swap to notice, by design (`.claude/rules/one-source-of-truth.md` Rule 0). The facts a human owns
304
+ * live in {@link ApplicationAuthoredDocumentFactSpecificationSchema}, in their own file, which no
305
+ * producer writes.
306
+ */
307
+ export const ApplicationDocumentFactSpecificationSchema = buildDocumentFactSpecificationSchema(ApplicationDerivedDocumentFactDeclarationSchema);
232
308
  /** @wildo_source:part:end saas.specifications.application-document-fact-specification.contract */
309
+ /**
310
+ * @wildo_source:part:start saas.specifications.application-authored-document-fact-specification.contract facet:layer:specification facet:family:assurance
311
+ *
312
+ * Accepted application declaration of governed-document facts ONLY A HUMAN MAY ESTABLISH — a creator's
313
+ * decision, or a qualified review. Import from
314
+ * `@wildo-ai/saas-specifications/application-creation`.
315
+ *
316
+ * Structurally identical to {@link ApplicationDocumentFactSpecificationSchema}: a declaration is a
317
+ * declaration whoever wrote it, and a document reading facts does not care which file one came from.
318
+ * The two are separate FAMILIES so that neither writer can destroy the other's half — the derived file
319
+ * is regenerated by a producer, this one is only ever edited by a person or by a host acting on a
320
+ * person's answers.
321
+ *
322
+ * Nothing in here may carry `APPLICATION_SPECIFICATION` authority. A fact the specification can answer
323
+ * belongs in the derived family, where it is re-derived when the specification moves; pinning it here
324
+ * would freeze yesterday's answer under a human's name.
325
+ */
326
+ export const ApplicationAuthoredDocumentFactSpecificationSchema = buildDocumentFactSpecificationSchema(ApplicationAuthoredDocumentFactDeclarationSchema);
327
+ /** @wildo_source:part:end saas.specifications.application-authored-document-fact-specification.contract */
233
328
  export var ApplicationDocumentFactSpecificationIssueSeverity;
234
329
  (function (ApplicationDocumentFactSpecificationIssueSeverity) {
235
330
  ApplicationDocumentFactSpecificationIssueSeverity["ERROR"] = "ERROR";
@@ -255,6 +350,12 @@ export var ApplicationDocumentFactSpecificationIssueSeverity;
255
350
  * This function returned `{ ok: true, issues: [] }` on every input until 2026-08-28 — the family's
256
351
  * semantic layer was empty while its schema did all the work, so the two gaps above were unreachable
257
352
  * by any check.
353
+ *
354
+ * ## Serves BOTH fact families
355
+ *
356
+ * It reads `resolutionKind`, `value` and `factRef`, all of which are common to the derived and authored
357
+ * declarations — a vacuous value is vacuous whoever asserted it. So the parameter is the structural
358
+ * minimum rather than one family's type, and neither family gets a second copy of this rule.
258
359
  */
259
360
  export function validateApplicationDocumentFactSpecification(specification) {
260
361
  const issues = [];
@@ -1 +1 @@
1
- {"version":3,"file":"application-document-fact-specification.application-creation.schemas.js","sourceRoot":"","sources":["../../../../src/application-creation/application-document-fact-specification.application-creation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qCAAqC,EAAE,yCAAyC,EAAE,MAAM,uBAAuB,CAAC;AACzH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,kCAAkC,EAAE,0BAA0B,EAAE,MAAM,sBA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AAC,CAAC,CAAC;IACH,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;AAC7C,CAAC","sourcesContent":["import { GovernedDocumentGovernanceSubjectKind, GovernedDocumentPositiveSafeIntegerSchema } from \"@wildo-ai/saas-models\";\nimport { z } from \"zod\";\n\nimport { AssuranceDocumentFactAuthorityKind, AssuranceIsoDateTimeSchema } from \"../assurance.exports\";\n\n/**\n * A namespaced ref as an AUTHOR writes it — the same `namespace:slug` grammar as\n * `AuthoredNamespacedRefSchema`, and deliberately NOT branded.\n *\n * ## Why this file cannot use the branded one\n *\n * A brand is nominal typing: `string & $brand<\"AssuranceNamespacedRef\">`. A plain string literal is not\n * assignable to it, so a field typed that way **cannot be written as a literal at all** — not by a\n * human, and not by the landing renderer, which emits exactly what a human would write. The only way\n * past is a cast, and a cast asserts the very thing the brand exists to prove.\n *\n * That made this family unauthorable, and it went unnoticed for one reason: the family could not RENDER\n * either (its vocabularies were unnameable), so no file ever reached a typechecker. The moment rendering\n * was fixed, the first landed `document-facts` file produced **170 assignability errors** in the\n * application's own specifications package — every ref field, plus every ref inside the embedded\n * governance scope.\n *\n * ## The line this draws, and it is the one this lane keeps rediscovering\n *\n * A branded type is right for a value obtained by PARSING and wrong for one written by HAND. This\n * family is an authored input — D7/D9: the facts are a FILE the application commits, like every other\n * family — so its fields are shaped for authoring, and the regex still does the validating. The sibling\n * `compliance-document-candidate` family made the same call independently, with its own unbranded\n * `ComplianceDocumentNamespacedRefSchema`; the two families disagreed for no stated reason, and this one\n * was the one nobody could write.\n *\n * Nothing depended on the brand: every consumer reads these refs as strings (the availability collector\n * keys a `Map<string, …>`), and the runtime path never noticed because it builds plain strings and lets\n * `.parse()` brand them.\n */\nconst AuthoredNamespacedRefSchema = z.string().trim().regex(\n /^[a-z0-9]+(?:[-.][a-z0-9]+)*:[a-z0-9]+(?:[-/.][a-z0-9]+)*$/u,\n \"expected a namespaced ref\",\n);\n\n/**\n * The governance scope as an AUTHOR writes it.\n *\n * Structurally the same question `GovernedDocumentGovernanceScopeSchema` answers — whose document this\n * is, and over what — restated with authored refs for the reason above: that schema's `subjectRef`,\n * `scopeRef`, `participantRefs` and `precedenceRuleRefs` are all branded `GovernedDocumentRef`, and it\n * serves RUNTIME document code where a parsed, branded ref is exactly right.\n *\n * The shared-responsibility rule is kept, because it is semantic rather than ceremonial: a scope\n * attributed to several parties must name at least two participants and say which one prevails, or the\n * document silently claims an allocation nobody made.\n */\nconst AuthoredGovernanceScopeSchema = z\n .strictObject({\n subjectKind: z.enum(GovernedDocumentGovernanceSubjectKind),\n subjectRef: AuthoredNamespacedRefSchema,\n scopeRef: AuthoredNamespacedRefSchema,\n scopeVersion: GovernedDocumentPositiveSafeIntegerSchema,\n participantRefs: z.array(AuthoredNamespacedRefSchema),\n precedenceRuleRefs: z.array(AuthoredNamespacedRefSchema),\n })\n .superRefine((scope, context) => {\n if (scope.subjectKind === GovernedDocumentGovernanceSubjectKind.SHARED_RESPONSIBILITY) {\n if (scope.participantRefs.length < 2) {\n context.addIssue({ code: \"custom\", path: [\"participantRefs\"], message: \"shared responsibility requires at least two attributed participants\" });\n }\n if (scope.precedenceRuleRefs.length === 0) {\n context.addIssue({ code: \"custom\", path: [\"precedenceRuleRefs\"], message: \"shared responsibility requires an explicit precedence rule\" });\n }\n return;\n }\n if (scope.participantRefs.length > 0 || scope.precedenceRuleRefs.length > 0) {\n context.addIssue({ code: \"custom\", path: [\"participantRefs\"], message: \"only a shared-responsibility scope attributes participants or precedence rules\" });\n }\n });\n\n/**\n * Whether a declared document fact HAS an answer, or was considered and does not apply.\n *\n * The two are different answers and a document that confuses them is wrong in different ways: \"we\n * perform no international transfers\" is a citable statement, while \"international transfers are not\n * applicable to us\" is the application declining to answer, and a clause resting on the second\n * asserts something nobody established. A fact ABSENT from the specification is neither — nobody has\n * considered it at all.\n *\n * It lived in `application-assurance-document-fact-projection.…schemas.ts` until 2026-08-28, when\n * that module — a host-computed projection carrying a projector identity, source-head digests and\n * per-contribution authority receipts — was deleted with the rest of the digest machinery\n * (`.claude/rules/one-source-of-truth.md`, Rule 0). This enum was the only thing in its 999 lines\n * that anything outside it used, and it belongs here: it is the resolution kind of a DECLARATION,\n * which is what this file is about.\n */\nexport enum ApplicationAssuranceDocumentFactContributionResolutionKind {\n /** The application declared this fact and it carries a value. */\n KNOWN = \"KNOWN\",\n /** The application considered this fact and it genuinely does not apply. Citable by nothing. */\n NOT_APPLICABLE = \"NOT_APPLICABLE\",\n}\n\nconst compareCanonicalText = (left: string, right: string): number => (left < right ? -1 : left > right ? 1 : 0);\nconst valuesAreUnique = (values: readonly string[]): boolean => new Set(values).size === values.length;\nconst valuesAreLexicallySorted = (values: readonly string[]): boolean =>\n values.every((value, index) => index === 0 || compareCanonicalText(values[index - 1]!, value) <= 0);\n\nconst ApplicationDocumentFactDeclarationAuthorityCommonSchema = z.strictObject({\n authorityRef: AuthoredNamespacedRefSchema,\n authorityVersion: GovernedDocumentPositiveSafeIntegerSchema,\n});\n\n/**\n * Authority metadata authored for one accepted document fact.\n *\n * `APPLICATION_SPECIFICATION` means the accepted semantic member itself is\n * the authority and the host must bind its exact family head and validation\n * receipts. Human decisions retain their actual decision instant and named\n * accountable actors; accepting the surrounding specification never rewrites\n * that instant or silently upgrades the authority kind.\n */\nexport const ApplicationDocumentFactDeclarationAuthoritySchema = z.discriminatedUnion(\"factAuthorityKind\", [\n ApplicationDocumentFactDeclarationAuthorityCommonSchema.extend({\n factAuthorityKind: z.literal(AssuranceDocumentFactAuthorityKind.APPLICATION_SPECIFICATION),\n }),\n ApplicationDocumentFactDeclarationAuthorityCommonSchema.extend({\n factAuthorityKind: z.literal(AssuranceDocumentFactAuthorityKind.CREATOR_DECISION),\n decidedByRef: AuthoredNamespacedRefSchema,\n decidedAt: AssuranceIsoDateTimeSchema,\n }),\n ApplicationDocumentFactDeclarationAuthorityCommonSchema.extend({\n factAuthorityKind: z.literal(AssuranceDocumentFactAuthorityKind.QUALIFIED_REVIEW),\n authorRef: AuthoredNamespacedRefSchema,\n reviewerRef: AuthoredNamespacedRefSchema,\n reviewerQualificationRefs: z.array(AuthoredNamespacedRefSchema).min(1),\n independenceDisclosure: z.string().trim().min(1),\n decidedAt: AssuranceIsoDateTimeSchema,\n }),\n]);\nexport type ApplicationDocumentFactDeclarationAuthority = z.infer<typeof ApplicationDocumentFactDeclarationAuthoritySchema>;\n\nconst ApplicationDocumentFactDeclarationCommonSchema = z.strictObject({\n declarationRef: AuthoredNamespacedRefSchema,\n declarationVersion: GovernedDocumentPositiveSafeIntegerSchema,\n factRef: AuthoredNamespacedRefSchema,\n factVersion: GovernedDocumentPositiveSafeIntegerSchema,\n governanceScope: AuthoredGovernanceScopeSchema,\n sensitivityRef: AuthoredNamespacedRefSchema,\n authority: ApplicationDocumentFactDeclarationAuthoritySchema,\n validUntil: AssuranceIsoDateTimeSchema.optional(),\n});\n\n/**\n * One raw application-owned fact decision. The host, not the application,\n * derives contribution ids, digests, accepted-head identities, semantic-member\n * digests and validation-receipt joins from this declaration.\n */\nexport const ApplicationDocumentFactDeclarationSchema = z\n .discriminatedUnion(\"resolutionKind\", [\n ApplicationDocumentFactDeclarationCommonSchema.extend({\n resolutionKind: z.literal(ApplicationAssuranceDocumentFactContributionResolutionKind.KNOWN),\n value: z.json(),\n }),\n ApplicationDocumentFactDeclarationCommonSchema.extend({\n resolutionKind: z.literal(ApplicationAssuranceDocumentFactContributionResolutionKind.NOT_APPLICABLE),\n reason: z.string().trim().min(1),\n }),\n ])\n .superRefine((declaration, context) => {\n if (!declaration.declarationRef.startsWith(\"document-fact-declaration:\")) {\n context.addIssue({ code: \"custom\", message: \"declarationRef must use the document-fact-declaration: namespace\", path: [\"declarationRef\"] });\n }\n if (!declaration.factRef.startsWith(\"document-fact:\")) {\n context.addIssue({ code: \"custom\", message: \"factRef must use the document-fact: namespace\", path: [\"factRef\"] });\n }\n if (!declaration.authority.authorityRef.startsWith(\"document-fact-authority:\")) {\n context.addIssue({ code: \"custom\", message: \"authorityRef must use the document-fact-authority: namespace\", path: [\"authority\", \"authorityRef\"] });\n }\n if (!declaration.sensitivityRef.startsWith(\"sensitivity:\")) {\n context.addIssue({ code: \"custom\", message: \"sensitivityRef must use the sensitivity: namespace\", path: [\"sensitivityRef\"] });\n }\n if (declaration.authority.factAuthorityKind === AssuranceDocumentFactAuthorityKind.QUALIFIED_REVIEW) {\n if (!valuesAreUnique(declaration.authority.reviewerQualificationRefs) || !valuesAreLexicallySorted(declaration.authority.reviewerQualificationRefs)) {\n context.addIssue({\n code: \"custom\",\n message: \"reviewerQualificationRefs must be unique and lexically sorted\",\n path: [\"authority\", \"reviewerQualificationRefs\"],\n });\n }\n if (declaration.authority.authorRef === declaration.authority.reviewerRef) {\n context.addIssue({ code: \"custom\", message: \"a qualified fact reviewer cannot be the fact author\", path: [\"authority\", \"reviewerRef\"] });\n }\n }\n const authorityInstant =\n declaration.authority.factAuthorityKind === AssuranceDocumentFactAuthorityKind.APPLICATION_SPECIFICATION ? undefined : declaration.authority.decidedAt;\n if (authorityInstant && declaration.validUntil && Date.parse(declaration.validUntil) <= Date.parse(authorityInstant)) {\n context.addIssue({ code: \"custom\", message: \"validUntil must follow the human authority decision\", path: [\"validUntil\"] });\n }\n });\nexport type ApplicationDocumentFactDeclaration = z.infer<typeof ApplicationDocumentFactDeclarationSchema>;\n\nconst applicationDocumentFactDeclarationScopeKey = (declaration: ApplicationDocumentFactDeclaration): string =>\n `${declaration.factRef}@${declaration.factVersion}:${JSON.stringify(declaration.governanceScope)}`;\n\n/**\n * @wildo_source:part:start saas.specifications.application-document-fact-specification.contract facet:layer:specification facet:family:assurance\n *\n * Accepted application declaration of governed-document facts that cannot be\n * inferred from framework code. Import from\n * `@wildo-ai/saas-specifications/application-creation`.\n *\n * This family carries raw decisions only. It never authors contribution\n * digests, accepted-head identities, validation receipts, reviewer grants,\n * document approvals or releases. The trusted application-creation host seals\n * each declaration into the exact contribution form required by the fact\n * resolver. A missing family or missing declaration therefore remains a\n * visible fact gap.\n *\n * One snapshot may contain facts for several document definitions, but it may\n * contain only one current declaration for a given fact version and governance\n * scope. Replacing a decision requires a new declaration/specification version\n * and normal specification-family acceptance; conflicting current values are\n * rejected at the authoring boundary instead of being hidden downstream.\n */\nexport const ApplicationDocumentFactSpecificationSchema = z\n .strictObject({\n schemaVersion: z.literal(1),\n specificationRef: AuthoredNamespacedRefSchema,\n specificationVersion: GovernedDocumentPositiveSafeIntegerSchema,\n declarations: z.array(ApplicationDocumentFactDeclarationSchema).min(1),\n })\n .superRefine((specification, context) => {\n if (!specification.specificationRef.startsWith(\"document-fact-specification:\")) {\n context.addIssue({\n code: \"custom\",\n message: \"specificationRef must use the document-fact-specification: namespace\",\n path: [\"specificationRef\"],\n });\n }\n const declarationIdentities = specification.declarations.map((declaration) => `${declaration.declarationRef}@${declaration.declarationVersion}`);\n if (!valuesAreUnique(declarationIdentities) || !valuesAreLexicallySorted(declarationIdentities)) {\n context.addIssue({ code: \"custom\", message: \"declarations must be unique and lexically sorted by identity\", path: [\"declarations\"] });\n }\n const factScopeKeys = specification.declarations.map(applicationDocumentFactDeclarationScopeKey);\n if (!valuesAreUnique(factScopeKeys)) {\n context.addIssue({\n code: \"custom\",\n message: \"a specification may declare only one current value for each fact version and governance scope\",\n path: [\"declarations\"],\n });\n }\n });\nexport type ApplicationDocumentFactSpecification = z.infer<typeof ApplicationDocumentFactSpecificationSchema>;\n/** @wildo_source:part:end saas.specifications.application-document-fact-specification.contract */\n\nexport enum ApplicationDocumentFactSpecificationIssueSeverity {\n ERROR = \"ERROR\",\n}\n\nexport interface ApplicationDocumentFactSpecificationIssue {\n readonly kind: \"invalid_document_fact_specification\";\n readonly severity: ApplicationDocumentFactSpecificationIssueSeverity;\n readonly path: string;\n readonly message: string;\n}\n\n/**\n * Content validation the schema alone cannot express.\n *\n * Keep the authorable family deliberately narrower than the portable resolver authority union: runtime\n * evidence belongs to an evidence producer, not to a TypeScript specification snapshot.\n *\n * ## The vacuity check, and why the schema cannot do it\n *\n * A KNOWN declaration's `value` is typed `z.json()`, because a fact may legitimately be prose, a number,\n * a date or a small structured record — the family cannot know which. That permissiveness leaves one\n * hole it must not leave: `\"\"`, `\" \"` and `null` all satisfy `z.json()` while carrying nothing. A\n * governed document clause resting on such a declaration cites a fact that EXISTS and SAYS NOTHING,\n * which is worse than citing an absent one, because the cross-family binding check\n * (`validateComplianceDocumentCandidateFactBinding`) sees a declared fact and passes it.\n *\n * That is the same vacuity class already closed on vision, roadmap, requirements and the build plan:\n * schema-valid, validator-clean, and carrying no information a reader could act on.\n *\n * This function returned `{ ok: true, issues: [] }` on every input until 2026-08-28 — the family's\n * semantic layer was empty while its schema did all the work, so the two gaps above were unreachable\n * by any check.\n */\nexport function validateApplicationDocumentFactSpecification(specification: ApplicationDocumentFactSpecification): {\n ok: boolean;\n issues: ApplicationDocumentFactSpecificationIssue[];\n} {\n const issues: ApplicationDocumentFactSpecificationIssue[] = [];\n specification.declarations.forEach((declaration, index) => {\n if (declaration.resolutionKind !== ApplicationAssuranceDocumentFactContributionResolutionKind.KNOWN) return;\n const value = declaration.value;\n const isVacuous =\n value === null\n || (typeof value === \"string\" && value.trim().length === 0)\n || (Array.isArray(value) && value.length === 0)\n || (typeof value === \"object\" && !Array.isArray(value) && value !== null && Object.keys(value).length === 0);\n if (!isVacuous) return;\n issues.push({\n kind: \"invalid_document_fact_specification\",\n severity: ApplicationDocumentFactSpecificationIssueSeverity.ERROR,\n path: `declarations.${index}.value`,\n message:\n `\"${declaration.factRef}\" is declared KNOWN but carries no value. `\n + \"State the fact, or declare it NOT_APPLICABLE with a reason — an empty value is a fact a document could cite and learn nothing from.\",\n });\n });\n return { ok: issues.length === 0, issues };\n}\n"]}
1
+ {"version":3,"file":"application-document-fact-specification.application-creation.schemas.js","sourceRoot":"","sources":["../../../../src/application-creation/application-document-fact-specification.application-creation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qCAAqC,EAAE,yCAAyC,E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AAI,CAAC,SAAS;YAAE,OAAO;QACvB,MAAM,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,qCAAqC;YAC3C,QAAQ,EAAE,iDAAiD,CAAC,KAAK;YACjE,IAAI,EAAE,gBAAgB,KAAK,QAAQ;YACnC,OAAO,EACL,IAAI,WAAW,CAAC,OAAO,4CAA4C;kBACjE,qIAAqI;SAC1I,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;AAC7C,CAAC","sourcesContent":["import { GovernedDocumentGovernanceSubjectKind, GovernedDocumentPositiveSafeIntegerSchema } from \"@wildo-ai/saas-models\";\nimport { z } from \"zod\";\n\nimport { AssuranceDocumentFactAuthorityKind, AssuranceIsoDateTimeSchema } from \"../assurance.exports\";\n\n/**\n * A namespaced ref as an AUTHOR writes it — the same `namespace:slug` grammar as\n * `AuthoredNamespacedRefSchema`, and deliberately NOT branded.\n *\n * ## Why this file cannot use the branded one\n *\n * A brand is nominal typing: `string & $brand<\"AssuranceNamespacedRef\">`. A plain string literal is not\n * assignable to it, so a field typed that way **cannot be written as a literal at all** — not by a\n * human, and not by the landing renderer, which emits exactly what a human would write. The only way\n * past is a cast, and a cast asserts the very thing the brand exists to prove.\n *\n * That made this family unauthorable, and it went unnoticed for one reason: the family could not RENDER\n * either (its vocabularies were unnameable), so no file ever reached a typechecker. The moment rendering\n * was fixed, the first landed `document-facts` file produced **170 assignability errors** in the\n * application's own specifications package — every ref field, plus every ref inside the embedded\n * governance scope.\n *\n * ## The line this draws, and it is the one this lane keeps rediscovering\n *\n * A branded type is right for a value obtained by PARSING and wrong for one written by HAND. This\n * family is an authored input — D7/D9: the facts are a FILE the application commits, like every other\n * family — so its fields are shaped for authoring, and the regex still does the validating. The sibling\n * `compliance-document-candidate` family made the same call independently, with its own unbranded\n * `ComplianceDocumentNamespacedRefSchema`; the two families disagreed for no stated reason, and this one\n * was the one nobody could write.\n *\n * Nothing depended on the brand: every consumer reads these refs as strings (the availability collector\n * keys a `Map<string, …>`), and the runtime path never noticed because it builds plain strings and lets\n * `.parse()` brand them.\n */\nconst AuthoredNamespacedRefSchema = z.string().trim().regex(\n /^[a-z0-9]+(?:[-.][a-z0-9]+)*:[a-z0-9]+(?:[-/.][a-z0-9]+)*$/u,\n \"expected a namespaced ref\",\n);\n\n/**\n * The governance scope as an AUTHOR writes it.\n *\n * Structurally the same question `GovernedDocumentGovernanceScopeSchema` answers — whose document this\n * is, and over what — restated with authored refs for the reason above: that schema's `subjectRef`,\n * `scopeRef`, `participantRefs` and `precedenceRuleRefs` are all branded `GovernedDocumentRef`, and it\n * serves RUNTIME document code where a parsed, branded ref is exactly right.\n *\n * The shared-responsibility rule is kept, because it is semantic rather than ceremonial: a scope\n * attributed to several parties must name at least two participants and say which one prevails, or the\n * document silently claims an allocation nobody made.\n */\nconst AuthoredGovernanceScopeSchema = z\n .strictObject({\n subjectKind: z.enum(GovernedDocumentGovernanceSubjectKind),\n subjectRef: AuthoredNamespacedRefSchema,\n scopeRef: AuthoredNamespacedRefSchema,\n scopeVersion: GovernedDocumentPositiveSafeIntegerSchema,\n participantRefs: z.array(AuthoredNamespacedRefSchema),\n precedenceRuleRefs: z.array(AuthoredNamespacedRefSchema),\n })\n .superRefine((scope, context) => {\n if (scope.subjectKind === GovernedDocumentGovernanceSubjectKind.SHARED_RESPONSIBILITY) {\n if (scope.participantRefs.length < 2) {\n context.addIssue({ code: \"custom\", path: [\"participantRefs\"], message: \"shared responsibility requires at least two attributed participants\" });\n }\n if (scope.precedenceRuleRefs.length === 0) {\n context.addIssue({ code: \"custom\", path: [\"precedenceRuleRefs\"], message: \"shared responsibility requires an explicit precedence rule\" });\n }\n return;\n }\n if (scope.participantRefs.length > 0 || scope.precedenceRuleRefs.length > 0) {\n context.addIssue({ code: \"custom\", path: [\"participantRefs\"], message: \"only a shared-responsibility scope attributes participants or precedence rules\" });\n }\n });\n\n/**\n * Whether a declared document fact HAS an answer, or was considered and does not apply.\n *\n * The two are different answers and a document that confuses them is wrong in different ways: \"we\n * perform no international transfers\" is a citable statement, while \"international transfers are not\n * applicable to us\" is the application declining to answer, and a clause resting on the second\n * asserts something nobody established. A fact ABSENT from the specification is neither — nobody has\n * considered it at all.\n *\n * It lived in `application-assurance-document-fact-projection.…schemas.ts` until 2026-08-28, when\n * that module — a host-computed projection carrying a projector identity, source-head digests and\n * per-contribution authority receipts — was deleted with the rest of the digest machinery\n * (`.claude/rules/one-source-of-truth.md`, Rule 0). This enum was the only thing in its 999 lines\n * that anything outside it used, and it belongs here: it is the resolution kind of a DECLARATION,\n * which is what this file is about.\n */\nexport enum ApplicationAssuranceDocumentFactContributionResolutionKind {\n /** The application declared this fact and it carries a value. */\n KNOWN = \"KNOWN\",\n /** The application considered this fact and it genuinely does not apply. Citable by nothing. */\n NOT_APPLICABLE = \"NOT_APPLICABLE\",\n}\n\nconst compareCanonicalText = (left: string, right: string): number => (left < right ? -1 : left > right ? 1 : 0);\nconst valuesAreUnique = (values: readonly string[]): boolean => new Set(values).size === values.length;\nconst valuesAreLexicallySorted = (values: readonly string[]): boolean =>\n values.every((value, index) => index === 0 || compareCanonicalText(values[index - 1]!, value) <= 0);\n\nconst ApplicationDocumentFactDeclarationAuthorityCommonSchema = z.strictObject({\n authorityRef: AuthoredNamespacedRefSchema,\n authorityVersion: GovernedDocumentPositiveSafeIntegerSchema,\n});\n\n/**\n * The DERIVED authority: the accepted semantic member itself is the authority, so the host binds its\n * exact family head and validation receipts and there is no human to name.\n *\n * It carries no `decidedAt`, and that absence is the whole reason a generator may produce it: there is\n * no decision instant to invent and no accountable actor to fabricate.\n */\nconst ApplicationDocumentFactDeclarationApplicationSpecificationAuthoritySchema = ApplicationDocumentFactDeclarationAuthorityCommonSchema.extend({\n factAuthorityKind: z.literal(AssuranceDocumentFactAuthorityKind.APPLICATION_SPECIFICATION),\n});\n\n/** A creator's decision: a named human, at a real instant. */\nconst ApplicationDocumentFactDeclarationCreatorDecisionAuthoritySchema = ApplicationDocumentFactDeclarationAuthorityCommonSchema.extend({\n factAuthorityKind: z.literal(AssuranceDocumentFactAuthorityKind.CREATOR_DECISION),\n decidedByRef: AuthoredNamespacedRefSchema,\n decidedAt: AssuranceIsoDateTimeSchema,\n});\n\n/** A qualified review: a named author, a named reviewer, their qualifications, and what they disclose. */\nconst ApplicationDocumentFactDeclarationQualifiedReviewAuthoritySchema = ApplicationDocumentFactDeclarationAuthorityCommonSchema.extend({\n factAuthorityKind: z.literal(AssuranceDocumentFactAuthorityKind.QUALIFIED_REVIEW),\n authorRef: AuthoredNamespacedRefSchema,\n reviewerRef: AuthoredNamespacedRefSchema,\n reviewerQualificationRefs: z.array(AuthoredNamespacedRefSchema).min(1),\n independenceDisclosure: z.string().trim().min(1),\n decidedAt: AssuranceIsoDateTimeSchema,\n});\n\n/**\n * Every authority kind — the READER's union.\n *\n * A consumer that reads facts does not care which family a declaration came from: the document asserts\n * the FACT. So this stays whole, and the two WRITER unions below are its disjoint halves.\n *\n * Human decisions retain their actual decision instant and named accountable actors; accepting the\n * surrounding specification never rewrites that instant or silently upgrades the authority kind.\n */\nexport const ApplicationDocumentFactDeclarationAuthoritySchema = z.discriminatedUnion(\"factAuthorityKind\", [\n ApplicationDocumentFactDeclarationApplicationSpecificationAuthoritySchema,\n ApplicationDocumentFactDeclarationCreatorDecisionAuthoritySchema,\n ApplicationDocumentFactDeclarationQualifiedReviewAuthoritySchema,\n]);\nexport type ApplicationDocumentFactDeclarationAuthority = z.infer<typeof ApplicationDocumentFactDeclarationAuthoritySchema>;\n\n/**\n * The AUTHORED half — a human said it.\n *\n * Kept as a union rather than folded into one shape because the two differ in what they must disclose:\n * a creator decision names who decided, a qualified review additionally names who reviewed, against\n * what qualifications, and how independent they were.\n */\nconst ApplicationAuthoredDocumentFactDeclarationAuthoritySchema = z.discriminatedUnion(\"factAuthorityKind\", [\n ApplicationDocumentFactDeclarationCreatorDecisionAuthoritySchema,\n ApplicationDocumentFactDeclarationQualifiedReviewAuthoritySchema,\n]);\n\nconst ApplicationDocumentFactDeclarationCommonSchema = z.strictObject({\n declarationRef: AuthoredNamespacedRefSchema,\n declarationVersion: GovernedDocumentPositiveSafeIntegerSchema,\n factRef: AuthoredNamespacedRefSchema,\n factVersion: GovernedDocumentPositiveSafeIntegerSchema,\n governanceScope: AuthoredGovernanceScopeSchema,\n sensitivityRef: AuthoredNamespacedRefSchema,\n validUntil: AssuranceIsoDateTimeSchema.optional(),\n});\n\n/**\n * The structural minimum the cross-field rules need, so ONE implementation of them serves all three\n * declaration schemas below.\n *\n * Written structurally rather than as `z.infer<typeof …>` because the wide schema does not exist yet at\n * this point in the file, and a narrow declaration is assignable to this shape by construction.\n */\ntype DocumentFactDeclarationRefinementSubject = {\n readonly declarationRef: string;\n readonly factRef: string;\n readonly sensitivityRef: string;\n readonly validUntil?: string | undefined;\n /**\n * Declared OPTIONAL, and it is not a claim that a declaration may omit its authority — the schemas\n * below require it and nothing marks it `.optional()`.\n *\n * Zod 4.3.6 infers a UNION-valued object key as optional. Measured in this package rather than\n * assumed: a plain-object value infers `authority:` (required), while both `z.union` and\n * `z.discriminatedUnion` infer `authority?:`. So a parsed AUTHORED declaration — whose authority is a\n * two-member union — is not assignable to a subject type that requires the field, and writing it\n * required here would refuse the very values this function exists to check.\n *\n * Reads below are unaffected: this package compiles with `strict: false`, so an optional property is\n * not widened with `undefined`.\n */\n readonly authority?: ApplicationDocumentFactDeclarationAuthority;\n};\n\ntype DocumentFactDeclarationRefinementContext = {\n addIssue: (issue: { code: \"custom\"; message: string; path: PropertyKey[] }) => void;\n};\n\n/**\n * The namespace, ordering and instant rules a declaration must satisfy whoever wrote it.\n *\n * Shared deliberately: the DERIVED and AUTHORED families differ in WHO may assert a fact, never in what\n * a well-formed assertion looks like. Two copies of these rules would drift into two grammars for one\n * vocabulary — `invariant-call-site-enumeration.md` #4.\n */\nconst refineDocumentFactDeclaration = (\n declaration: DocumentFactDeclarationRefinementSubject,\n context: DocumentFactDeclarationRefinementContext,\n): void => {\n if (!declaration.declarationRef.startsWith(\"document-fact-declaration:\")) {\n context.addIssue({ code: \"custom\", message: \"declarationRef must use the document-fact-declaration: namespace\", path: [\"declarationRef\"] });\n }\n if (!declaration.factRef.startsWith(\"document-fact:\")) {\n context.addIssue({ code: \"custom\", message: \"factRef must use the document-fact: namespace\", path: [\"factRef\"] });\n }\n if (!declaration.authority.authorityRef.startsWith(\"document-fact-authority:\")) {\n context.addIssue({ code: \"custom\", message: \"authorityRef must use the document-fact-authority: namespace\", path: [\"authority\", \"authorityRef\"] });\n }\n if (!declaration.sensitivityRef.startsWith(\"sensitivity:\")) {\n context.addIssue({ code: \"custom\", message: \"sensitivityRef must use the sensitivity: namespace\", path: [\"sensitivityRef\"] });\n }\n if (declaration.authority.factAuthorityKind === AssuranceDocumentFactAuthorityKind.QUALIFIED_REVIEW) {\n if (!valuesAreUnique(declaration.authority.reviewerQualificationRefs) || !valuesAreLexicallySorted(declaration.authority.reviewerQualificationRefs)) {\n context.addIssue({\n code: \"custom\",\n message: \"reviewerQualificationRefs must be unique and lexically sorted\",\n path: [\"authority\", \"reviewerQualificationRefs\"],\n });\n }\n if (declaration.authority.authorRef === declaration.authority.reviewerRef) {\n context.addIssue({ code: \"custom\", message: \"a qualified fact reviewer cannot be the fact author\", path: [\"authority\", \"reviewerRef\"] });\n }\n }\n const authorityInstant =\n declaration.authority.factAuthorityKind === AssuranceDocumentFactAuthorityKind.APPLICATION_SPECIFICATION ? undefined : declaration.authority.decidedAt;\n if (authorityInstant && declaration.validUntil && Date.parse(declaration.validUntil) <= Date.parse(authorityInstant)) {\n context.addIssue({ code: \"custom\", message: \"validUntil must follow the human authority decision\", path: [\"validUntil\"] });\n }\n};\n\n/**\n * The two declaration shapes a FILE is parsed against. They differ in exactly one field — who may\n * assert the fact — and share every other rule through {@link refineDocumentFactDeclaration}.\n *\n * Written out rather than produced by a shared factory, and that is a measured decision: a generic\n * `<TAuthority extends z.ZodType<…>>` helper compiles, but Zod's `.extend()` cannot carry a generic\n * schema's output into the extended object's inferred type, so every declaration came back missing its\n * `authority` field. A factory that erases the one property the split exists to constrain is worse than\n * two explicit unions.\n */\n\n/**\n * A DERIVED declaration — `document-facts`, the family a producer writes.\n *\n * Its authority union has exactly one member, and that is the point of the split (#192): the\n * `refinement.document-facts` producer regenerates this whole file, so a human decision left in it is\n * silently overwritten on the next run. Narrowing the TYPE is what makes \"a generator may never write a\n * `CREATOR_DECISION`\" structural instead of a rule somebody has to remember — the generation contract\n * already said so in prose (`document-fact-specification-generation.schemas.ts`) and nothing enforced\n * it on the file the generator lands.\n */\nexport const ApplicationDerivedDocumentFactDeclarationSchema = z\n .discriminatedUnion(\"resolutionKind\", [\n ApplicationDocumentFactDeclarationCommonSchema.extend({\n authority: ApplicationDocumentFactDeclarationApplicationSpecificationAuthoritySchema,\n resolutionKind: z.literal(ApplicationAssuranceDocumentFactContributionResolutionKind.KNOWN),\n value: z.json(),\n }),\n ApplicationDocumentFactDeclarationCommonSchema.extend({\n authority: ApplicationDocumentFactDeclarationApplicationSpecificationAuthoritySchema,\n resolutionKind: z.literal(ApplicationAssuranceDocumentFactContributionResolutionKind.NOT_APPLICABLE),\n reason: z.string().trim().min(1),\n }),\n ])\n .superRefine((declaration, context) => refineDocumentFactDeclaration(declaration, context));\nexport type ApplicationDerivedDocumentFactDeclaration = z.infer<typeof ApplicationDerivedDocumentFactDeclarationSchema>;\n\n/**\n * An AUTHORED declaration — `document-facts-authored`, the family only a human writes.\n *\n * The mirror of the rule above: nothing here may claim `APPLICATION_SPECIFICATION` authority, because a\n * fact the accepted specification can answer belongs in the derived family where it stays in step with\n * the specification. Filing one here would freeze a derivable answer at the moment somebody typed it.\n */\nexport const ApplicationAuthoredDocumentFactDeclarationSchema = z\n .discriminatedUnion(\"resolutionKind\", [\n ApplicationDocumentFactDeclarationCommonSchema.extend({\n authority: ApplicationAuthoredDocumentFactDeclarationAuthoritySchema,\n resolutionKind: z.literal(ApplicationAssuranceDocumentFactContributionResolutionKind.KNOWN),\n value: z.json(),\n }),\n ApplicationDocumentFactDeclarationCommonSchema.extend({\n authority: ApplicationAuthoredDocumentFactDeclarationAuthoritySchema,\n resolutionKind: z.literal(ApplicationAssuranceDocumentFactContributionResolutionKind.NOT_APPLICABLE),\n reason: z.string().trim().min(1),\n }),\n ])\n .superRefine((declaration, context) => refineDocumentFactDeclaration(declaration, context));\nexport type ApplicationAuthoredDocumentFactDeclaration = z.infer<typeof ApplicationAuthoredDocumentFactDeclarationSchema>;\n\n/**\n * One raw application-owned fact decision, from EITHER family — the READER's shape.\n *\n * The host, not the application, derives contribution ids, digests, accepted-head identities,\n * semantic-member digests and validation-receipt joins from this declaration.\n *\n * A TYPE and not a schema: nothing parses a file against it, because every file belongs to one family\n * or the other. It exists because a consumer that READS facts does not care who asserted them — the\n * document asserts the FACT — so it should not have to name both halves.\n */\nexport type ApplicationDocumentFactDeclaration = ApplicationDerivedDocumentFactDeclaration | ApplicationAuthoredDocumentFactDeclaration;\n\n/**\n * A set of fact declarations from EITHER family — what a reader takes.\n *\n * Named rather than written inline at each reader because there are several, and because the concept\n * is worth stating: \"the facts\", regardless of which of the two files carried them. A caller holding\n * both passes both.\n */\nexport type ApplicationDocumentFactDeclarationSet = { readonly declarations: readonly ApplicationDocumentFactDeclaration[] };\n\nconst applicationDocumentFactDeclarationScopeKey = (declaration: ApplicationDocumentFactDeclaration): string =>\n `${declaration.factRef}@${declaration.factVersion}:${JSON.stringify(declaration.governanceScope)}`;\n\nconst buildDocumentFactSpecificationSchema = <TDeclaration extends z.ZodType<ApplicationDocumentFactDeclaration>>(declarationSchema: TDeclaration) =>\n z\n .strictObject({\n schemaVersion: z.literal(1),\n specificationRef: AuthoredNamespacedRefSchema,\n specificationVersion: GovernedDocumentPositiveSafeIntegerSchema,\n declarations: z.array(declarationSchema).min(1),\n })\n .superRefine((specification, context) => {\n if (!specification.specificationRef.startsWith(\"document-fact-specification:\")) {\n context.addIssue({\n code: \"custom\",\n message: \"specificationRef must use the document-fact-specification: namespace\",\n path: [\"specificationRef\"],\n });\n }\n const declarationIdentities = specification.declarations.map((declaration) => `${declaration.declarationRef}@${declaration.declarationVersion}`);\n if (!valuesAreUnique(declarationIdentities) || !valuesAreLexicallySorted(declarationIdentities)) {\n context.addIssue({ code: \"custom\", message: \"declarations must be unique and lexically sorted by identity\", path: [\"declarations\"] });\n }\n const factScopeKeys = specification.declarations.map(applicationDocumentFactDeclarationScopeKey);\n if (!valuesAreUnique(factScopeKeys)) {\n context.addIssue({\n code: \"custom\",\n message: \"a specification may declare only one current value for each fact version and governance scope\",\n path: [\"declarations\"],\n });\n }\n });\n\n/**\n * @wildo_source:part:start saas.specifications.application-document-fact-specification.contract facet:layer:specification facet:family:assurance\n *\n * Accepted application declaration of governed-document facts THE ACCEPTED SPECIFICATION ANSWERS.\n * Import from `@wildo-ai/saas-specifications/application-creation`.\n *\n * This family carries raw decisions only. It never authors contribution\n * digests, accepted-head identities, validation receipts, reviewer grants,\n * document approvals or releases. The trusted application-creation host seals\n * each declaration into the exact contribution form required by the fact\n * resolver. A missing family or missing declaration therefore remains a\n * visible fact gap.\n *\n * One snapshot may contain facts for several document definitions, but it may\n * contain only one current declaration for a given fact version and governance\n * scope. Replacing a decision requires a new declaration/specification version\n * and normal specification-family acceptance; conflicting current values are\n * rejected at the authoring boundary instead of being hidden downstream.\n *\n * ## This file is REGENERATED, and that is why it accepts one authority kind\n *\n * `refinement.document-facts` rewrites it whole. Before #192 the same file also held the facts only a\n * human may establish, so the next producer run silently deleted them — and there was no compare-and-\n * swap to notice, by design (`.claude/rules/one-source-of-truth.md` Rule 0). The facts a human owns\n * live in {@link ApplicationAuthoredDocumentFactSpecificationSchema}, in their own file, which no\n * producer writes.\n */\nexport const ApplicationDocumentFactSpecificationSchema = buildDocumentFactSpecificationSchema(ApplicationDerivedDocumentFactDeclarationSchema);\nexport type ApplicationDocumentFactSpecification = z.infer<typeof ApplicationDocumentFactSpecificationSchema>;\n/** @wildo_source:part:end saas.specifications.application-document-fact-specification.contract */\n\n/**\n * @wildo_source:part:start saas.specifications.application-authored-document-fact-specification.contract facet:layer:specification facet:family:assurance\n *\n * Accepted application declaration of governed-document facts ONLY A HUMAN MAY ESTABLISH — a creator's\n * decision, or a qualified review. Import from\n * `@wildo-ai/saas-specifications/application-creation`.\n *\n * Structurally identical to {@link ApplicationDocumentFactSpecificationSchema}: a declaration is a\n * declaration whoever wrote it, and a document reading facts does not care which file one came from.\n * The two are separate FAMILIES so that neither writer can destroy the other's half — the derived file\n * is regenerated by a producer, this one is only ever edited by a person or by a host acting on a\n * person's answers.\n *\n * Nothing in here may carry `APPLICATION_SPECIFICATION` authority. A fact the specification can answer\n * belongs in the derived family, where it is re-derived when the specification moves; pinning it here\n * would freeze yesterday's answer under a human's name.\n */\nexport const ApplicationAuthoredDocumentFactSpecificationSchema = buildDocumentFactSpecificationSchema(ApplicationAuthoredDocumentFactDeclarationSchema);\nexport type ApplicationAuthoredDocumentFactSpecification = z.infer<typeof ApplicationAuthoredDocumentFactSpecificationSchema>;\n/** @wildo_source:part:end saas.specifications.application-authored-document-fact-specification.contract */\n\nexport enum ApplicationDocumentFactSpecificationIssueSeverity {\n ERROR = \"ERROR\",\n}\n\nexport interface ApplicationDocumentFactSpecificationIssue {\n readonly kind: \"invalid_document_fact_specification\";\n readonly severity: ApplicationDocumentFactSpecificationIssueSeverity;\n readonly path: string;\n readonly message: string;\n}\n\n/**\n * Content validation the schema alone cannot express.\n *\n * Keep the authorable family deliberately narrower than the portable resolver authority union: runtime\n * evidence belongs to an evidence producer, not to a TypeScript specification snapshot.\n *\n * ## The vacuity check, and why the schema cannot do it\n *\n * A KNOWN declaration's `value` is typed `z.json()`, because a fact may legitimately be prose, a number,\n * a date or a small structured record — the family cannot know which. That permissiveness leaves one\n * hole it must not leave: `\"\"`, `\" \"` and `null` all satisfy `z.json()` while carrying nothing. A\n * governed document clause resting on such a declaration cites a fact that EXISTS and SAYS NOTHING,\n * which is worse than citing an absent one, because the cross-family binding check\n * (`validateComplianceDocumentCandidateFactBinding`) sees a declared fact and passes it.\n *\n * That is the same vacuity class already closed on vision, roadmap, requirements and the build plan:\n * schema-valid, validator-clean, and carrying no information a reader could act on.\n *\n * This function returned `{ ok: true, issues: [] }` on every input until 2026-08-28 — the family's\n * semantic layer was empty while its schema did all the work, so the two gaps above were unreachable\n * by any check.\n *\n * ## Serves BOTH fact families\n *\n * It reads `resolutionKind`, `value` and `factRef`, all of which are common to the derived and authored\n * declarations — a vacuous value is vacuous whoever asserted it. So the parameter is the structural\n * minimum rather than one family's type, and neither family gets a second copy of this rule.\n */\nexport function validateApplicationDocumentFactSpecification(specification: ApplicationDocumentFactDeclarationSet): {\n ok: boolean;\n issues: ApplicationDocumentFactSpecificationIssue[];\n} {\n const issues: ApplicationDocumentFactSpecificationIssue[] = [];\n specification.declarations.forEach((declaration, index) => {\n if (declaration.resolutionKind !== ApplicationAssuranceDocumentFactContributionResolutionKind.KNOWN) return;\n const value = declaration.value;\n const isVacuous =\n value === null\n || (typeof value === \"string\" && value.trim().length === 0)\n || (Array.isArray(value) && value.length === 0)\n || (typeof value === \"object\" && !Array.isArray(value) && value !== null && Object.keys(value).length === 0);\n if (!isVacuous) return;\n issues.push({\n kind: \"invalid_document_fact_specification\",\n severity: ApplicationDocumentFactSpecificationIssueSeverity.ERROR,\n path: `declarations.${index}.value`,\n message:\n `\"${declaration.factRef}\" is declared KNOWN but carries no value. `\n + \"State the fact, or declare it NOT_APPLICABLE with a reason — an empty value is a fact a document could cite and learn nothing from.\",\n });\n });\n return { ok: issues.length === 0, issues };\n}\n"]}
@@ -63,11 +63,45 @@ export declare enum ApplicationSpecificationFamilySemanticSchemaRef {
63
63
  */
64
64
  APPLICATION_DOCUMENT_RELEASE_POLICY_SPECIFICATION = "saas-specifications:ApplicationDocumentReleasePolicySpecification",
65
65
  /**
66
- * Accepted raw document facts. Distinct from the compliance program (which
67
- * declares requirements) and publication variants (which declare routing).
68
- * The host seals declarations from this family into resolver contributions.
66
+ * Accepted raw document facts the ACCEPTED SPECIFICATION answers. Distinct
67
+ * from the compliance program (which declares requirements) and publication
68
+ * variants (which declare routing). The host seals declarations from this
69
+ * family into resolver contributions.
70
+ *
71
+ * Regenerated whole by `refinement.document-facts`, which is why the human
72
+ * half is a separate family below (#192).
69
73
  */
70
- APPLICATION_DOCUMENT_FACT_SPECIFICATION = "saas-specifications:ApplicationDocumentFactSpecification"
74
+ APPLICATION_DOCUMENT_FACT_SPECIFICATION = "saas-specifications:ApplicationDocumentFactSpecification",
75
+ /**
76
+ * Accepted raw document facts only a HUMAN may establish — a creator
77
+ * decision or a qualified review.
78
+ *
79
+ * The same shape as the family above and deliberately a different family: a
80
+ * producer regenerates the derived file whole, so a human decision sharing
81
+ * that file is destroyed on the next run and nothing notices (there is no
82
+ * compare-and-swap here, by design — `one-source-of-truth.md` Rule 0). Two
83
+ * families make the two writers unable to reach each other's half.
84
+ *
85
+ * It has no generation contract, and that absence is the point rather than
86
+ * an omission: nothing may produce this family.
87
+ */
88
+ APPLICATION_AUTHORED_DOCUMENT_FACT_SPECIFICATION = "saas-specifications:ApplicationAuthoredDocumentFactSpecification",
89
+ /**
90
+ * WHO ELSE processes this application's personal data — the processor register.
91
+ *
92
+ * A family in its own right since 2026-09-03, and it had to become one: it has a schema, a
93
+ * companion-exports slot and two applications authoring it, but no PLACEMENT — so it was
94
+ * hand-authored into `src/compliance/`, which is the directory `compliance-program` lands into.
95
+ * Wonder CRM kept its register there while Wonder Todos kept its programme there, and the first
96
+ * conception run on CRM would have replaced 22 hand-verified vendor legal identities with a
97
+ * programme and broken the package's own import.
98
+ *
99
+ * Like the authored document facts, it has NO generation contract. A processor's legal entity,
100
+ * processing region and subprocessor list are facts about the arrangement THIS operator has —
101
+ * checked against a vendor's legal pages on a date — and a model asserting one would be inventing
102
+ * a published legal identity.
103
+ */
104
+ APPLICATION_PROCESSOR_REGISTER = "saas-specifications:ApplicationProcessorRegister"
71
105
  }
72
106
  export declare const ApplicationSpecificationNormalizedRelativePathSchema: z.core.$ZodBranded<z.ZodString, "ApplicationSpecificationNormalizedRelativePath", "out">;
73
107
  export type ApplicationSpecificationNormalizedRelativePath = z.infer<typeof ApplicationSpecificationNormalizedRelativePathSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"application-specification-family-identity.application-creation.schemas.d.ts","sourceRoot":"","sources":["../../../../src/application-creation/application-specification-family-identity.application-creation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,sCAAsC,4EAGL,CAAC;AAC/C,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAEtG;;;;;;;;;;;;;GAaG;AACH,oBAAY,+CAA+C;IACzD,gCAAgC,4EAA4E;IAC5G,eAAe,uCAAuC;IACtD,eAAe,uCAAuC;IACtD,qBAAqB,6CAA6C;IAClE,4BAA4B,mDAAmD;IAC/E,gBAAgB,wCAAwC;IACxD,qBAAqB,2CAA2C;IAChE;;;;;OAKG;IACH,cAAc,sCAAsC;IACpD,iGAAiG;IACjG,sBAAsB,4CAA4C;IAClE,4BAA4B,kDAAkD;IAC9E,cAAc,sCAAsC;IACpD,+BAA+B,sDAAsD;IACrF,6BAA6B,oDAAoD;IACjF;;;;;OAKG;IACH,8CAA8C,oEAAoE;IAClH;;;;OAIG;IACH,iDAAiD,sEAAsE;IACvH;;;;OAIG;IACH,uCAAuC,6DAA6D;CACrG;AAED,eAAO,MAAM,oDAAoD,0FAaL,CAAC;AAC7D,MAAM,MAAM,8CAA8C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oDAAoD,CAAC,CAAC"}
1
+ {"version":3,"file":"application-specification-family-identity.application-creation.schemas.d.ts","sourceRoot":"","sources":["../../../../src/application-creation/application-specification-family-identity.application-creation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,sCAAsC,4EAGL,CAAC;AAC/C,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AAEtG;;;;;;;;;;;;;GAaG;AACH,oBAAY,+CAA+C;IACzD,gCAAgC,4EAA4E;IAC5G,eAAe,uCAAuC;IACtD,eAAe,uCAAuC;IACtD,qBAAqB,6CAA6C;IAClE,4BAA4B,mDAAmD;IAC/E,gBAAgB,wCAAwC;IACxD,qBAAqB,2CAA2C;IAChE;;;;;OAKG;IACH,cAAc,sCAAsC;IACpD,iGAAiG;IACjG,sBAAsB,4CAA4C;IAClE,4BAA4B,kDAAkD;IAC9E,cAAc,sCAAsC;IACpD,+BAA+B,sDAAsD;IACrF,6BAA6B,oDAAoD;IACjF;;;;;OAKG;IACH,8CAA8C,oEAAoE;IAClH;;;;OAIG;IACH,iDAAiD,sEAAsE;IACvH;;;;;;;;OAQG;IACH,uCAAuC,6DAA6D;IACpG;;;;;;;;;;;;OAYG;IACH,gDAAgD,qEAAqE;IACrH;;;;;;;;;;;;;;OAcG;IACH,8BAA8B,qDAAqD;CACpF;AAED,eAAO,MAAM,oDAAoD,0FAaL,CAAC;AAC7D,MAAM,MAAM,8CAA8C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oDAAoD,CAAC,CAAC"}
@@ -66,11 +66,45 @@ export var ApplicationSpecificationFamilySemanticSchemaRef;
66
66
  */
67
67
  ApplicationSpecificationFamilySemanticSchemaRef["APPLICATION_DOCUMENT_RELEASE_POLICY_SPECIFICATION"] = "saas-specifications:ApplicationDocumentReleasePolicySpecification";
68
68
  /**
69
- * Accepted raw document facts. Distinct from the compliance program (which
70
- * declares requirements) and publication variants (which declare routing).
71
- * The host seals declarations from this family into resolver contributions.
69
+ * Accepted raw document facts the ACCEPTED SPECIFICATION answers. Distinct
70
+ * from the compliance program (which declares requirements) and publication
71
+ * variants (which declare routing). The host seals declarations from this
72
+ * family into resolver contributions.
73
+ *
74
+ * Regenerated whole by `refinement.document-facts`, which is why the human
75
+ * half is a separate family below (#192).
72
76
  */
73
77
  ApplicationSpecificationFamilySemanticSchemaRef["APPLICATION_DOCUMENT_FACT_SPECIFICATION"] = "saas-specifications:ApplicationDocumentFactSpecification";
78
+ /**
79
+ * Accepted raw document facts only a HUMAN may establish — a creator
80
+ * decision or a qualified review.
81
+ *
82
+ * The same shape as the family above and deliberately a different family: a
83
+ * producer regenerates the derived file whole, so a human decision sharing
84
+ * that file is destroyed on the next run and nothing notices (there is no
85
+ * compare-and-swap here, by design — `one-source-of-truth.md` Rule 0). Two
86
+ * families make the two writers unable to reach each other's half.
87
+ *
88
+ * It has no generation contract, and that absence is the point rather than
89
+ * an omission: nothing may produce this family.
90
+ */
91
+ ApplicationSpecificationFamilySemanticSchemaRef["APPLICATION_AUTHORED_DOCUMENT_FACT_SPECIFICATION"] = "saas-specifications:ApplicationAuthoredDocumentFactSpecification";
92
+ /**
93
+ * WHO ELSE processes this application's personal data — the processor register.
94
+ *
95
+ * A family in its own right since 2026-09-03, and it had to become one: it has a schema, a
96
+ * companion-exports slot and two applications authoring it, but no PLACEMENT — so it was
97
+ * hand-authored into `src/compliance/`, which is the directory `compliance-program` lands into.
98
+ * Wonder CRM kept its register there while Wonder Todos kept its programme there, and the first
99
+ * conception run on CRM would have replaced 22 hand-verified vendor legal identities with a
100
+ * programme and broken the package's own import.
101
+ *
102
+ * Like the authored document facts, it has NO generation contract. A processor's legal entity,
103
+ * processing region and subprocessor list are facts about the arrangement THIS operator has —
104
+ * checked against a vendor's legal pages on a date — and a model asserting one would be inventing
105
+ * a published legal identity.
106
+ */
107
+ ApplicationSpecificationFamilySemanticSchemaRef["APPLICATION_PROCESSOR_REGISTER"] = "saas-specifications:ApplicationProcessorRegister";
74
108
  })(ApplicationSpecificationFamilySemanticSchemaRef || (ApplicationSpecificationFamilySemanticSchemaRef = {}));
75
109
  export const ApplicationSpecificationNormalizedRelativePathSchema = z
76
110
  .string()
@@ -1 +1 @@
1
- {"version":3,"file":"application-specification-family-identity.application-creation.schemas.js","sourceRoot":"","sources":["../../../../src/application-creation/application-specification-family-identity.application-creation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC;KACpD,MAAM,EAAE;KACR,KAAK,CAAC,4BAA4B,CAAC;KACnC,KAAK,EAAsC,CAAC;AAG/C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAN,IAAY,+CAwCX;AAxCD,WAAY,+CAA+C;IACzD,+JAA4G,CAAA;IAC5G,yGAAsD,CAAA;IACtD,yGAAsD,CAAA;IACtD,qHAAkE,CAAA;IAClE,kIAA+E,CAAA;IAC/E,2GAAwD,CAAA;IACxD,mHAAgE,CAAA;IAChE;;;;;OAKG;IACH,uGAAoD,CAAA;IACpD,iGAAiG;IACjG,qHAAkE,CAAA;IAClE,iIAA8E,CAAA;IAC9E,uGAAoD,CAAA;IACpD,wIAAqF,CAAA;IACrF,oIAAiF,CAAA;IACjF;;;;;OAKG;IACH,qKAAkH,CAAA;IAClH;;;;OAIG;IACH,0KAAuH,CAAA;IACvH;;;;OAIG;IACH,uJAAoG,CAAA;AACtG,CAAC,EAxCW,+CAA+C,KAA/C,+CAA+C,QAwC1D;AAED,MAAM,CAAC,MAAM,oDAAoD,GAAG,CAAC;KAClE,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,MAAM,CACL,CAAC,IAAI,EAAE,EAAE,CACP,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;IACrB,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;IACxB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IACpB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,IAAI,CAAC,EAC/E;IACE,OAAO,EAAE,qEAAqE;CAC/E,CACF;KACA,KAAK,EAAoD,CAAC","sourcesContent":["import { z } from \"zod\";\n\n/**\n * The CONTENT vocabulary of an application specification family: which family, which schema contract, and\n * where its file sits.\n *\n * This is the surviving remnant of a 900-line module that also carried descriptors, locators, head-set\n * bases, accepted manifests, validation receipts and validator identities. Every one of those described\n * the LEDGER — which bytes had been accepted, by which validator, against which head. Git answers all of\n * it now, so what is left is the part that was always about meaning: `market-snapshot` names a family,\n * `saas-specifications:MarketSnapshot` names the contract its content must satisfy.\n *\n * Nothing here is a digest, a revision, or a claim about acceptance. That is why it survives Rule 0 in\n * `.claude/rules/one-source-of-truth.md`: two branches can each add a family and the merge is meaningful.\n */\n\nexport const ApplicationSpecificationFamilyIdSchema = z\n .string()\n .regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)\n .brand<\"ApplicationSpecificationFamilyId\">();\nexport type ApplicationSpecificationFamilyId = z.infer<typeof ApplicationSpecificationFamilyIdSchema>;\n\n/**\n * Standard semantic validation policies available to application-owned\n * TypeScript specification families.\n *\n * A descriptor's `schemaRef` selects one of these policies; it is not passive\n * documentation. Precise snapshot policies execute their Zod + deterministic\n * semantic validator. The module policy is the explicit floor for\n * heterogeneous families whose meaning is expressed through the typed\n * `SpecificationsCompanionExports` aggregate rather than one snapshot value.\n *\n * The descriptor contract intentionally remains open to additional\n * namespaced refs so future trusted profiles can register new policies. A\n * concrete runtime must nevertheless resolve every selected ref fail closed.\n */\nexport enum ApplicationSpecificationFamilySemanticSchemaRef {\n EFFECT_FREE_TYPESCRIPT_MODULE_V1 = \"wildo.application-specification-family:effect-free-typescript-module-v1\",\n VISION_SNAPSHOT = \"saas-specifications:VisionSnapshot\",\n MARKET_SNAPSHOT = \"saas-specifications:MarketSnapshot\",\n REQUIREMENTS_SNAPSHOT = \"saas-specifications:RequirementsSnapshot\",\n FEATURE_SPECIFICATION_DRAFTS = \"saas-specifications:FeatureSpecificationDrafts\",\n ROADMAP_SNAPSHOT = \"saas-specifications:RoadmapSnapshot\",\n BUILD_PLAN_TASK_GRAPH = \"saas-specifications:BuildPlanTaskGraph\",\n /**\n * WHERE every settings destination, resource operation and app view sits in\n * the application shell, and WHY (`_core/placement-plan/`). Produced by an\n * expert-panel deliberation rather than a creator elicitation, so the\n * per-decision `rationale` is the artifact's most valuable part.\n */\n PLACEMENT_PLAN = \"saas-specifications:PlacementPlan\",\n /** The atomic domain plan: modules + relationship drafts in one value (`_core/domain-plan/`). */\n DOMAIN_PLAN_OUTPUT_SET = \"saas-specifications:DomainPlanOutputSet\",\n BUSINESS_MODEL_LITE_SNAPSHOT = \"saas-specifications:BusinessModelLiteSnapshot\",\n BRAND_SNAPSHOT = \"saas-specifications:BrandSnapshot\",\n ASSURANCE_PROGRAM_SPECIFICATION = \"saas-specifications:AssuranceProgramSpecification\",\n COMPLIANCE_DOCUMENT_CANDIDATE = \"saas-specifications:ComplianceDocumentCandidate\",\n /**\n * WHERE and IN WHICH LANGUAGE the application publishes public governed\n * documents. Deliberately a separate family from the assurance program: the\n * program decides which documents are required, this decides which\n * locale/jurisdiction combinations exist to publish them in.\n */\n APPLICATION_DOCUMENT_PUBLICATION_SPECIFICATION = \"saas-specifications:ApplicationDocumentPublicationSpecification\",\n /**\n * Application-owned selection of whether each required governed document\n * remains a draft, may use an explicitly limited operator attestation, or\n * requires the existing qualified-review lane before release.\n */\n APPLICATION_DOCUMENT_RELEASE_POLICY_SPECIFICATION = \"saas-specifications:ApplicationDocumentReleasePolicySpecification\",\n /**\n * Accepted raw document facts. Distinct from the compliance program (which\n * declares requirements) and publication variants (which declare routing).\n * The host seals declarations from this family into resolver contributions.\n */\n APPLICATION_DOCUMENT_FACT_SPECIFICATION = \"saas-specifications:ApplicationDocumentFactSpecification\",\n}\n\nexport const ApplicationSpecificationNormalizedRelativePathSchema = z\n .string()\n .min(1)\n .refine(\n (path) =>\n !path.startsWith(\"/\") &&\n !/^[A-Za-z]:/.test(path) &&\n !path.includes(\"\\\\\") &&\n path.split(\"/\").every((part) => part !== \"\" && part !== \".\" && part !== \"..\"),\n {\n message: \"expected a normalized POSIX subject-relative path without traversal\",\n },\n )\n .brand<\"ApplicationSpecificationNormalizedRelativePath\">();\nexport type ApplicationSpecificationNormalizedRelativePath = z.infer<typeof ApplicationSpecificationNormalizedRelativePathSchema>;\n"]}
1
+ {"version":3,"file":"application-specification-family-identity.application-creation.schemas.js","sourceRoot":"","sources":["../../../../src/application-creation/application-specification-family-identity.application-creation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;GAYG;AAEH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC;KACpD,MAAM,EAAE;KACR,KAAK,CAAC,4BAA4B,CAAC;KACnC,KAAK,EAAsC,CAAC;AAG/C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAN,IAAY,+CA0EX;AA1ED,WAAY,+CAA+C;IACzD,+JAA4G,CAAA;IAC5G,yGAAsD,CAAA;IACtD,yGAAsD,CAAA;IACtD,qHAAkE,CAAA;IAClE,kIAA+E,CAAA;IAC/E,2GAAwD,CAAA;IACxD,mHAAgE,CAAA;IAChE;;;;;OAKG;IACH,uGAAoD,CAAA;IACpD,iGAAiG;IACjG,qHAAkE,CAAA;IAClE,iIAA8E,CAAA;IAC9E,uGAAoD,CAAA;IACpD,wIAAqF,CAAA;IACrF,oIAAiF,CAAA;IACjF;;;;;OAKG;IACH,qKAAkH,CAAA;IAClH;;;;OAIG;IACH,0KAAuH,CAAA;IACvH;;;;;;;;OAQG;IACH,uJAAoG,CAAA;IACpG;;;;;;;;;;;;OAYG;IACH,wKAAqH,CAAA;IACrH;;;;;;;;;;;;;;OAcG;IACH,sIAAmF,CAAA;AACrF,CAAC,EA1EW,+CAA+C,KAA/C,+CAA+C,QA0E1D;AAED,MAAM,CAAC,MAAM,oDAAoD,GAAG,CAAC;KAClE,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,MAAM,CACL,CAAC,IAAI,EAAE,EAAE,CACP,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;IACrB,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;IACxB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IACpB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,IAAI,CAAC,EAC/E;IACE,OAAO,EAAE,qEAAqE;CAC/E,CACF;KACA,KAAK,EAAoD,CAAC","sourcesContent":["import { z } from \"zod\";\n\n/**\n * The CONTENT vocabulary of an application specification family: which family, which schema contract, and\n * where its file sits.\n *\n * This is the surviving remnant of a 900-line module that also carried descriptors, locators, head-set\n * bases, accepted manifests, validation receipts and validator identities. Every one of those described\n * the LEDGER — which bytes had been accepted, by which validator, against which head. Git answers all of\n * it now, so what is left is the part that was always about meaning: `market-snapshot` names a family,\n * `saas-specifications:MarketSnapshot` names the contract its content must satisfy.\n *\n * Nothing here is a digest, a revision, or a claim about acceptance. That is why it survives Rule 0 in\n * `.claude/rules/one-source-of-truth.md`: two branches can each add a family and the merge is meaningful.\n */\n\nexport const ApplicationSpecificationFamilyIdSchema = z\n .string()\n .regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)\n .brand<\"ApplicationSpecificationFamilyId\">();\nexport type ApplicationSpecificationFamilyId = z.infer<typeof ApplicationSpecificationFamilyIdSchema>;\n\n/**\n * Standard semantic validation policies available to application-owned\n * TypeScript specification families.\n *\n * A descriptor's `schemaRef` selects one of these policies; it is not passive\n * documentation. Precise snapshot policies execute their Zod + deterministic\n * semantic validator. The module policy is the explicit floor for\n * heterogeneous families whose meaning is expressed through the typed\n * `SpecificationsCompanionExports` aggregate rather than one snapshot value.\n *\n * The descriptor contract intentionally remains open to additional\n * namespaced refs so future trusted profiles can register new policies. A\n * concrete runtime must nevertheless resolve every selected ref fail closed.\n */\nexport enum ApplicationSpecificationFamilySemanticSchemaRef {\n EFFECT_FREE_TYPESCRIPT_MODULE_V1 = \"wildo.application-specification-family:effect-free-typescript-module-v1\",\n VISION_SNAPSHOT = \"saas-specifications:VisionSnapshot\",\n MARKET_SNAPSHOT = \"saas-specifications:MarketSnapshot\",\n REQUIREMENTS_SNAPSHOT = \"saas-specifications:RequirementsSnapshot\",\n FEATURE_SPECIFICATION_DRAFTS = \"saas-specifications:FeatureSpecificationDrafts\",\n ROADMAP_SNAPSHOT = \"saas-specifications:RoadmapSnapshot\",\n BUILD_PLAN_TASK_GRAPH = \"saas-specifications:BuildPlanTaskGraph\",\n /**\n * WHERE every settings destination, resource operation and app view sits in\n * the application shell, and WHY (`_core/placement-plan/`). Produced by an\n * expert-panel deliberation rather than a creator elicitation, so the\n * per-decision `rationale` is the artifact's most valuable part.\n */\n PLACEMENT_PLAN = \"saas-specifications:PlacementPlan\",\n /** The atomic domain plan: modules + relationship drafts in one value (`_core/domain-plan/`). */\n DOMAIN_PLAN_OUTPUT_SET = \"saas-specifications:DomainPlanOutputSet\",\n BUSINESS_MODEL_LITE_SNAPSHOT = \"saas-specifications:BusinessModelLiteSnapshot\",\n BRAND_SNAPSHOT = \"saas-specifications:BrandSnapshot\",\n ASSURANCE_PROGRAM_SPECIFICATION = \"saas-specifications:AssuranceProgramSpecification\",\n COMPLIANCE_DOCUMENT_CANDIDATE = \"saas-specifications:ComplianceDocumentCandidate\",\n /**\n * WHERE and IN WHICH LANGUAGE the application publishes public governed\n * documents. Deliberately a separate family from the assurance program: the\n * program decides which documents are required, this decides which\n * locale/jurisdiction combinations exist to publish them in.\n */\n APPLICATION_DOCUMENT_PUBLICATION_SPECIFICATION = \"saas-specifications:ApplicationDocumentPublicationSpecification\",\n /**\n * Application-owned selection of whether each required governed document\n * remains a draft, may use an explicitly limited operator attestation, or\n * requires the existing qualified-review lane before release.\n */\n APPLICATION_DOCUMENT_RELEASE_POLICY_SPECIFICATION = \"saas-specifications:ApplicationDocumentReleasePolicySpecification\",\n /**\n * Accepted raw document facts the ACCEPTED SPECIFICATION answers. Distinct\n * from the compliance program (which declares requirements) and publication\n * variants (which declare routing). The host seals declarations from this\n * family into resolver contributions.\n *\n * Regenerated whole by `refinement.document-facts`, which is why the human\n * half is a separate family below (#192).\n */\n APPLICATION_DOCUMENT_FACT_SPECIFICATION = \"saas-specifications:ApplicationDocumentFactSpecification\",\n /**\n * Accepted raw document facts only a HUMAN may establish — a creator\n * decision or a qualified review.\n *\n * The same shape as the family above and deliberately a different family: a\n * producer regenerates the derived file whole, so a human decision sharing\n * that file is destroyed on the next run and nothing notices (there is no\n * compare-and-swap here, by design — `one-source-of-truth.md` Rule 0). Two\n * families make the two writers unable to reach each other's half.\n *\n * It has no generation contract, and that absence is the point rather than\n * an omission: nothing may produce this family.\n */\n APPLICATION_AUTHORED_DOCUMENT_FACT_SPECIFICATION = \"saas-specifications:ApplicationAuthoredDocumentFactSpecification\",\n /**\n * WHO ELSE processes this application's personal data — the processor register.\n *\n * A family in its own right since 2026-09-03, and it had to become one: it has a schema, a\n * companion-exports slot and two applications authoring it, but no PLACEMENT — so it was\n * hand-authored into `src/compliance/`, which is the directory `compliance-program` lands into.\n * Wonder CRM kept its register there while Wonder Todos kept its programme there, and the first\n * conception run on CRM would have replaced 22 hand-verified vendor legal identities with a\n * programme and broken the package's own import.\n *\n * Like the authored document facts, it has NO generation contract. A processor's legal entity,\n * processing region and subprocessor list are facts about the arrangement THIS operator has —\n * checked against a vendor's legal pages on a date — and a model asserting one would be inventing\n * a published legal identity.\n */\n APPLICATION_PROCESSOR_REGISTER = \"saas-specifications:ApplicationProcessorRegister\",\n}\n\nexport const ApplicationSpecificationNormalizedRelativePathSchema = z\n .string()\n .min(1)\n .refine(\n (path) =>\n !path.startsWith(\"/\") &&\n !/^[A-Za-z]:/.test(path) &&\n !path.includes(\"\\\\\") &&\n path.split(\"/\").every((part) => part !== \"\" && part !== \".\" && part !== \"..\"),\n {\n message: \"expected a normalized POSIX subject-relative path without traversal\",\n },\n )\n .brand<\"ApplicationSpecificationNormalizedRelativePath\">();\nexport type ApplicationSpecificationNormalizedRelativePath = z.infer<typeof ApplicationSpecificationNormalizedRelativePathSchema>;\n"]}
@@ -0,0 +1,12 @@
1
+ import type { FamilyAspectsDeclaration } from '../_core/family-aspects.schemas';
2
+ export declare const DOCUMENT_FACTS_FAMILY_ASPECTS: FamilyAspectsDeclaration;
3
+ /**
4
+ * The AUTHORED half's aspects (#192).
5
+ *
6
+ * Same snapshot path, same business key, same headline — the two families describe the same kind of
7
+ * row and differ only in who may assert it, so an aspect declaration that differed elsewhere would be
8
+ * describing a difference that does not exist. The `itemSchema` is the narrowed one, which is where
9
+ * the difference actually lives; the KEY differs only because keys are globally unique.
10
+ */
11
+ export declare const AUTHORED_DOCUMENT_FACTS_FAMILY_ASPECTS: FamilyAspectsDeclaration;
12
+ //# sourceMappingURL=document-facts.family-aspects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-facts.family-aspects.d.ts","sourceRoot":"","sources":["../../../../src/application-creation/document-facts.family-aspects.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AA2BhF,eAAO,MAAM,6BAA6B,EAAE,wBAG3C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sCAAsC,EAAE,wBAGpD,CAAC"}