@wildo-ai/saas-specifications 1.1.7 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/esm/_core/application-specification-family-identity.schemas.d.ts +9 -0
  2. package/dist/esm/_core/application-specification-family-identity.schemas.d.ts.map +1 -1
  3. package/dist/esm/_core/application-specification-family-identity.schemas.js +9 -0
  4. package/dist/esm/_core/application-specification-family-identity.schemas.js.map +1 -1
  5. package/dist/esm/_core/brand/brand-name-choice.d.ts +136 -0
  6. package/dist/esm/_core/brand/brand-name-choice.d.ts.map +1 -0
  7. package/dist/esm/_core/brand/brand-name-choice.js +193 -0
  8. package/dist/esm/_core/brand/brand-name-choice.js.map +1 -0
  9. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.d.ts +108 -0
  10. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.d.ts.map +1 -0
  11. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.js +59 -0
  12. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.js.map +1 -0
  13. package/dist/esm/_core/brand/brand-name-screening-validation.d.ts +51 -0
  14. package/dist/esm/_core/brand/brand-name-screening-validation.d.ts.map +1 -0
  15. package/dist/esm/_core/brand/brand-name-screening-validation.js +157 -0
  16. package/dist/esm/_core/brand/brand-name-screening-validation.js.map +1 -0
  17. package/dist/esm/_core/brand/brand-name-screening-view.d.ts +120 -0
  18. package/dist/esm/_core/brand/brand-name-screening-view.d.ts.map +1 -0
  19. package/dist/esm/_core/brand/brand-name-screening-view.js +47 -0
  20. package/dist/esm/_core/brand/brand-name-screening-view.js.map +1 -0
  21. package/dist/esm/_core/brand/brand-name-screening.family-aspects.d.ts +3 -0
  22. package/dist/esm/_core/brand/brand-name-screening.family-aspects.d.ts.map +1 -0
  23. package/dist/esm/_core/brand/brand-name-screening.family-aspects.js +42 -0
  24. package/dist/esm/_core/brand/brand-name-screening.family-aspects.js.map +1 -0
  25. package/dist/esm/_core/brand/brand-name-screening.schemas.d.ts +310 -0
  26. package/dist/esm/_core/brand/brand-name-screening.schemas.d.ts.map +1 -0
  27. package/dist/esm/_core/brand/brand-name-screening.schemas.js +272 -0
  28. package/dist/esm/_core/brand/brand-name-screening.schemas.js.map +1 -0
  29. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +23 -0
  30. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
  31. package/dist/esm/_core/brand/brand-snapshot.schemas.js +32 -0
  32. package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
  33. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts +10 -0
  34. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
  35. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +57 -0
  36. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
  37. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +89 -0
  38. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
  39. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts +79 -19
  40. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts.map +1 -1
  41. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js +61 -11
  42. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js.map +1 -1
  43. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -1
  44. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +18 -2
  45. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -1
  46. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts +28 -4
  47. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts.map +1 -1
  48. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js +53 -5
  49. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js.map +1 -1
  50. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts +24 -4
  51. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts.map +1 -1
  52. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js +64 -4
  53. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js.map +1 -1
  54. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts +59 -0
  55. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts.map +1 -1
  56. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.js +64 -0
  57. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.js.map +1 -1
  58. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts +3 -0
  59. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts.map +1 -1
  60. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js +16 -0
  61. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js.map +1 -1
  62. package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts +7 -1
  63. package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts.map +1 -1
  64. package/dist/esm/_core/capability-composition/capability-composition-validation.js +34 -28
  65. package/dist/esm/_core/capability-composition/capability-composition-validation.js.map +1 -1
  66. package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts +75 -4
  67. package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts.map +1 -1
  68. package/dist/esm/_core/capability-composition/capability-composition.schemas.js +62 -4
  69. package/dist/esm/_core/capability-composition/capability-composition.schemas.js.map +1 -1
  70. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts.map +1 -1
  71. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js +7 -0
  72. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js.map +1 -1
  73. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts +153 -0
  74. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts.map +1 -0
  75. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js +241 -0
  76. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js.map +1 -0
  77. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.d.ts +8 -1
  78. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.d.ts.map +1 -1
  79. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js +19 -1
  80. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js.map +1 -1
  81. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts +61 -3
  82. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts.map +1 -1
  83. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js +73 -3
  84. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js.map +1 -1
  85. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js +1 -1
  86. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js.map +1 -1
  87. package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts.map +1 -1
  88. package/dist/esm/_core/experience-plan/experience-plan.schemas.js +1 -0
  89. package/dist/esm/_core/experience-plan/experience-plan.schemas.js.map +1 -1
  90. package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -1
  91. package/dist/esm/_core/family-aspects.registry.js +2 -0
  92. package/dist/esm/_core/family-aspects.registry.js.map +1 -1
  93. package/dist/esm/_core/index.d.ts +6 -0
  94. package/dist/esm/_core/index.d.ts.map +1 -1
  95. package/dist/esm/_core/index.js +6 -0
  96. package/dist/esm/_core/index.js.map +1 -1
  97. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.d.ts.map +1 -1
  98. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js +5 -1
  99. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js.map +1 -1
  100. package/dist/esm/_core/market/market-icp.schemas.d.ts +7 -0
  101. package/dist/esm/_core/market/market-icp.schemas.d.ts.map +1 -1
  102. package/dist/esm/_core/market/market-icp.schemas.js +7 -0
  103. package/dist/esm/_core/market/market-icp.schemas.js.map +1 -1
  104. package/dist/esm/_core/market/market-language-coverage.d.ts +62 -0
  105. package/dist/esm/_core/market/market-language-coverage.d.ts.map +1 -0
  106. package/dist/esm/_core/market/market-language-coverage.js +48 -0
  107. package/dist/esm/_core/market/market-language-coverage.js.map +1 -0
  108. package/dist/esm/_core/market/market-snapshot-validation.js +2 -2
  109. package/dist/esm/_core/market/market-snapshot-validation.js.map +1 -1
  110. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts +63 -2
  111. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts.map +1 -1
  112. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js +73 -5
  113. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js.map +1 -1
  114. package/dist/esm/application-creation/application-line.application-creation.schemas.d.ts.map +1 -1
  115. package/dist/esm/application-creation/application-line.application-creation.schemas.js +2 -0
  116. package/dist/esm/application-creation/application-line.application-creation.schemas.js.map +1 -1
  117. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +28 -0
  118. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  119. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +19 -1
  120. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  121. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +1 -0
  122. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
  123. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +1 -0
  124. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
  125. package/dist/esm/application-creation.exports.d.ts +7 -0
  126. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  127. package/dist/esm/application-creation.exports.js +7 -0
  128. package/dist/esm/application-creation.exports.js.map +1 -1
  129. package/dist/esm/assurance/application-risk-signals.derivations.d.ts +20 -0
  130. package/dist/esm/assurance/application-risk-signals.derivations.d.ts.map +1 -1
  131. package/dist/esm/assurance/application-risk-signals.derivations.js +81 -0
  132. package/dist/esm/assurance/application-risk-signals.derivations.js.map +1 -1
  133. package/dist/esm/assurance/governed-document-release.d.ts +9 -0
  134. package/dist/esm/assurance/governed-document-release.d.ts.map +1 -1
  135. package/dist/esm/assurance/governed-document-release.js +9 -0
  136. package/dist/esm/assurance/governed-document-release.js.map +1 -1
  137. package/dist/esm/companion-exports.d.ts +10 -1
  138. package/dist/esm/companion-exports.d.ts.map +1 -1
  139. package/dist/esm/companion-exports.js.map +1 -1
  140. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts +1 -0
  141. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
  142. package/package.json +8 -8
  143. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts +0 -24
  144. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts.map +0 -1
  145. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js +0 -24
  146. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js.map +0 -1
  147. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -62,6 +62,13 @@ export declare enum ApplicationSpecificationFamily {
62
62
  BUILD_PLAN = "build-plan",
63
63
  PLACEMENT_PLAN = "placement-plan",
64
64
  BRAND_BRIEF = "brand-brief",
65
+ /**
66
+ * WHICH NAMES were proposed for the brand, and what a minimal trademark screening of each found — the
67
+ * registers, classes and jurisdictions searched, per-register results with their sources and dates, and
68
+ * the competitor collisions and domain signals beside them. Produced by `top_down.brand-naming`; the
69
+ * brand-identity interview offers its CHOICE from it. A screening, never a clearance opinion.
70
+ */
71
+ BRAND_NAME_SCREENING = "brand-name-screening",
65
72
  COMPLIANCE_PROGRAM = "compliance-program",
66
73
  /** The PRODUCER's family — one drafting run writes one document. */
67
74
  COMPLIANCE_DOCUMENT_CANDIDATE = "compliance-document-candidate",
@@ -186,6 +193,8 @@ export declare enum ApplicationSpecificationFamilySemanticSchemaRef {
186
193
  DOMAIN_PLAN_OUTPUT_SET = "saas-specifications:DomainPlanOutputSet",
187
194
  BUSINESS_MODEL_LITE_SNAPSHOT = "saas-specifications:BusinessModelLiteSnapshot",
188
195
  BRAND_SNAPSHOT = "saas-specifications:BrandSnapshot",
196
+ /** The screened brand-name candidates (`_core/brand/brand-name-screening.schemas.ts`), validated by `validateBrandNameScreening`. */
197
+ BRAND_NAME_SCREENING = "saas-specifications:BrandNameScreening",
189
198
  ASSURANCE_PROGRAM_SPECIFICATION = "saas-specifications:AssuranceProgramSpecification",
190
199
  COMPLIANCE_DOCUMENT_CANDIDATE = "saas-specifications:ComplianceDocumentCandidate",
191
200
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"application-specification-family-identity.schemas.d.ts","sourceRoot":"","sources":["../../../../src/_core/application-specification-family-identity.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,oBAAY,8BAA8B;IACxC,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;IACzB,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,kBAAkB,uBAAuB;IACzC,oEAAoE;IACpE,6BAA6B,kCAAkC;IAC/D,+EAA+E;IAC/E,iCAAiC,sCAAsC;IACvE,oBAAoB,yBAAyB;IAC7C,uBAAuB,4BAA4B;IACnD,oBAAoB,yBAAyB;IAC7C,0CAA0C;IAC1C,cA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GG;IACH,sBAAsB,8CAA8C;IACpE;;;OAGG;IACH,YAAY,oCAAoC;IAChD,4FAA4F;IAC5F,eAAe,uCAAuC;IACtD,qFAAqF;IACrF,kBAAkB,qDAAqD;IACvE,4FAA4F;IAC5F,gBAAgB,wCAAwC;IACxD,iGAAiG;IACjG,oBAAoB,4CAA4C;CACjE;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.schemas.d.ts","sourceRoot":"","sources":["../../../../src/_core/application-specification-family-identity.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,oBAAY,8BAA8B;IACxC,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;IACzB,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B;;;;;OAKG;IACH,oBAAoB,yBAAyB;IAC7C,kBAAkB,uBAAuB;IACzC,oEAAoE;IACpE,6BAA6B,kCAAkC;IAC/D,+EAA+E;IAC/E,iCAAiC,sCAAsC;IACvE,oBAAoB,yBAAyB;IAC7C,uBAAuB,4BAA4B;IACnD,oBAAoB,yBAAyB;IAC7C,0CAA0C;IAC1C,cAAc,mBAAmB;IACjC,+FAA+F;IAC/F,uBAAuB,4BAA4B;IACnD,kBAAkB,uBAAuB;IACzC;;;;;;;OAOG;IACH,aAAa,kBAAkB;IAC/B;;;;;;;;;;;;;OAaG;IACH,cAAc,mBAAmB;IACjC;;;;;;;;;OASG;IACH,eAAe,oBAAoB;IAC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wCAAwC;IACxD,iGAAiG;IACjG,oBAAoB,4CAA4C;CACjE;AAED,eAAO,MAAM,oDAAoD,0FAaL,CAAC;AAC7D,MAAM,MAAM,8CAA8C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oDAAoD,CAAC,CAAC"}
@@ -63,6 +63,13 @@ export var ApplicationSpecificationFamily;
63
63
  ApplicationSpecificationFamily["BUILD_PLAN"] = "build-plan";
64
64
  ApplicationSpecificationFamily["PLACEMENT_PLAN"] = "placement-plan";
65
65
  ApplicationSpecificationFamily["BRAND_BRIEF"] = "brand-brief";
66
+ /**
67
+ * WHICH NAMES were proposed for the brand, and what a minimal trademark screening of each found — the
68
+ * registers, classes and jurisdictions searched, per-register results with their sources and dates, and
69
+ * the competitor collisions and domain signals beside them. Produced by `top_down.brand-naming`; the
70
+ * brand-identity interview offers its CHOICE from it. A screening, never a clearance opinion.
71
+ */
72
+ ApplicationSpecificationFamily["BRAND_NAME_SCREENING"] = "brand-name-screening";
66
73
  ApplicationSpecificationFamily["COMPLIANCE_PROGRAM"] = "compliance-program";
67
74
  /** The PRODUCER's family — one drafting run writes one document. */
68
75
  ApplicationSpecificationFamily["COMPLIANCE_DOCUMENT_CANDIDATE"] = "compliance-document-candidate";
@@ -188,6 +195,8 @@ export var ApplicationSpecificationFamilySemanticSchemaRef;
188
195
  ApplicationSpecificationFamilySemanticSchemaRef["DOMAIN_PLAN_OUTPUT_SET"] = "saas-specifications:DomainPlanOutputSet";
189
196
  ApplicationSpecificationFamilySemanticSchemaRef["BUSINESS_MODEL_LITE_SNAPSHOT"] = "saas-specifications:BusinessModelLiteSnapshot";
190
197
  ApplicationSpecificationFamilySemanticSchemaRef["BRAND_SNAPSHOT"] = "saas-specifications:BrandSnapshot";
198
+ /** The screened brand-name candidates (`_core/brand/brand-name-screening.schemas.ts`), validated by `validateBrandNameScreening`. */
199
+ ApplicationSpecificationFamilySemanticSchemaRef["BRAND_NAME_SCREENING"] = "saas-specifications:BrandNameScreening";
191
200
  ApplicationSpecificationFamilySemanticSchemaRef["ASSURANCE_PROGRAM_SPECIFICATION"] = "saas-specifications:AssuranceProgramSpecification";
192
201
  ApplicationSpecificationFamilySemanticSchemaRef["COMPLIANCE_DOCUMENT_CANDIDATE"] = "saas-specifications:ComplianceDocumentCandidate";
193
202
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"application-specification-family-identity.schemas.js","sourceRoot":"","sources":["../../../../src/_core/application-specification-family-identity.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,CAAN,IAAY,8BAqGX;AArGD,WAAY,8BAA8B;IACxC,+DAA6B,CAAA;IAC7B,qEAAmC,CAAA;IACnC,+DAA6B,CAAA;IAC7B,mEAAiC,CAAA;IACjC,mEAAiC,CAAA;IACjC,qDAAmB,CAAA;IACnB,6DAA2B,CAAA;IAC3B,2DAAyB,CAAA;IACzB,mEAAiC,CAAA;IACjC,6DAA2B,CAAA;IAC3B,2EAAyC,CAAA;IACzC,oEAAoE;IACpE,iGAA+D,CAAA;IAC/D,+EAA+E;IAC/E,yGAAuE,CAAA;IACvE,+EAA6C,CAAA;IAC7C,qFAAmD,CAAA;IACnD,+EAA6C,CAAA;IAC7C,0CAA0C;IAC1C,mEAAiC,CAAA;IACjC,+FAA+F;IAC/F,qFAAmD,CAAA;IACnD,2EAAyC,CAAA;IACzC;;;;;;;OAOG;IACH,iEAA+B,CAAA;IAC/B;;;;;;;;;;;;;OAaG;IACH,mEAAiC,CAAA;IACjC;;;;;;;;;OASG;IACH,qEAAmC,CAAA;IACnC;;;;;OAKG;IACH,mFAAiD,CAAA;IACjD;;;;;OAKG;IACH,+DAA6B,CAAA;IAC7B;;;;;;OAMG;IACH,qEAAmC,CAAA;IACnC;;;;;OAKG;IACH,2EAAyC,CAAA;IACzC;;;;;OAKG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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\n/**\n * WHICH family — the closed vocabulary every artifact row, every playbook output and every\n * presentation map is keyed by.\n *\n * ## Why this is an enum, and what stood here before\n *\n * A branded string (`z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).brand<…>()`) stood here until\n * 2026-09-19 and had **zero consumers anywhere in the repository** — measured, not assumed. So the\n * family vocabulary's named home named nothing, and every real consumer took `family: string`\n * instead: the semantic authority's binding, the workbench's presentation registry, its icon map,\n * the projection rows. A brand admits any kebab-case word, so even a consumer that had used it\n * would have been no better off — `'vision-breif'` is a valid brand and a valid regex match.\n *\n * The cost was measured the day this enum was written: the authority bound **19** families, the\n * workbench registered **19** presentations, and its icon map held **18**.\n * `compliance-document-candidate-set` had no glyph and rendered the generic fallback beside a\n * sibling that had one, for as long as both existed. Nothing could report it, because no two of\n * those three maps shared a type — and only one of them had a coverage test.\n *\n * Its sibling {@link ApplicationSpecificationFamilySemanticSchemaRef} has been an enum since it was\n * written. These two are the same kind of thing — one names the family, the other names the\n * contract its content must satisfy — and only one of them could be checked.\n *\n * ## The two vocabularies are NOT one-to-one, deliberately\n *\n * A schema ref may exist with no family bound to it (a contract authored ahead of its producer), and\n * one family's content may be produced against a different ref than it lands under — see the\n * candidate/candidate-set pair. Folding them into one vocabulary would merge \"which document is\n * this\" with \"which shape must it satisfy\", which is exactly the merge this repository calls a\n * trick.\n *\n * ## A lookup from transport data still takes a `string`\n *\n * The artifact ROW carries `family` as a plain string across HTTP, and a playbook declares its\n * outputs' families as authored text. Those are untrusted inputs that NARROW into this vocabulary;\n * they are not typed by it. What this enum types is every place the framework DECLARES a family —\n * the authority's bindings and the maps keyed by them — so a key that names no family is a compile\n * error rather than a silent fallback.\n */\nexport enum ApplicationSpecificationFamily {\n VISION_BRIEF = \"vision-brief\",\n MARKET_SNAPSHOT = \"market-snapshot\",\n REQUIREMENTS = \"requirements\",\n FEATURE_DRAFTS = \"feature-drafts\",\n BUSINESS_MODEL = \"business-model\",\n ROADMAP = \"roadmap\",\n DOMAIN_PLAN = \"domain-plan\",\n BUILD_PLAN = \"build-plan\",\n PLACEMENT_PLAN = \"placement-plan\",\n BRAND_BRIEF = \"brand-brief\",\n COMPLIANCE_PROGRAM = \"compliance-program\",\n /** The PRODUCER's family — one drafting run writes one document. */\n COMPLIANCE_DOCUMENT_CANDIDATE = \"compliance-document-candidate\",\n /** What LANDS — every governed-document draft the application holds (#895). */\n COMPLIANCE_DOCUMENT_CANDIDATE_SET = \"compliance-document-candidate-set\",\n DOCUMENT_PUBLICATION = \"document-publication\",\n DOCUMENT_RELEASE_POLICY = \"document-release-policy\",\n DOCUMENT_RELEASE_SET = \"document-release-set\",\n /** Facts a producer regenerates whole. */\n DOCUMENT_FACTS = \"document-facts\",\n /** The same shape, and a separate family so a regeneration cannot destroy a human decision. */\n DOCUMENT_FACTS_AUTHORED = \"document-facts-authored\",\n PROCESSOR_REGISTER = \"processor-register\",\n /**\n * WHICH RISKS this application carries, and under what posture (#300).\n *\n * Everything this family needs existed before it was bound: a playbook that produces it\n * (`top_down.risk-register`), a schema, a validator, a landing render profile and a landing\n * placement. Only the semantic binding was missing — so the playbook could run and its output\n * could not land, which is what an unbound family means in practice.\n */\n RISK_REGISTER = \"risk-register\",\n /**\n * WHAT THE CREATOR SAID — the dossier of interview answers (#1454, Step 5).\n *\n * Every playbook that interviews a creator declares its questions in the compiled catalog, and\n * until this family existed the answers survived only in a gitignored trace: to change one you\n * re-answered fifteen, and a second run of the same playbook asked everything again. This family\n * keeps each answer by the question ref the playbook already declares, committed like every other\n * family (truth ⇒ git), so a run reads its interview from here by default.\n *\n * It is NOT produced by any playbook — a person answers, one question at a time, and the file is\n * the sum of those answers. That is why it has no generation contract, no aspects (its only reader\n * is the workbench dossier, which joins the answers with the declared questions — a join no aspect\n * over the raw file can make) and no place among the OUTCOMES: it is input, never a deliverable.\n */\n CREATOR_INPUTS = \"creator-inputs\",\n /**\n * The application's EXPERT-PERSONA charters (#572) — one per framework expert role a deliberated\n * playbook or a companion generation step convenes, committed under `src/personas/` by the\n * companion's derive → accept flow and wired onto the `expertPersonaCharters` companion-exports\n * slot. Named `expert-personas` rather than `personas` because the market family already owns\n * `personas` for the BUYER personas the product sells to; these are the WORKER personas that\n * review it. Produced by `top_down.expert-personas`, the playbook that staffs every panel the\n * catalog convenes — before it existed the panel's staffing was not a journey step at all, and\n * `bottom_up.placement-plan` failed closed on every application whose charters nobody had curled in.\n */\n EXPERT_PERSONAS = \"expert-personas\",\n /**\n * WHICH composition scenarios this application needs — a website, a documentation portal, a\n * worker, a minion — DERIVED from what the definition families declare, one decision per scenario\n * the framework ships, applied by the foundation executor (#1491). Never asked: every decision\n * names the declaration it was read from, or the typed declaration that would decide it.\n */\n CAPABILITY_COMPOSITION = \"capability-composition\",\n /**\n * WHAT the marketing website says — its pages, their sections in reading order, and the market\n * entries each draws on (#1492). Produced by `bottom_up.website-plan`, turned into `WEBSITE_PAGE`\n * and `WEBSITE_SECTION` build tasks by the decomposer. The family exists because the build plan\n * has one producer: a second one would destroy the first's output (#895).\n */\n WEBSITE_PLAN = \"website-plan\",\n /**\n * WHAT THE APPLICATION'S EXPERIENCE IS (#1493) — the views it carries beyond a resource's own\n * screens, how its shell and navigation are composed, and which preset components its views\n * reuse. Produced by `bottom_up.experience-plan`, turned into view, component and\n * frontend-configuration build tasks by the decomposer. Distinct from the PLACEMENT plan, which\n * decides where a decided subject sits rather than which surfaces exist.\n */\n EXPERIENCE_PLAN = \"experience-plan\",\n /**\n * WHICH CHAPTERS the documentation portal carries, what each documents and who it is for (#1494) —\n * the accepted application-authored source the documentation derivation has been waiting for\n * (#874). Its schema lives beside the documentation vocabulary it is typed by, under\n * `src/technical-documentation/`, as the risk register lives beside the assurance one.\n */\n DOCUMENTATION_PLAN = \"documentation-plan\",\n /**\n * WHAT RUNS BESIDE THE BACKEND and what the application reaches out to (#1495) — its workers, its\n * minions and the providers it binds — and what reaches IN, its inbound channels (#1630). Produced by\n * `bottom_up.integration-plan`, turned into worker, minion, provider-binding and inbound channel\n * handler build tasks by the decomposer (#1832).\n */\n INTEGRATION_PLAN = \"integration-plan\",\n /**\n * WHERE THE APPLICATION STANDS against its own requirements (#1496) — one row per requirement,\n * the evidence that exists for it, and the stage that follows. DERIVED, never generated, and a\n * reading rather than a gate: there is no \"done\" for an application.\n */\n APPLICATION_MATURITY = \"application-maturity\",\n}\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 * Every governed-document DRAFT the application holds (issue #895).\n *\n * The SET is what lands; {@link ApplicationSpecificationFamilySemanticSchemaRef.COMPLIANCE_DOCUMENT_CANDIDATE}\n * above stays the PRODUCER's contract, because a drafting run writes one document. They are the\n * first pair in this vocabulary where what a playbook emits and what its file holds differ, and\n * that is deliberate: a candidate landed singular destroyed the previous document every time.\n */\n COMPLIANCE_DOCUMENT_CANDIDATE_SET = \"saas-specifications:ApplicationComplianceDocumentCandidateSet\",\n /** The committed expert-persona charter SET — `ExpertPersonaCharter[]`, validated as a set by `validateExpertPersonaCharters`. */\n EXPERT_PERSONA_CHARTERS = \"saas-specifications:ExpertPersonaCharters\",\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 * The governed-document RELEASES an application has committed — which drafted\n * content takes effect, when, and what it supersedes. Separate from the\n * release POLICY beside it: the policy decides which approval lane a\n * requirement must go through, this records the releases actually composed,\n * each stating its own approval standing.\n */\n APPLICATION_DOCUMENT_RELEASE_SET = \"saas-specifications:ApplicationDocumentReleaseSet\",\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). Declarations are read as authored;\n * nothing seals them into a resolver contribution any more.\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 /**\n * WHICH RISKS this application carries, and under what posture — the accepted risk register (#300).\n *\n * Distinct from `APPLICATION_COMPLIANCE_PROGRAM`, which says which control OBJECTIVES an\n * application claims. The two inform each other and answer different questions: a programme is\n * about controls, a register about exposures, and folding either into the other would merge two\n * concepts for the convenience of one file.\n *\n * It is a family rather than a report because it is ACCEPTED: a model completes it from the\n * derived risk signals and the application's own specification families, a human accepts it, and\n * the acceptance is the commit. That is the same standing as the programme beside it and the\n * reason both need a placement — the note on the processor register above records what a family\n * without one cost when two artifacts landed in the same directory.\n */\n APPLICATION_RISK_REGISTER = \"saas-specifications:ApplicationRiskRegister\",\n\n /**\n * The creator's interview answers, keyed by playbook and question ref — the dossier's committed\n * half (#1454). See {@link ApplicationSpecificationFamily.CREATOR_INPUTS} for why it is a family\n * and what it deliberately is not.\n */\n APPLICATION_CREATOR_INPUTS = \"saas-specifications:ApplicationCreatorInputs\",\n /**\n * The composition decisions — one per framework scenario, with the declaration each was derived\n * from (`_core/capability-composition/`). See {@link ApplicationSpecificationFamily.CAPABILITY_COMPOSITION}.\n */\n CAPABILITY_COMPOSITION = \"saas-specifications:CapabilityComposition\",\n /**\n * The marketing site's pages and sections (`_core/website-plan/`). See\n * {@link ApplicationSpecificationFamily.WEBSITE_PLAN}.\n */\n WEBSITE_PLAN = \"saas-specifications:WebsitePlan\",\n /** The application's views, shell and navigation composition (`_core/experience-plan/`). */\n EXPERIENCE_PLAN = \"saas-specifications:ExperiencePlan\",\n /** The documentation portal's authored chapters (`src/technical-documentation/`). */\n DOCUMENTATION_PLAN = \"saas-specifications:ApplicationDocumentationPlan\",\n /** The application's workers, minions and provider bindings (`_core/integration-plan/`). */\n INTEGRATION_PLAN = \"saas-specifications:IntegrationPlan\",\n /** Where the application stands against its own requirements (`_core/application-maturity/`). */\n APPLICATION_MATURITY = \"saas-specifications:ApplicationMaturity\",\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.schemas.js","sourceRoot":"","sources":["../../../../src/_core/application-specification-family-identity.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;GAYG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,CAAN,IAAY,8BA4GX;AA5GD,WAAY,8BAA8B;IACxC,+DAA6B,CAAA;IAC7B,qEAAmC,CAAA;IACnC,+DAA6B,CAAA;IAC7B,mEAAiC,CAAA;IACjC,mEAAiC,CAAA;IACjC,qDAAmB,CAAA;IACnB,6DAA2B,CAAA;IAC3B,2DAAyB,CAAA;IACzB,mEAAiC,CA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ClH;;;;OAIG;IACH,0KAAuH,CAAA;IACvH;;;;;;OAMG;IACH,yIAAsF,CAAA;IACtF;;;;;;;;OAQG;IACH,uJAAoG,CAAA;IACpG;;;;;;;;;;;;OAYG;IACH,wKAAqH,CAAA;IACrH;;;;;;;;;;;;;;OAcG;IACH,sIAAmF,CAAA;IAEnF;;;;;;;;;;;;;OAaG;IACH,4HAAyE,CAAA;IAEzE;;;;OAIG;IACH,8HAA2E,CAAA;IAC3E;;;OAGG;IACH,uHAAoE,CAAA;IACpE;;;OAGG;IACH,mGAAgD,CAAA;IAChD,4FAA4F;IAC5F,yGAAsD,CAAA;IACtD,qFAAqF;IACrF,0HAAuE,CAAA;IACvE,4FAA4F;IAC5F,2GAAwD,CAAA;IACxD,iGAAiG;IACjG,mHAAgE,CAAA;AAClE,CAAC,EAxIW,+CAA+C,KAA/C,+CAA+C,QAwI1D;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\n/**\n * WHICH family — the closed vocabulary every artifact row, every playbook output and every\n * presentation map is keyed by.\n *\n * ## Why this is an enum, and what stood here before\n *\n * A branded string (`z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/).brand<…>()`) stood here until\n * 2026-09-19 and had **zero consumers anywhere in the repository** — measured, not assumed. So the\n * family vocabulary's named home named nothing, and every real consumer took `family: string`\n * instead: the semantic authority's binding, the workbench's presentation registry, its icon map,\n * the projection rows. A brand admits any kebab-case word, so even a consumer that had used it\n * would have been no better off — `'vision-breif'` is a valid brand and a valid regex match.\n *\n * The cost was measured the day this enum was written: the authority bound **19** families, the\n * workbench registered **19** presentations, and its icon map held **18**.\n * `compliance-document-candidate-set` had no glyph and rendered the generic fallback beside a\n * sibling that had one, for as long as both existed. Nothing could report it, because no two of\n * those three maps shared a type — and only one of them had a coverage test.\n *\n * Its sibling {@link ApplicationSpecificationFamilySemanticSchemaRef} has been an enum since it was\n * written. These two are the same kind of thing — one names the family, the other names the\n * contract its content must satisfy — and only one of them could be checked.\n *\n * ## The two vocabularies are NOT one-to-one, deliberately\n *\n * A schema ref may exist with no family bound to it (a contract authored ahead of its producer), and\n * one family's content may be produced against a different ref than it lands under — see the\n * candidate/candidate-set pair. Folding them into one vocabulary would merge \"which document is\n * this\" with \"which shape must it satisfy\", which is exactly the merge this repository calls a\n * trick.\n *\n * ## A lookup from transport data still takes a `string`\n *\n * The artifact ROW carries `family` as a plain string across HTTP, and a playbook declares its\n * outputs' families as authored text. Those are untrusted inputs that NARROW into this vocabulary;\n * they are not typed by it. What this enum types is every place the framework DECLARES a family —\n * the authority's bindings and the maps keyed by them — so a key that names no family is a compile\n * error rather than a silent fallback.\n */\nexport enum ApplicationSpecificationFamily {\n VISION_BRIEF = \"vision-brief\",\n MARKET_SNAPSHOT = \"market-snapshot\",\n REQUIREMENTS = \"requirements\",\n FEATURE_DRAFTS = \"feature-drafts\",\n BUSINESS_MODEL = \"business-model\",\n ROADMAP = \"roadmap\",\n DOMAIN_PLAN = \"domain-plan\",\n BUILD_PLAN = \"build-plan\",\n PLACEMENT_PLAN = \"placement-plan\",\n BRAND_BRIEF = \"brand-brief\",\n /**\n * WHICH NAMES were proposed for the brand, and what a minimal trademark screening of each found — the\n * registers, classes and jurisdictions searched, per-register results with their sources and dates, and\n * the competitor collisions and domain signals beside them. Produced by `top_down.brand-naming`; the\n * brand-identity interview offers its CHOICE from it. A screening, never a clearance opinion.\n */\n BRAND_NAME_SCREENING = \"brand-name-screening\",\n COMPLIANCE_PROGRAM = \"compliance-program\",\n /** The PRODUCER's family — one drafting run writes one document. */\n COMPLIANCE_DOCUMENT_CANDIDATE = \"compliance-document-candidate\",\n /** What LANDS — every governed-document draft the application holds (#895). */\n COMPLIANCE_DOCUMENT_CANDIDATE_SET = \"compliance-document-candidate-set\",\n DOCUMENT_PUBLICATION = \"document-publication\",\n DOCUMENT_RELEASE_POLICY = \"document-release-policy\",\n DOCUMENT_RELEASE_SET = \"document-release-set\",\n /** Facts a producer regenerates whole. */\n DOCUMENT_FACTS = \"document-facts\",\n /** The same shape, and a separate family so a regeneration cannot destroy a human decision. */\n DOCUMENT_FACTS_AUTHORED = \"document-facts-authored\",\n PROCESSOR_REGISTER = \"processor-register\",\n /**\n * WHICH RISKS this application carries, and under what posture (#300).\n *\n * Everything this family needs existed before it was bound: a playbook that produces it\n * (`top_down.risk-register`), a schema, a validator, a landing render profile and a landing\n * placement. Only the semantic binding was missing — so the playbook could run and its output\n * could not land, which is what an unbound family means in practice.\n */\n RISK_REGISTER = \"risk-register\",\n /**\n * WHAT THE CREATOR SAID — the dossier of interview answers (#1454, Step 5).\n *\n * Every playbook that interviews a creator declares its questions in the compiled catalog, and\n * until this family existed the answers survived only in a gitignored trace: to change one you\n * re-answered fifteen, and a second run of the same playbook asked everything again. This family\n * keeps each answer by the question ref the playbook already declares, committed like every other\n * family (truth ⇒ git), so a run reads its interview from here by default.\n *\n * It is NOT produced by any playbook — a person answers, one question at a time, and the file is\n * the sum of those answers. That is why it has no generation contract, no aspects (its only reader\n * is the workbench dossier, which joins the answers with the declared questions — a join no aspect\n * over the raw file can make) and no place among the OUTCOMES: it is input, never a deliverable.\n */\n CREATOR_INPUTS = \"creator-inputs\",\n /**\n * The application's EXPERT-PERSONA charters (#572) — one per framework expert role a deliberated\n * playbook or a companion generation step convenes, committed under `src/personas/` by the\n * companion's derive → accept flow and wired onto the `expertPersonaCharters` companion-exports\n * slot. Named `expert-personas` rather than `personas` because the market family already owns\n * `personas` for the BUYER personas the product sells to; these are the WORKER personas that\n * review it. Produced by `top_down.expert-personas`, the playbook that staffs every panel the\n * catalog convenes — before it existed the panel's staffing was not a journey step at all, and\n * `bottom_up.placement-plan` failed closed on every application whose charters nobody had curled in.\n */\n EXPERT_PERSONAS = \"expert-personas\",\n /**\n * WHICH composition scenarios this application needs — a website, a documentation portal, a\n * worker, a minion — DERIVED from what the definition families declare, one decision per scenario\n * the framework ships, applied by the foundation executor (#1491). Never asked: every decision\n * names the declaration it was read from, or the typed declaration that would decide it.\n */\n CAPABILITY_COMPOSITION = \"capability-composition\",\n /**\n * WHAT the marketing website says — its pages, their sections in reading order, and the market\n * entries each draws on (#1492). Produced by `bottom_up.website-plan`, turned into `WEBSITE_PAGE`\n * and `WEBSITE_SECTION` build tasks by the decomposer. The family exists because the build plan\n * has one producer: a second one would destroy the first's output (#895).\n */\n WEBSITE_PLAN = \"website-plan\",\n /**\n * WHAT THE APPLICATION'S EXPERIENCE IS (#1493) — the views it carries beyond a resource's own\n * screens, how its shell and navigation are composed, and which preset components its views\n * reuse. Produced by `bottom_up.experience-plan`, turned into view, component and\n * frontend-configuration build tasks by the decomposer. Distinct from the PLACEMENT plan, which\n * decides where a decided subject sits rather than which surfaces exist.\n */\n EXPERIENCE_PLAN = \"experience-plan\",\n /**\n * WHICH CHAPTERS the documentation portal carries, what each documents and who it is for (#1494) —\n * the accepted application-authored source the documentation derivation has been waiting for\n * (#874). Its schema lives beside the documentation vocabulary it is typed by, under\n * `src/technical-documentation/`, as the risk register lives beside the assurance one.\n */\n DOCUMENTATION_PLAN = \"documentation-plan\",\n /**\n * WHAT RUNS BESIDE THE BACKEND and what the application reaches out to (#1495) — its workers, its\n * minions and the providers it binds — and what reaches IN, its inbound channels (#1630). Produced by\n * `bottom_up.integration-plan`, turned into worker, minion, provider-binding and inbound channel\n * handler build tasks by the decomposer (#1832).\n */\n INTEGRATION_PLAN = \"integration-plan\",\n /**\n * WHERE THE APPLICATION STANDS against its own requirements (#1496) — one row per requirement,\n * the evidence that exists for it, and the stage that follows. DERIVED, never generated, and a\n * reading rather than a gate: there is no \"done\" for an application.\n */\n APPLICATION_MATURITY = \"application-maturity\",\n}\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 /** The screened brand-name candidates (`_core/brand/brand-name-screening.schemas.ts`), validated by `validateBrandNameScreening`. */\n BRAND_NAME_SCREENING = \"saas-specifications:BrandNameScreening\",\n ASSURANCE_PROGRAM_SPECIFICATION = \"saas-specifications:AssuranceProgramSpecification\",\n COMPLIANCE_DOCUMENT_CANDIDATE = \"saas-specifications:ComplianceDocumentCandidate\",\n /**\n * Every governed-document DRAFT the application holds (issue #895).\n *\n * The SET is what lands; {@link ApplicationSpecificationFamilySemanticSchemaRef.COMPLIANCE_DOCUMENT_CANDIDATE}\n * above stays the PRODUCER's contract, because a drafting run writes one document. They are the\n * first pair in this vocabulary where what a playbook emits and what its file holds differ, and\n * that is deliberate: a candidate landed singular destroyed the previous document every time.\n */\n COMPLIANCE_DOCUMENT_CANDIDATE_SET = \"saas-specifications:ApplicationComplianceDocumentCandidateSet\",\n /** The committed expert-persona charter SET — `ExpertPersonaCharter[]`, validated as a set by `validateExpertPersonaCharters`. */\n EXPERT_PERSONA_CHARTERS = \"saas-specifications:ExpertPersonaCharters\",\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 * The governed-document RELEASES an application has committed — which drafted\n * content takes effect, when, and what it supersedes. Separate from the\n * release POLICY beside it: the policy decides which approval lane a\n * requirement must go through, this records the releases actually composed,\n * each stating its own approval standing.\n */\n APPLICATION_DOCUMENT_RELEASE_SET = \"saas-specifications:ApplicationDocumentReleaseSet\",\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). Declarations are read as authored;\n * nothing seals them into a resolver contribution any more.\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 /**\n * WHICH RISKS this application carries, and under what posture — the accepted risk register (#300).\n *\n * Distinct from `APPLICATION_COMPLIANCE_PROGRAM`, which says which control OBJECTIVES an\n * application claims. The two inform each other and answer different questions: a programme is\n * about controls, a register about exposures, and folding either into the other would merge two\n * concepts for the convenience of one file.\n *\n * It is a family rather than a report because it is ACCEPTED: a model completes it from the\n * derived risk signals and the application's own specification families, a human accepts it, and\n * the acceptance is the commit. That is the same standing as the programme beside it and the\n * reason both need a placement — the note on the processor register above records what a family\n * without one cost when two artifacts landed in the same directory.\n */\n APPLICATION_RISK_REGISTER = \"saas-specifications:ApplicationRiskRegister\",\n\n /**\n * The creator's interview answers, keyed by playbook and question ref — the dossier's committed\n * half (#1454). See {@link ApplicationSpecificationFamily.CREATOR_INPUTS} for why it is a family\n * and what it deliberately is not.\n */\n APPLICATION_CREATOR_INPUTS = \"saas-specifications:ApplicationCreatorInputs\",\n /**\n * The composition decisions — one per framework scenario, with the declaration each was derived\n * from (`_core/capability-composition/`). See {@link ApplicationSpecificationFamily.CAPABILITY_COMPOSITION}.\n */\n CAPABILITY_COMPOSITION = \"saas-specifications:CapabilityComposition\",\n /**\n * The marketing site's pages and sections (`_core/website-plan/`). See\n * {@link ApplicationSpecificationFamily.WEBSITE_PLAN}.\n */\n WEBSITE_PLAN = \"saas-specifications:WebsitePlan\",\n /** The application's views, shell and navigation composition (`_core/experience-plan/`). */\n EXPERIENCE_PLAN = \"saas-specifications:ExperiencePlan\",\n /** The documentation portal's authored chapters (`src/technical-documentation/`). */\n DOCUMENTATION_PLAN = \"saas-specifications:ApplicationDocumentationPlan\",\n /** The application's workers, minions and provider bindings (`_core/integration-plan/`). */\n INTEGRATION_PLAN = \"saas-specifications:IntegrationPlan\",\n /** Where the application stands against its own requirements (`_core/application-maturity/`). */\n APPLICATION_MATURITY = \"saas-specifications:ApplicationMaturity\",\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,136 @@
1
+ import { type MarketAlternativeConfig } from '../market/market-alternative.schemas';
2
+ import { type ApplicationCreatorInputs } from '../../application-creation/application-creator-inputs.application-creation.schemas';
3
+ import { BrandNameCandidateOrigin, type BrandNameCandidate, type BrandNameScreening } from './brand-name-screening.schemas';
4
+ /**
5
+ * @wildo_source:part:start brand.name-choice.config facet:layer:specification facet:family:brand facet:audience:app-developer
6
+ *
7
+ * Which screened names the creator is OFFERED, and how a choice records what the creator accepted.
8
+ *
9
+ * The `top_down.brand-identity` interview asks `brand-name` as a CHOICE whose options are computed from
10
+ * the landed `brand-name-screening` by {@link deriveOfferableBrandNameOptions} — never written by a model.
11
+ * An option is the exact name, optionally followed by ONE bracketed qualifier from
12
+ * {@link BrandNameChoiceQualifier}:
13
+ *
14
+ * | candidate | offered as |
15
+ * |---|---|
16
+ * | CLEAR, no competitor collision | `Batisio` |
17
+ * | UNKNOWN (a register could not be read, or coverage is incomplete), no collision | `Batisio [screening-incomplete]` |
18
+ * | CONFLICT or competitor collision, **creator-supplied** | `Keystone [keep-despite-conflict]` |
19
+ * | CONFLICT or competitor collision, **companion-proposed** | not offered |
20
+ *
21
+ * So choosing a conflicting name is an EXPLICIT act — the option the creator picks says "keep despite
22
+ * conflict" — and the creator's answer in the dossier is the durable record of it. A companion-proposed
23
+ * name that conflicts is never offered at all: the companion must not put a conflicting name in front of
24
+ * anyone as a suggestion. Which names are the creator's is read from their own `names-to-screen` answer to
25
+ * `top_down.brand-naming`, never from the origin the screening records — a model wrote that field.
26
+ */
27
+ export declare enum BrandNameChoiceQualifier {
28
+ /** The screening could not reach every register, class or jurisdiction: the name is NOT cleared. */
29
+ SCREENING_INCOMPLETE = "screening-incomplete",
30
+ /** The creator keeps their own name although a live mark or a named competitor conflicts with it. */
31
+ KEEP_DESPITE_CONFLICT = "keep-despite-conflict"
32
+ }
33
+ /**
34
+ * Where the creator lists the names THEY want screened: one free-text question of the naming step,
35
+ * answerable with "none". The ONLY source of a candidate's creator-supplied origin — see
36
+ * {@link effectiveBrandNameCandidateOrigin}.
37
+ */
38
+ export declare const BRAND_NAMING_NAMES_TO_SCREEN_QUESTION: {
39
+ readonly playbookRef: string;
40
+ readonly questionRef: string;
41
+ };
42
+ /** Where the creator records the brand name they CHOSE — the brand identity's computed `brand-name` CHOICE. */
43
+ export declare const BRAND_IDENTITY_BRAND_NAME_QUESTION: {
44
+ readonly playbookRef: string;
45
+ readonly questionRef: string;
46
+ };
47
+ /**
48
+ * What the creator DECIDED about the brand name, from the dossier: the names they asked to have screened, and the
49
+ * option they chose. The one reader of both, so the choice, the coherence report and the risk signal cannot disagree.
50
+ *
51
+ * Only DECIDED answers count. Both questions are declared ask-never-propose, and this is the second guard: an
52
+ * ASSUMED answer is a model's proposal, and letting it in would make a model's names read as the creator's own and a
53
+ * model's choice read as the creator's decision to keep a conflicting name.
54
+ */
55
+ export declare function readCreatorBrandNameDecisions(creatorInputs: ApplicationCreatorInputs | undefined): {
56
+ readonly creatorSuppliedNames: readonly string[];
57
+ readonly chosenBrandNameAnswer: string | undefined;
58
+ };
59
+ /**
60
+ * The names a `names-to-screen` answer lists: split on commas, semicolons and line breaks, trimmed, with
61
+ * surrounding quotes removed. "none" (in any case, alone) lists nothing, and so does an absent answer.
62
+ */
63
+ export declare function parseNamesToScreenAnswer(answer: string | undefined): readonly string[];
64
+ /**
65
+ * A candidate's origin as the CREATOR'S ANSWER decides it — never as the producing model labelled it.
66
+ *
67
+ * The origin decides what may be offered (a conflicting companion proposal is never offered; a conflicting
68
+ * name of the creator's own is offered as an explicit keep-despite-conflict), so it must not rest on a field
69
+ * a model wrote. A candidate is the creator's exactly when its name is one they listed in `names-to-screen`;
70
+ * everything else is the companion's proposal, whatever the screening records.
71
+ */
72
+ export declare function effectiveBrandNameCandidateOrigin(candidate: Pick<BrandNameCandidate, 'name'>, creatorSuppliedNames: readonly string[]): BrandNameCandidateOrigin;
73
+ /** One offerable option, with the candidate it stands for. */
74
+ export interface OfferableBrandNameOption {
75
+ readonly option: string;
76
+ readonly candidateRef: string;
77
+ readonly qualifier: BrandNameChoiceQualifier | null;
78
+ }
79
+ /** The option string for a name and an optional qualifier. */
80
+ export declare function formatBrandNameChoiceOption(name: string, qualifier: BrandNameChoiceQualifier | null): string;
81
+ /**
82
+ * The name and qualifier an option string carries — the inverse of {@link formatBrandNameChoiceOption}.
83
+ * A trailing bracket that is not a known qualifier is part of the name.
84
+ */
85
+ export declare function parseBrandNameChoiceOption(option: string): {
86
+ readonly name: string;
87
+ readonly qualifier: BrandNameChoiceQualifier | null;
88
+ };
89
+ /** The competitor names a brand name must stay distinct from: every named product among the market snapshot's alternatives. */
90
+ export declare function marketCompetitorNames(alternatives: readonly Pick<MarketAlternativeConfig, 'name' | 'alternativeKind'>[] | undefined): readonly string[];
91
+ /**
92
+ * The competitors a candidate collides with: its recorded collisions, plus any competitor or alternative
93
+ * the market snapshot names whose normalized name EQUALS the candidate's or contains it (or is contained
94
+ * by it). Deterministic on purpose — a collision the producing model failed to record is still caught.
95
+ */
96
+ export declare function brandNameCompetitorCollisions(candidate: Pick<BrandNameCandidate, 'name' | 'competitorCollisions'>, competitorNames: readonly string[]): readonly string[];
97
+ /**
98
+ * The options the `brand-name` question offers — see the table on {@link BrandNameChoiceQualifier}.
99
+ * Ordered as the screening lists its candidates; duplicates (two candidates with one spelling) keep the first.
100
+ */
101
+ export declare function deriveOfferableBrandNameOptions(input: {
102
+ readonly screening: BrandNameScreening;
103
+ /** Every competitor and alternative name the market snapshot holds. */
104
+ readonly competitorNames: readonly string[];
105
+ /** The names the creator listed in `names-to-screen` ({@link parseNamesToScreenAnswer}) — what decides a candidate's origin. */
106
+ readonly creatorSuppliedNames: readonly string[];
107
+ }): readonly OfferableBrandNameOption[];
108
+ /** How the brand's chosen name stands against the screening — what the coherence report and the risk register read. */
109
+ export declare enum BrandNameChoiceStanding {
110
+ /** The name is a screened candidate whose screening is clear. */
111
+ CLEARED = "CLEARED",
112
+ /** The name is a screened candidate whose screening is incomplete. */
113
+ SCREENING_INCOMPLETE = "SCREENING_INCOMPLETE",
114
+ /** The name is a screened candidate that conflicts, and the creator CHOSE it through the explicit keep-despite-conflict option. */
115
+ KEPT_DESPITE_CONFLICT = "KEPT_DESPITE_CONFLICT",
116
+ /**
117
+ * The name is a screened candidate that conflicts, and nobody chose to keep it despite that: the brand was named
118
+ * before a re-screen found the conflict, or by a route other than the keep-despite-conflict option. Never reported
119
+ * as the creator's deliberate decision, because it was not one.
120
+ */
121
+ CONFLICT_UNACKNOWLEDGED = "CONFLICT_UNACKNOWLEDGED",
122
+ /** The name was never screened. */
123
+ NOT_SCREENED = "NOT_SCREENED"
124
+ }
125
+ /** Where a brand name stands against the screening, derived by matching it to a candidate. */
126
+ export declare function deriveBrandNameChoiceStanding(input: {
127
+ readonly brandName: string;
128
+ readonly screening: BrandNameScreening | undefined;
129
+ readonly competitorNames: readonly string[];
130
+ /** The creator's recorded `brand-name` answer (`readCreatorBrandNameDecisions`) — what says a conflict was KEPT deliberately. */
131
+ readonly chosenBrandNameAnswer: string | undefined;
132
+ }): {
133
+ readonly standing: BrandNameChoiceStanding;
134
+ readonly candidate: BrandNameCandidate | undefined;
135
+ };
136
+ //# sourceMappingURL=brand-name-choice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brand-name-choice.d.ts","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-name-choice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AACrG,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,oFAAoF,CAAC;AAC5F,OAAO,EACL,wBAAwB,EAIxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACxB,MAAM,gCAAgC,CAAC;AAExC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,oBAAY,wBAAwB;IAClC,oGAAoG;IACpG,oBAAoB,yBAAyB;IAC7C,qGAAqG;IACrG,qBAAqB,0BAA0B;CAChD;AAED;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,EAAE;IAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAG/G,CAAC;AAEF,+GAA+G;AAC/G,eAAO,MAAM,kCAAkC,EAAE;IAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAG5G,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAAC,aAAa,EAAE,wBAAwB,GAAG,SAAS,GAAG;IAClG,QAAQ,CAAC,oBAAoB,EAAE,SAAS,MAAM,EAAE,CAAC;IACjD,QAAQ,CAAC,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;CACpD,CAQA;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,MAAM,EAAE,CAOtF;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAAC,SAAS,EAAE,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,EAAE,oBAAoB,EAAE,SAAS,MAAM,EAAE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B,yBAAyB;IAC7C,mIAAmI;IACnI,qBAAqB,0BAA0B;IAC/C;;;;OAIG;IACH,uBAAuB,4BAA4B;IACnD,mCAAmC;IACnC,YAAY,iBAAiB;CAC9B;AAED,8FAA8F;AAC9F,wBAAgB,6BAA6B,CAAC,KAAK,EAAE;IACnD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACnD,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5C,iIAAiI;IACjI,QAAQ,CAAC,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;CACpD,GAAG;IAAE,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS,CAAA;CAAE,CAarG"}
@@ -0,0 +1,193 @@
1
+ import { AlternativeKind } from '../market/market-alternative.schemas.js';
2
+ import { ApplicationCreatorInputAnswerStanding, readCreatorInputAnswersForPlaybook, } from '../../application-creation/application-creator-inputs.application-creation.schemas.js';
3
+ import { BrandNameCandidateOrigin, BrandNameTrademarkOutcome, deriveBrandNameTrademarkOutcome, normalizeBrandNameForComparison, } from './brand-name-screening.schemas.js';
4
+ /**
5
+ * @wildo_source:part:start brand.name-choice.config facet:layer:specification facet:family:brand facet:audience:app-developer
6
+ *
7
+ * Which screened names the creator is OFFERED, and how a choice records what the creator accepted.
8
+ *
9
+ * The `top_down.brand-identity` interview asks `brand-name` as a CHOICE whose options are computed from
10
+ * the landed `brand-name-screening` by {@link deriveOfferableBrandNameOptions} — never written by a model.
11
+ * An option is the exact name, optionally followed by ONE bracketed qualifier from
12
+ * {@link BrandNameChoiceQualifier}:
13
+ *
14
+ * | candidate | offered as |
15
+ * |---|---|
16
+ * | CLEAR, no competitor collision | `Batisio` |
17
+ * | UNKNOWN (a register could not be read, or coverage is incomplete), no collision | `Batisio [screening-incomplete]` |
18
+ * | CONFLICT or competitor collision, **creator-supplied** | `Keystone [keep-despite-conflict]` |
19
+ * | CONFLICT or competitor collision, **companion-proposed** | not offered |
20
+ *
21
+ * So choosing a conflicting name is an EXPLICIT act — the option the creator picks says "keep despite
22
+ * conflict" — and the creator's answer in the dossier is the durable record of it. A companion-proposed
23
+ * name that conflicts is never offered at all: the companion must not put a conflicting name in front of
24
+ * anyone as a suggestion. Which names are the creator's is read from their own `names-to-screen` answer to
25
+ * `top_down.brand-naming`, never from the origin the screening records — a model wrote that field.
26
+ */
27
+ export var BrandNameChoiceQualifier;
28
+ (function (BrandNameChoiceQualifier) {
29
+ /** The screening could not reach every register, class or jurisdiction: the name is NOT cleared. */
30
+ BrandNameChoiceQualifier["SCREENING_INCOMPLETE"] = "screening-incomplete";
31
+ /** The creator keeps their own name although a live mark or a named competitor conflicts with it. */
32
+ BrandNameChoiceQualifier["KEEP_DESPITE_CONFLICT"] = "keep-despite-conflict";
33
+ })(BrandNameChoiceQualifier || (BrandNameChoiceQualifier = {}));
34
+ /**
35
+ * Where the creator lists the names THEY want screened: one free-text question of the naming step,
36
+ * answerable with "none". The ONLY source of a candidate's creator-supplied origin — see
37
+ * {@link effectiveBrandNameCandidateOrigin}.
38
+ */
39
+ export const BRAND_NAMING_NAMES_TO_SCREEN_QUESTION = {
40
+ playbookRef: 'top_down.brand-naming',
41
+ questionRef: 'names-to-screen',
42
+ };
43
+ /** Where the creator records the brand name they CHOSE — the brand identity's computed `brand-name` CHOICE. */
44
+ export const BRAND_IDENTITY_BRAND_NAME_QUESTION = {
45
+ playbookRef: 'top_down.brand-identity',
46
+ questionRef: 'brand-name',
47
+ };
48
+ /**
49
+ * What the creator DECIDED about the brand name, from the dossier: the names they asked to have screened, and the
50
+ * option they chose. The one reader of both, so the choice, the coherence report and the risk signal cannot disagree.
51
+ *
52
+ * Only DECIDED answers count. Both questions are declared ask-never-propose, and this is the second guard: an
53
+ * ASSUMED answer is a model's proposal, and letting it in would make a model's names read as the creator's own and a
54
+ * model's choice read as the creator's decision to keep a conflicting name.
55
+ */
56
+ export function readCreatorBrandNameDecisions(creatorInputs) {
57
+ const decided = (question) => readCreatorInputAnswersForPlaybook(creatorInputs, question.playbookRef)
58
+ .find((answer) => answer.questionRef === question.questionRef && answer.standing !== ApplicationCreatorInputAnswerStanding.ASSUMED)?.answer;
59
+ return {
60
+ creatorSuppliedNames: parseNamesToScreenAnswer(decided(BRAND_NAMING_NAMES_TO_SCREEN_QUESTION)),
61
+ chosenBrandNameAnswer: decided(BRAND_IDENTITY_BRAND_NAME_QUESTION),
62
+ };
63
+ }
64
+ /**
65
+ * The names a `names-to-screen` answer lists: split on commas, semicolons and line breaks, trimmed, with
66
+ * surrounding quotes removed. "none" (in any case, alone) lists nothing, and so does an absent answer.
67
+ */
68
+ export function parseNamesToScreenAnswer(answer) {
69
+ if (answer === undefined)
70
+ return [];
71
+ const names = answer
72
+ .split(/[,;\n]+/u)
73
+ .map((entry) => entry.trim().replace(/^["'“”‘’]+|["'“”‘’]+$/gu, '').trim())
74
+ .filter((entry) => entry.length > 0);
75
+ return names.length === 1 && names[0].toLowerCase().replace(/[.!]+$/u, '') === 'none' ? [] : names;
76
+ }
77
+ /**
78
+ * A candidate's origin as the CREATOR'S ANSWER decides it — never as the producing model labelled it.
79
+ *
80
+ * The origin decides what may be offered (a conflicting companion proposal is never offered; a conflicting
81
+ * name of the creator's own is offered as an explicit keep-despite-conflict), so it must not rest on a field
82
+ * a model wrote. A candidate is the creator's exactly when its name is one they listed in `names-to-screen`;
83
+ * everything else is the companion's proposal, whatever the screening records.
84
+ */
85
+ export function effectiveBrandNameCandidateOrigin(candidate, creatorSuppliedNames) {
86
+ const key = normalizeBrandNameForComparison(candidate.name);
87
+ return creatorSuppliedNames.some((name) => normalizeBrandNameForComparison(name) === key)
88
+ ? BrandNameCandidateOrigin.CREATOR_SUPPLIED
89
+ : BrandNameCandidateOrigin.COMPANION_PROPOSED;
90
+ }
91
+ /** The option string for a name and an optional qualifier. */
92
+ export function formatBrandNameChoiceOption(name, qualifier) {
93
+ return qualifier === null ? name : `${name} [${qualifier}]`;
94
+ }
95
+ /**
96
+ * The name and qualifier an option string carries — the inverse of {@link formatBrandNameChoiceOption}.
97
+ * A trailing bracket that is not a known qualifier is part of the name.
98
+ */
99
+ export function parseBrandNameChoiceOption(option) {
100
+ const trimmed = option.trim();
101
+ const match = /^(.*\S)\s+\[([a-z-]+)\]$/.exec(trimmed);
102
+ const qualifier = match ? Object.values(BrandNameChoiceQualifier).find((candidate) => candidate === match[2]) : undefined;
103
+ return match && qualifier !== undefined ? { name: match[1], qualifier } : { name: trimmed, qualifier: null };
104
+ }
105
+ /** @wildo_source:part:end brand.name-choice.config */
106
+ /** The alternative kinds that are NAMED PRODUCTS — a status quo, a proxy or an in-house build has no name a brand could collide with. */
107
+ const NAMED_PRODUCT_ALTERNATIVE_KINDS = [AlternativeKind.DIRECT_COMPETITOR, AlternativeKind.INCUMBENT_TOOL];
108
+ /** The competitor names a brand name must stay distinct from: every named product among the market snapshot's alternatives. */
109
+ export function marketCompetitorNames(alternatives) {
110
+ return (alternatives ?? []).filter((alternative) => NAMED_PRODUCT_ALTERNATIVE_KINDS.includes(alternative.alternativeKind)).map((alternative) => alternative.name);
111
+ }
112
+ /** The shortest normalized name whose containment in another counts as a collision. */
113
+ const MINIMUM_CONTAINED_NAME_LENGTH = 4;
114
+ /**
115
+ * The competitors a candidate collides with: its recorded collisions, plus any competitor or alternative
116
+ * the market snapshot names whose normalized name EQUALS the candidate's or contains it (or is contained
117
+ * by it). Deterministic on purpose — a collision the producing model failed to record is still caught.
118
+ */
119
+ export function brandNameCompetitorCollisions(candidate, competitorNames) {
120
+ const own = normalizeBrandNameForComparison(candidate.name);
121
+ const detected = competitorNames.filter((competitor) => {
122
+ const other = normalizeBrandNameForComparison(competitor);
123
+ if (other.length === 0 || own.length === 0)
124
+ return false;
125
+ if (other === own)
126
+ return true;
127
+ // Containment only when the shorter name is long enough to be distinctive: "ai" inside every name is not a collision.
128
+ return Math.min(other.length, own.length) >= MINIMUM_CONTAINED_NAME_LENGTH && (other.includes(own) || own.includes(other));
129
+ });
130
+ return [...new Set([...candidate.competitorCollisions.map((collision) => collision.competitorName), ...detected])];
131
+ }
132
+ /**
133
+ * The options the `brand-name` question offers — see the table on {@link BrandNameChoiceQualifier}.
134
+ * Ordered as the screening lists its candidates; duplicates (two candidates with one spelling) keep the first.
135
+ */
136
+ export function deriveOfferableBrandNameOptions(input) {
137
+ const offered = [];
138
+ const seen = new Set();
139
+ for (const candidate of input.screening.candidates) {
140
+ const key = normalizeBrandNameForComparison(candidate.name);
141
+ if (seen.has(key))
142
+ continue;
143
+ seen.add(key);
144
+ const outcome = deriveBrandNameTrademarkOutcome(input.screening, candidate);
145
+ const conflicting = outcome === BrandNameTrademarkOutcome.CONFLICT || brandNameCompetitorCollisions(candidate, input.competitorNames).length > 0;
146
+ let qualifier;
147
+ if (conflicting) {
148
+ if (effectiveBrandNameCandidateOrigin(candidate, input.creatorSuppliedNames) === BrandNameCandidateOrigin.COMPANION_PROPOSED)
149
+ continue;
150
+ qualifier = BrandNameChoiceQualifier.KEEP_DESPITE_CONFLICT;
151
+ }
152
+ else {
153
+ qualifier = outcome === BrandNameTrademarkOutcome.CLEAR ? null : BrandNameChoiceQualifier.SCREENING_INCOMPLETE;
154
+ }
155
+ offered.push({ option: formatBrandNameChoiceOption(candidate.name, qualifier), candidateRef: candidate.ref, qualifier });
156
+ }
157
+ return offered;
158
+ }
159
+ /** How the brand's chosen name stands against the screening — what the coherence report and the risk register read. */
160
+ export var BrandNameChoiceStanding;
161
+ (function (BrandNameChoiceStanding) {
162
+ /** The name is a screened candidate whose screening is clear. */
163
+ BrandNameChoiceStanding["CLEARED"] = "CLEARED";
164
+ /** The name is a screened candidate whose screening is incomplete. */
165
+ BrandNameChoiceStanding["SCREENING_INCOMPLETE"] = "SCREENING_INCOMPLETE";
166
+ /** The name is a screened candidate that conflicts, and the creator CHOSE it through the explicit keep-despite-conflict option. */
167
+ BrandNameChoiceStanding["KEPT_DESPITE_CONFLICT"] = "KEPT_DESPITE_CONFLICT";
168
+ /**
169
+ * The name is a screened candidate that conflicts, and nobody chose to keep it despite that: the brand was named
170
+ * before a re-screen found the conflict, or by a route other than the keep-despite-conflict option. Never reported
171
+ * as the creator's deliberate decision, because it was not one.
172
+ */
173
+ BrandNameChoiceStanding["CONFLICT_UNACKNOWLEDGED"] = "CONFLICT_UNACKNOWLEDGED";
174
+ /** The name was never screened. */
175
+ BrandNameChoiceStanding["NOT_SCREENED"] = "NOT_SCREENED";
176
+ })(BrandNameChoiceStanding || (BrandNameChoiceStanding = {}));
177
+ /** Where a brand name stands against the screening, derived by matching it to a candidate. */
178
+ export function deriveBrandNameChoiceStanding(input) {
179
+ const key = normalizeBrandNameForComparison(input.brandName);
180
+ const candidate = input.screening?.candidates.find((entry) => normalizeBrandNameForComparison(entry.name) === key);
181
+ if (!input.screening || !candidate)
182
+ return { standing: BrandNameChoiceStanding.NOT_SCREENED, candidate: undefined };
183
+ const outcome = deriveBrandNameTrademarkOutcome(input.screening, candidate);
184
+ if (outcome === BrandNameTrademarkOutcome.CONFLICT || brandNameCompetitorCollisions(candidate, input.competitorNames).length > 0) {
185
+ const chosen = input.chosenBrandNameAnswer === undefined ? undefined : parseBrandNameChoiceOption(input.chosenBrandNameAnswer);
186
+ const keptDeliberately = chosen !== undefined
187
+ && chosen.qualifier === BrandNameChoiceQualifier.KEEP_DESPITE_CONFLICT
188
+ && normalizeBrandNameForComparison(chosen.name) === key;
189
+ return { standing: keptDeliberately ? BrandNameChoiceStanding.KEPT_DESPITE_CONFLICT : BrandNameChoiceStanding.CONFLICT_UNACKNOWLEDGED, candidate };
190
+ }
191
+ return { standing: outcome === BrandNameTrademarkOutcome.CLEAR ? BrandNameChoiceStanding.CLEARED : BrandNameChoiceStanding.SCREENING_INCOMPLETE, candidate };
192
+ }
193
+ //# sourceMappingURL=brand-name-choice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"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AAE,uBAAuB,CAAC,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;IACpH,MAAM,OAAO,GAAG,+BAA+B,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC5E,IAAI,OAAO,KAAK,yBAAyB,CAAC,QAAQ,IAAI,6BAA6B,CAAC,SAAS,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACjI,MAAM,MAAM,GAAG,KAAK,CAAC,qBAAqB,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,0BAA0B,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC/H,MAAM,gBAAgB,GAAG,MAAM,KAAK,SAAS;eACxC,MAAM,CAAC,SAAS,KAAK,wBAAwB,CAAC,qBAAqB;eACnE,+BAA+B,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC;QAC1D,OAAO,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,uBAAuB,CAAC,qBAAqB,CAAC,CAAC,CAAC,uBAAuB,CAAC,uBAAuB,EAAE,SAAS,EAAE,CAAC;IACrJ,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC,oBAAoB,EAAE,SAAS,EAAE,CAAC;AAC/J,CAAC","sourcesContent":["import { AlternativeKind, type MarketAlternativeConfig } from '../market/market-alternative.schemas';\nimport {\n ApplicationCreatorInputAnswerStanding,\n readCreatorInputAnswersForPlaybook,\n type ApplicationCreatorInputs,\n} from '../../application-creation/application-creator-inputs.application-creation.schemas';\nimport {\n BrandNameCandidateOrigin,\n BrandNameTrademarkOutcome,\n deriveBrandNameTrademarkOutcome,\n normalizeBrandNameForComparison,\n type BrandNameCandidate,\n type BrandNameScreening,\n} from './brand-name-screening.schemas';\n\n/**\n * @wildo_source:part:start brand.name-choice.config facet:layer:specification facet:family:brand facet:audience:app-developer\n *\n * Which screened names the creator is OFFERED, and how a choice records what the creator accepted.\n *\n * The `top_down.brand-identity` interview asks `brand-name` as a CHOICE whose options are computed from\n * the landed `brand-name-screening` by {@link deriveOfferableBrandNameOptions} — never written by a model.\n * An option is the exact name, optionally followed by ONE bracketed qualifier from\n * {@link BrandNameChoiceQualifier}:\n *\n * | candidate | offered as |\n * |---|---|\n * | CLEAR, no competitor collision | `Batisio` |\n * | UNKNOWN (a register could not be read, or coverage is incomplete), no collision | `Batisio [screening-incomplete]` |\n * | CONFLICT or competitor collision, **creator-supplied** | `Keystone [keep-despite-conflict]` |\n * | CONFLICT or competitor collision, **companion-proposed** | not offered |\n *\n * So choosing a conflicting name is an EXPLICIT act — the option the creator picks says \"keep despite\n * conflict\" — and the creator's answer in the dossier is the durable record of it. A companion-proposed\n * name that conflicts is never offered at all: the companion must not put a conflicting name in front of\n * anyone as a suggestion. Which names are the creator's is read from their own `names-to-screen` answer to\n * `top_down.brand-naming`, never from the origin the screening records — a model wrote that field.\n */\nexport enum BrandNameChoiceQualifier {\n /** The screening could not reach every register, class or jurisdiction: the name is NOT cleared. */\n SCREENING_INCOMPLETE = 'screening-incomplete',\n /** The creator keeps their own name although a live mark or a named competitor conflicts with it. */\n KEEP_DESPITE_CONFLICT = 'keep-despite-conflict',\n}\n\n/**\n * Where the creator lists the names THEY want screened: one free-text question of the naming step,\n * answerable with \"none\". The ONLY source of a candidate's creator-supplied origin — see\n * {@link effectiveBrandNameCandidateOrigin}.\n */\nexport const BRAND_NAMING_NAMES_TO_SCREEN_QUESTION: { readonly playbookRef: string; readonly questionRef: string } = {\n playbookRef: 'top_down.brand-naming',\n questionRef: 'names-to-screen',\n};\n\n/** Where the creator records the brand name they CHOSE — the brand identity's computed `brand-name` CHOICE. */\nexport const BRAND_IDENTITY_BRAND_NAME_QUESTION: { readonly playbookRef: string; readonly questionRef: string } = {\n playbookRef: 'top_down.brand-identity',\n questionRef: 'brand-name',\n};\n\n/**\n * What the creator DECIDED about the brand name, from the dossier: the names they asked to have screened, and the\n * option they chose. The one reader of both, so the choice, the coherence report and the risk signal cannot disagree.\n *\n * Only DECIDED answers count. Both questions are declared ask-never-propose, and this is the second guard: an\n * ASSUMED answer is a model's proposal, and letting it in would make a model's names read as the creator's own and a\n * model's choice read as the creator's decision to keep a conflicting name.\n */\nexport function readCreatorBrandNameDecisions(creatorInputs: ApplicationCreatorInputs | undefined): {\n readonly creatorSuppliedNames: readonly string[];\n readonly chosenBrandNameAnswer: string | undefined;\n} {\n const decided = (question: { readonly playbookRef: string; readonly questionRef: string }): string | undefined =>\n readCreatorInputAnswersForPlaybook(creatorInputs, question.playbookRef)\n .find((answer) => answer.questionRef === question.questionRef && answer.standing !== ApplicationCreatorInputAnswerStanding.ASSUMED)?.answer;\n return {\n creatorSuppliedNames: parseNamesToScreenAnswer(decided(BRAND_NAMING_NAMES_TO_SCREEN_QUESTION)),\n chosenBrandNameAnswer: decided(BRAND_IDENTITY_BRAND_NAME_QUESTION),\n };\n}\n\n/**\n * The names a `names-to-screen` answer lists: split on commas, semicolons and line breaks, trimmed, with\n * surrounding quotes removed. \"none\" (in any case, alone) lists nothing, and so does an absent answer.\n */\nexport function parseNamesToScreenAnswer(answer: string | undefined): readonly string[] {\n if (answer === undefined) return [];\n const names = answer\n .split(/[,;\\n]+/u)\n .map((entry) => entry.trim().replace(/^[\"'“”‘’]+|[\"'“”‘’]+$/gu, '').trim())\n .filter((entry) => entry.length > 0);\n return names.length === 1 && names[0]!.toLowerCase().replace(/[.!]+$/u, '') === 'none' ? [] : names;\n}\n\n/**\n * A candidate's origin as the CREATOR'S ANSWER decides it — never as the producing model labelled it.\n *\n * The origin decides what may be offered (a conflicting companion proposal is never offered; a conflicting\n * name of the creator's own is offered as an explicit keep-despite-conflict), so it must not rest on a field\n * a model wrote. A candidate is the creator's exactly when its name is one they listed in `names-to-screen`;\n * everything else is the companion's proposal, whatever the screening records.\n */\nexport function effectiveBrandNameCandidateOrigin(candidate: Pick<BrandNameCandidate, 'name'>, creatorSuppliedNames: readonly string[]): BrandNameCandidateOrigin {\n const key = normalizeBrandNameForComparison(candidate.name);\n return creatorSuppliedNames.some((name) => normalizeBrandNameForComparison(name) === key)\n ? BrandNameCandidateOrigin.CREATOR_SUPPLIED\n : BrandNameCandidateOrigin.COMPANION_PROPOSED;\n}\n\n/** One offerable option, with the candidate it stands for. */\nexport interface OfferableBrandNameOption {\n readonly option: string;\n readonly candidateRef: string;\n readonly qualifier: BrandNameChoiceQualifier | null;\n}\n\n/** The option string for a name and an optional qualifier. */\nexport function formatBrandNameChoiceOption(name: string, qualifier: BrandNameChoiceQualifier | null): string {\n return qualifier === null ? name : `${name} [${qualifier}]`;\n}\n\n/**\n * The name and qualifier an option string carries — the inverse of {@link formatBrandNameChoiceOption}.\n * A trailing bracket that is not a known qualifier is part of the name.\n */\nexport function parseBrandNameChoiceOption(option: string): { readonly name: string; readonly qualifier: BrandNameChoiceQualifier | null } {\n const trimmed = option.trim();\n const match = /^(.*\\S)\\s+\\[([a-z-]+)\\]$/.exec(trimmed);\n const qualifier = match ? Object.values(BrandNameChoiceQualifier).find((candidate) => candidate === match[2]) : undefined;\n return match && qualifier !== undefined ? { name: match[1]!, qualifier } : { name: trimmed, qualifier: null };\n}\n/** @wildo_source:part:end brand.name-choice.config */\n\n/** The alternative kinds that are NAMED PRODUCTS — a status quo, a proxy or an in-house build has no name a brand could collide with. */\nconst NAMED_PRODUCT_ALTERNATIVE_KINDS: readonly AlternativeKind[] = [AlternativeKind.DIRECT_COMPETITOR, AlternativeKind.INCUMBENT_TOOL];\n\n/** The competitor names a brand name must stay distinct from: every named product among the market snapshot's alternatives. */\nexport function marketCompetitorNames(alternatives: readonly Pick<MarketAlternativeConfig, 'name' | 'alternativeKind'>[] | undefined): readonly string[] {\n return (alternatives ?? []).filter((alternative) => NAMED_PRODUCT_ALTERNATIVE_KINDS.includes(alternative.alternativeKind)).map((alternative) => alternative.name);\n}\n\n/** The shortest normalized name whose containment in another counts as a collision. */\nconst MINIMUM_CONTAINED_NAME_LENGTH = 4;\n\n/**\n * The competitors a candidate collides with: its recorded collisions, plus any competitor or alternative\n * the market snapshot names whose normalized name EQUALS the candidate's or contains it (or is contained\n * by it). Deterministic on purpose — a collision the producing model failed to record is still caught.\n */\nexport function brandNameCompetitorCollisions(candidate: Pick<BrandNameCandidate, 'name' | 'competitorCollisions'>, competitorNames: readonly string[]): readonly string[] {\n const own = normalizeBrandNameForComparison(candidate.name);\n const detected = competitorNames.filter((competitor) => {\n const other = normalizeBrandNameForComparison(competitor);\n if (other.length === 0 || own.length === 0) return false;\n if (other === own) return true;\n // Containment only when the shorter name is long enough to be distinctive: \"ai\" inside every name is not a collision.\n return Math.min(other.length, own.length) >= MINIMUM_CONTAINED_NAME_LENGTH && (other.includes(own) || own.includes(other));\n });\n return [...new Set([...candidate.competitorCollisions.map((collision) => collision.competitorName), ...detected])];\n}\n\n/**\n * The options the `brand-name` question offers — see the table on {@link BrandNameChoiceQualifier}.\n * Ordered as the screening lists its candidates; duplicates (two candidates with one spelling) keep the first.\n */\nexport function deriveOfferableBrandNameOptions(input: {\n readonly screening: BrandNameScreening;\n /** Every competitor and alternative name the market snapshot holds. */\n readonly competitorNames: readonly string[];\n /** The names the creator listed in `names-to-screen` ({@link parseNamesToScreenAnswer}) — what decides a candidate's origin. */\n readonly creatorSuppliedNames: readonly string[];\n}): readonly OfferableBrandNameOption[] {\n const offered: OfferableBrandNameOption[] = [];\n const seen = new Set<string>();\n for (const candidate of input.screening.candidates) {\n const key = normalizeBrandNameForComparison(candidate.name);\n if (seen.has(key)) continue;\n seen.add(key);\n const outcome = deriveBrandNameTrademarkOutcome(input.screening, candidate);\n const conflicting = outcome === BrandNameTrademarkOutcome.CONFLICT || brandNameCompetitorCollisions(candidate, input.competitorNames).length > 0;\n let qualifier: BrandNameChoiceQualifier | null;\n if (conflicting) {\n if (effectiveBrandNameCandidateOrigin(candidate, input.creatorSuppliedNames) === BrandNameCandidateOrigin.COMPANION_PROPOSED) continue;\n qualifier = BrandNameChoiceQualifier.KEEP_DESPITE_CONFLICT;\n } else {\n qualifier = outcome === BrandNameTrademarkOutcome.CLEAR ? null : BrandNameChoiceQualifier.SCREENING_INCOMPLETE;\n }\n offered.push({ option: formatBrandNameChoiceOption(candidate.name, qualifier), candidateRef: candidate.ref, qualifier });\n }\n return offered;\n}\n\n/** How the brand's chosen name stands against the screening — what the coherence report and the risk register read. */\nexport enum BrandNameChoiceStanding {\n /** The name is a screened candidate whose screening is clear. */\n CLEARED = 'CLEARED',\n /** The name is a screened candidate whose screening is incomplete. */\n SCREENING_INCOMPLETE = 'SCREENING_INCOMPLETE',\n /** The name is a screened candidate that conflicts, and the creator CHOSE it through the explicit keep-despite-conflict option. */\n KEPT_DESPITE_CONFLICT = 'KEPT_DESPITE_CONFLICT',\n /**\n * The name is a screened candidate that conflicts, and nobody chose to keep it despite that: the brand was named\n * before a re-screen found the conflict, or by a route other than the keep-despite-conflict option. Never reported\n * as the creator's deliberate decision, because it was not one.\n */\n CONFLICT_UNACKNOWLEDGED = 'CONFLICT_UNACKNOWLEDGED',\n /** The name was never screened. */\n NOT_SCREENED = 'NOT_SCREENED',\n}\n\n/** Where a brand name stands against the screening, derived by matching it to a candidate. */\nexport function deriveBrandNameChoiceStanding(input: {\n readonly brandName: string;\n readonly screening: BrandNameScreening | undefined;\n readonly competitorNames: readonly string[];\n /** The creator's recorded `brand-name` answer (`readCreatorBrandNameDecisions`) — what says a conflict was KEPT deliberately. */\n readonly chosenBrandNameAnswer: string | undefined;\n}): { readonly standing: BrandNameChoiceStanding; readonly candidate: BrandNameCandidate | undefined } {\n const key = normalizeBrandNameForComparison(input.brandName);\n const candidate = input.screening?.candidates.find((entry) => normalizeBrandNameForComparison(entry.name) === key);\n if (!input.screening || !candidate) return { standing: BrandNameChoiceStanding.NOT_SCREENED, candidate: undefined };\n const outcome = deriveBrandNameTrademarkOutcome(input.screening, candidate);\n if (outcome === BrandNameTrademarkOutcome.CONFLICT || brandNameCompetitorCollisions(candidate, input.competitorNames).length > 0) {\n const chosen = input.chosenBrandNameAnswer === undefined ? undefined : parseBrandNameChoiceOption(input.chosenBrandNameAnswer);\n const keptDeliberately = chosen !== undefined\n && chosen.qualifier === BrandNameChoiceQualifier.KEEP_DESPITE_CONFLICT\n && normalizeBrandNameForComparison(chosen.name) === key;\n return { standing: keptDeliberately ? BrandNameChoiceStanding.KEPT_DESPITE_CONFLICT : BrandNameChoiceStanding.CONFLICT_UNACKNOWLEDGED, candidate };\n }\n return { standing: outcome === BrandNameTrademarkOutcome.CLEAR ? BrandNameChoiceStanding.CLEARED : BrandNameChoiceStanding.SCREENING_INCOMPLETE, candidate };\n}\n"]}