@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
@@ -0,0 +1,272 @@
1
+ import { z } from 'zod';
2
+ // Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first (#966).
3
+ import '@wildo-ai/zod-decorators';
4
+ import { NonEmptyStringSchema } from '../market/market-references.schemas.js';
5
+ /**
6
+ * @wildo_source:part:start brand.name-screening.config facet:layer:specification facet:family:brand facet:audience:app-developer
7
+ *
8
+ * The **brand-name screening** — the candidate names the companion PROPOSED (and any the creator asked
9
+ * to have screened), each checked against the public trademark registers of the jurisdictions the
10
+ * application targets. Artifact family `brand-name-screening`, produced by the `top_down.brand-naming`
11
+ * step; the `top_down.brand-identity` interview offers the creator a CHOICE computed from it.
12
+ *
13
+ * ## What this is, and what it is not
14
+ *
15
+ * A **minimal trademark screening — not a legal clearance opinion.** It records which registers were
16
+ * searched, for which classes, with which match types, on which day, and what each returned, so a
17
+ * reader can see exactly how far the check went. It never says a name is "available" or "cleared":
18
+ * consult an IP professional before filing or launching under any name recorded here.
19
+ *
20
+ * ## Why it exists
21
+ *
22
+ * On a first real run the brand name was a required pre-run free-text question. The creator expected
23
+ * proposals, a coding assistant improvised four names in chat with no check at all, and one of them was
24
+ * almost certainly a registered software mark. The name is printed on every surface and rendered into
25
+ * the logo, so the cheapest moment to catch a conflict is before anyone chooses.
26
+ *
27
+ * ## The outcome is DERIVED, never authored
28
+ *
29
+ * There is no `outcome` field on a candidate. {@link deriveBrandNameTrademarkOutcome} computes it from
30
+ * the register queries — a conflict on any query is a CONFLICT; a jurisdiction, class or match type no
31
+ * clear query covered, or any query that could not be completed, is UNKNOWN; only full coverage with
32
+ * every query clear is CLEAR. So a model cannot label a half-checked name clear: an unchecked register
33
+ * is simply an uncovered jurisdiction, and the derivation reads it as UNKNOWN.
34
+ */
35
+ /** The payload-format version of a brand-name screening. */
36
+ export var BrandNameScreeningVersion;
37
+ (function (BrandNameScreeningVersion) {
38
+ BrandNameScreeningVersion["V1"] = "v1";
39
+ })(BrandNameScreeningVersion || (BrandNameScreeningVersion = {}));
40
+ /** Who put a candidate on the list. The companion proposes; the creator may ask for their own names to be screened. */
41
+ export var BrandNameCandidateOrigin;
42
+ (function (BrandNameCandidateOrigin) {
43
+ /** Proposed by the companion from the vision and the market snapshot. */
44
+ BrandNameCandidateOrigin["COMPANION_PROPOSED"] = "COMPANION_PROPOSED";
45
+ /** A name the creator supplied, screened exactly like a proposed one. */
46
+ BrandNameCandidateOrigin["CREATOR_SUPPLIED"] = "CREATOR_SUPPLIED";
47
+ })(BrandNameCandidateOrigin || (BrandNameCandidateOrigin = {}));
48
+ /**
49
+ * The public register a query was run against.
50
+ *
51
+ * `NATIONAL_OFFICE` covers any national IP office (DPMA, INPI, UKIPO, USPTO, …); which country it is
52
+ * lives in the query's `jurisdictionsCovered`, so the vocabulary does not hard-code one market.
53
+ */
54
+ export var BrandNameTrademarkRegister;
55
+ (function (BrandNameTrademarkRegister) {
56
+ /** EUIPO's EU trade mark register (eSearch plus) — EU-wide marks. */
57
+ BrandNameTrademarkRegister["EUIPO_EUTM"] = "EUIPO_EUTM";
58
+ /** TMview — the EUIPO-hosted aggregator over the EU office and participating national offices. */
59
+ BrandNameTrademarkRegister["TMVIEW"] = "TMVIEW";
60
+ /** WIPO Global Brand Database — international (Madrid) registrations and many national collections. */
61
+ BrandNameTrademarkRegister["WIPO_GLOBAL_BRAND_DATABASE"] = "WIPO_GLOBAL_BRAND_DATABASE";
62
+ /** A national IP office's own register. */
63
+ BrandNameTrademarkRegister["NATIONAL_OFFICE"] = "NATIONAL_OFFICE";
64
+ })(BrandNameTrademarkRegister || (BrandNameTrademarkRegister = {}));
65
+ /** How close a register hit had to be to count. A screening searches both. */
66
+ export var BrandNameMatchType;
67
+ (function (BrandNameMatchType) {
68
+ /** The same mark, ignoring case and spacing. */
69
+ BrandNameMatchType["IDENTICAL"] = "IDENTICAL";
70
+ /** Plurals, hyphenation, transposed or substituted letters, and common phonetic variants. */
71
+ BrandNameMatchType["NEAR_IDENTICAL"] = "NEAR_IDENTICAL";
72
+ })(BrandNameMatchType || (BrandNameMatchType = {}));
73
+ /** What one register query returned. `UNKNOWN` is a query that could not be completed — never a clear one. */
74
+ export var BrandNameTrademarkQueryOutcome;
75
+ (function (BrandNameTrademarkQueryOutcome) {
76
+ /** Searched, at full coverage, and no live identical or near-identical mark found. */
77
+ BrandNameTrademarkQueryOutcome["CLEAR"] = "CLEAR";
78
+ /** At least one live identical or near-identical mark in a searched class. */
79
+ BrandNameTrademarkQueryOutcome["CONFLICT"] = "CONFLICT";
80
+ /** The register was unreachable, the search could not be run, or its result could not be read. */
81
+ BrandNameTrademarkQueryOutcome["UNKNOWN"] = "UNKNOWN";
82
+ })(BrandNameTrademarkQueryOutcome || (BrandNameTrademarkQueryOutcome = {}));
83
+ /** The status of a conflicting mark. Only LIVE marks are recorded: an expired or withdrawn mark is not a conflict. */
84
+ export var BrandNameConflictingMarkStatus;
85
+ (function (BrandNameConflictingMarkStatus) {
86
+ BrandNameConflictingMarkStatus["REGISTERED"] = "REGISTERED";
87
+ /** Filed and not yet registered, including under opposition. */
88
+ BrandNameConflictingMarkStatus["PENDING"] = "PENDING";
89
+ })(BrandNameConflictingMarkStatus || (BrandNameConflictingMarkStatus = {}));
90
+ /** What a domain check found. Recorded as a signal beside the registers, never a blocker. */
91
+ export var BrandNameDomainStatus;
92
+ (function (BrandNameDomainStatus) {
93
+ BrandNameDomainStatus["REGISTERED"] = "REGISTERED";
94
+ BrandNameDomainStatus["AVAILABLE"] = "AVAILABLE";
95
+ BrandNameDomainStatus["UNKNOWN"] = "UNKNOWN";
96
+ })(BrandNameDomainStatus || (BrandNameDomainStatus = {}));
97
+ /** A candidate's derived trademark standing — see {@link deriveBrandNameTrademarkOutcome}. */
98
+ export var BrandNameTrademarkOutcome;
99
+ (function (BrandNameTrademarkOutcome) {
100
+ BrandNameTrademarkOutcome["CLEAR"] = "CLEAR";
101
+ BrandNameTrademarkOutcome["CONFLICT"] = "CONFLICT";
102
+ BrandNameTrademarkOutcome["UNKNOWN"] = "UNKNOWN";
103
+ })(BrandNameTrademarkOutcome || (BrandNameTrademarkOutcome = {}));
104
+ /** The pseudo-jurisdiction an EU trade mark covers. */
105
+ export const EU_TRADE_MARK_JURISDICTION = 'EU';
106
+ /** The pseudo-jurisdiction an international (Madrid, via WIPO) registration covers. */
107
+ export const INTERNATIONAL_REGISTRATION_JURISDICTION = 'WO';
108
+ /**
109
+ * The EU member states (ISO 3166-1 alpha-2) — a target in any of them makes an EU trade mark relevant,
110
+ * because an EUTM has effect in every member state.
111
+ */
112
+ export const EU_MEMBER_STATE_CODES = [
113
+ 'AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE',
114
+ 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE',
115
+ ];
116
+ /**
117
+ * A jurisdiction code: an ISO 3166-1 alpha-2 country, `EU` (an EU trade mark) or `WO` (an international
118
+ * registration). Stated as a description too, because a JSON schema shown to a generating model drops
119
+ * the refinement.
120
+ */
121
+ export const BrandNameJurisdictionCodeSchema = z
122
+ .string()
123
+ .trim()
124
+ .regex(/^[A-Z]{2}$/)
125
+ .describe('ISO 3166-1 alpha-2 country code (e.g. "DE", "FR"), or "EU" for the EU trade mark, or "WO" for an international registration. Never a name.');
126
+ /** The first Nice class number. */
127
+ export const NICE_CLASS_MIN = 1;
128
+ /** The last Nice class number (the Nice Classification has 45 classes: 1–34 goods, 35–45 services). */
129
+ export const NICE_CLASS_MAX = 45;
130
+ /** The Nice classes every software product lives in: 9 (downloadable software) and 42 (SaaS). */
131
+ export const SOFTWARE_NICE_CLASSES = [9, 42];
132
+ const NiceClassNumberSchema = z.number().int().min(NICE_CLASS_MIN).max(NICE_CLASS_MAX);
133
+ /** An ISO calendar date (`YYYY-MM-DD`): the day a check was made. */
134
+ const IsoDateSchema = z.iso.date();
135
+ /** One jurisdiction the screening covers, and where that target came from. */
136
+ export const BrandNameScreeningJurisdictionSchema = z.object({
137
+ code: BrandNameJurisdictionCodeSchema,
138
+ /** What declared this target — an ICP geography, a vision compliance detail, the application's configured jurisdictions. */
139
+ derivedFrom: NonEmptyStringSchema,
140
+ });
141
+ /** One Nice class searched, and why this product lives in it. */
142
+ export const BrandNameScreeningNiceClassSchema = z.object({
143
+ classNumber: NiceClassNumberSchema,
144
+ rationale: NonEmptyStringSchema,
145
+ });
146
+ /** A live mark a query found, with the record it was read from. */
147
+ export const BrandNameConflictingMarkSchema = z.object({
148
+ /** The mark as registered. */
149
+ mark: NonEmptyStringSchema,
150
+ owner: NonEmptyStringSchema.optional(),
151
+ /** The application or registration number on the register. */
152
+ registrationNumber: NonEmptyStringSchema.optional(),
153
+ /** The Nice classes the mark is registered or filed in. */
154
+ niceClasses: z.array(NiceClassNumberSchema).min(1),
155
+ status: z.enum(BrandNameConflictingMarkStatus).systemEnum('BrandNameConflictingMarkStatus'),
156
+ matchType: z.enum(BrandNameMatchType).systemEnum('BrandNameMatchType'),
157
+ /** The register record that was read. */
158
+ sourceUrl: z.url(),
159
+ });
160
+ /** One search of one register for one candidate. */
161
+ export const BrandNameTrademarkQuerySchema = z.object({
162
+ register: z.enum(BrandNameTrademarkRegister).systemEnum('BrandNameTrademarkRegister'),
163
+ /** The jurisdictions this search covers (`EU` for an EUTM search, `WO` for international registrations, country codes otherwise). */
164
+ jurisdictionsCovered: z.array(BrandNameJurisdictionCodeSchema).min(1),
165
+ niceClassesSearched: z.array(NiceClassNumberSchema).min(1),
166
+ matchTypesSearched: z.array(z.enum(BrandNameMatchType).systemEnum('BrandNameMatchType')).min(1),
167
+ outcome: z.enum(BrandNameTrademarkQueryOutcome).systemEnum('BrandNameTrademarkQueryOutcome'),
168
+ /** Every live mark found. Present exactly when the outcome is CONFLICT. */
169
+ conflictingMarks: z.array(BrandNameConflictingMarkSchema).default([]),
170
+ /** The search or results page that was read — what a reader opens to check this row. */
171
+ sourceUrl: z.url(),
172
+ checkedOn: IsoDateSchema,
173
+ /** Why an UNKNOWN query is unknown, or anything a reader needs to interpret the result. */
174
+ note: NonEmptyStringSchema.optional(),
175
+ });
176
+ /** A domain checked for a candidate — exact match on `.com` and the main ccTLDs of the target countries. */
177
+ export const BrandNameDomainSignalSchema = z.object({
178
+ domain: NonEmptyStringSchema,
179
+ status: z.enum(BrandNameDomainStatus).systemEnum('BrandNameDomainStatus'),
180
+ checkedOn: IsoDateSchema,
181
+ sourceUrl: z.url().optional(),
182
+ });
183
+ /** A company or product already trading under (or close to) the name in the same category. */
184
+ export const BrandNameSameCategoryUseSchema = z.object({
185
+ name: NonEmptyStringSchema,
186
+ sourceUrl: z.url(),
187
+ note: NonEmptyStringSchema.optional(),
188
+ });
189
+ /** A competitor or alternative named in the market snapshot that the candidate is identical or confusingly close to. */
190
+ export const BrandNameCompetitorCollisionSchema = z.object({
191
+ /** The market snapshot's alternative ref, when the collision is with one of its alternatives. */
192
+ alternativeRef: NonEmptyStringSchema.optional(),
193
+ /** The competitor's name as the market snapshot names it. */
194
+ competitorName: NonEmptyStringSchema,
195
+ matchType: z.enum(BrandNameMatchType).systemEnum('BrandNameMatchType'),
196
+ });
197
+ /** One candidate name and everything its screening found. */
198
+ export const BrandNameCandidateSchema = z.object({
199
+ /** Stable ref (`name-<slug>`), stamped by the runtime. */
200
+ ref: z.string().regex(/^name-[a-z0-9]+(?:-[a-z0-9]+)*$/),
201
+ /** The exact, case-sensitive name. */
202
+ name: NonEmptyStringSchema,
203
+ origin: z.enum(BrandNameCandidateOrigin).systemEnum('BrandNameCandidateOrigin'),
204
+ /** Why this name fits: what in the vision and the market's category language and voice it answers. Empty for a creator-supplied name. */
205
+ rationale: NonEmptyStringSchema.optional(),
206
+ trademarkQueries: z.array(BrandNameTrademarkQuerySchema).default([]),
207
+ competitorCollisions: z.array(BrandNameCompetitorCollisionSchema).default([]),
208
+ domainSignals: z.array(BrandNameDomainSignalSchema).default([]),
209
+ sameCategoryUses: z.array(BrandNameSameCategoryUseSchema).default([]),
210
+ });
211
+ /**
212
+ * THE brand-name screening payload — one per application. `jurisdictions` and `niceClasses` are the
213
+ * coverage every candidate is measured against: a candidate whose queries do not reach all of them is
214
+ * UNKNOWN, whatever its queries say.
215
+ */
216
+ export const BrandNameScreeningSchema = z.object({
217
+ version: z.enum(BrandNameScreeningVersion).default(BrandNameScreeningVersion.V1),
218
+ /** The day the screening was run. */
219
+ screenedOn: IsoDateSchema,
220
+ jurisdictions: z.array(BrandNameScreeningJurisdictionSchema).min(1),
221
+ niceClasses: z.array(BrandNameScreeningNiceClassSchema).min(1),
222
+ candidates: z.array(BrandNameCandidateSchema).min(1),
223
+ });
224
+ /** @wildo_source:part:end brand.name-screening.config */
225
+ /**
226
+ * The jurisdictions every candidate must be covered in: the declared ones, plus international
227
+ * registrations (`WO`), which can designate any declared country and are visible only through WIPO or
228
+ * an aggregator. Total over the declaration, so a jurisdiction added tomorrow is uncovered for every
229
+ * existing candidate until it is searched.
230
+ */
231
+ export function requiredBrandNameScreeningJurisdictions(screening) {
232
+ return [...new Set([...screening.jurisdictions.map((jurisdiction) => jurisdiction.code), INTERNATIONAL_REGISTRATION_JURISDICTION])];
233
+ }
234
+ /** Does this query cover a jurisdiction at the depth a CLEAR verdict needs — every declared class, both match types? */
235
+ function queryCoversAtFullDepth(query, classNumbers) {
236
+ return classNumbers.every((classNumber) => query.niceClassesSearched.includes(classNumber))
237
+ && Object.values(BrandNameMatchType).every((matchType) => query.matchTypesSearched.includes(matchType));
238
+ }
239
+ /**
240
+ * The jurisdictions a candidate has NOT been cleared in — those with no CLEAR query that searched every
241
+ * declared class with both match types. Empty means fully covered.
242
+ */
243
+ export function uncoveredBrandNameJurisdictions(screening, candidate) {
244
+ const classNumbers = screening.niceClasses.map((niceClass) => niceClass.classNumber);
245
+ const covered = new Set(candidate.trademarkQueries
246
+ .filter((query) => query.outcome === BrandNameTrademarkQueryOutcome.CLEAR && queryCoversAtFullDepth(query, classNumbers))
247
+ .flatMap((query) => query.jurisdictionsCovered));
248
+ return requiredBrandNameScreeningJurisdictions(screening).filter((code) => !covered.has(code));
249
+ }
250
+ /**
251
+ * A candidate's trademark standing, DERIVED from its queries — never stored, so never mislabelled.
252
+ *
253
+ * - any query CONFLICT → `CONFLICT` (a live mark exists; that outranks anything unknown);
254
+ * - otherwise any required jurisdiction without a full-depth CLEAR query, or any UNKNOWN query → `UNKNOWN`;
255
+ * - otherwise → `CLEAR`.
256
+ *
257
+ * An UNKNOWN query is deliberately not ignored even when another register covered the same ground: a
258
+ * register that could not be read is a fact the reader should see, and "probably fine" is what UNKNOWN
259
+ * exists to stop anyone saying.
260
+ */
261
+ export function deriveBrandNameTrademarkOutcome(screening, candidate) {
262
+ if (candidate.trademarkQueries.some((query) => query.outcome === BrandNameTrademarkQueryOutcome.CONFLICT))
263
+ return BrandNameTrademarkOutcome.CONFLICT;
264
+ if (candidate.trademarkQueries.some((query) => query.outcome === BrandNameTrademarkQueryOutcome.UNKNOWN))
265
+ return BrandNameTrademarkOutcome.UNKNOWN;
266
+ return uncoveredBrandNameJurisdictions(screening, candidate).length === 0 ? BrandNameTrademarkOutcome.CLEAR : BrandNameTrademarkOutcome.UNKNOWN;
267
+ }
268
+ /** Lower-cased, with every non-letter-or-digit removed — how two spellings of one name are compared. */
269
+ export function normalizeBrandNameForComparison(name) {
270
+ return name.normalize('NFKD').toLowerCase().replace(/[^\p{L}\p{N}]/gu, '');
271
+ }
272
+ //# sourceMappingURL=brand-name-screening.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brand-name-screening.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-name-screening.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,mHAAmH;AACnH,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,4DAA4D;AAC5D,MAAM,CAAN,IAAY,yBAEX;AAFD,WAAY,yBAAyB;IACnC,sCAAS,CAAA;AACX,CAAC,EAFW,yBAAyB,KAAzB,yBAAyB,QAEpC;AAED,uHAAuH;AACvH,MAAM,CAAN,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,yEAAyE;IACzE,qEAAyC,CAAA;IACzC,yEAAyE;IACzE,iEAAqC,CAAA;AACvC,CAAC,EALW,wBAAwB,KAAxB,wBAAwB,QAKnC;AAED;;;;;GAKG;AACH,MAAM,CAAN,IAAY,0BASX;AATD,WAAY,0BAA0B;IACpC,qEAAqE;IACrE,uDAAyB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C,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,8BAA8B,CAAC,QAAQ,CAAC;QAAE,OAAO,yBAAyB,CAAC,QAAQ,CAAC;IACrJ,IAAI,SAAS,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,8BAA8B,CAAC,OAAO,CAAC;QAAE,OAAO,yBAAyB,CAAC,OAAO,CAAC;IACnJ,OAAO,+BAA+B,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,OAAO,CAAC;AAClJ,CAAC;AAED,wGAAwG;AACxG,MAAM,UAAU,+BAA+B,CAAC,IAAY;IAC1D,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAC7E,CAAC","sourcesContent":["import { z } from 'zod';\n// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first (#966).\nimport '@wildo-ai/zod-decorators';\n\nimport { NonEmptyStringSchema } from '../market/market-references.schemas';\n\n/**\n * @wildo_source:part:start brand.name-screening.config facet:layer:specification facet:family:brand facet:audience:app-developer\n *\n * The **brand-name screening** — the candidate names the companion PROPOSED (and any the creator asked\n * to have screened), each checked against the public trademark registers of the jurisdictions the\n * application targets. Artifact family `brand-name-screening`, produced by the `top_down.brand-naming`\n * step; the `top_down.brand-identity` interview offers the creator a CHOICE computed from it.\n *\n * ## What this is, and what it is not\n *\n * A **minimal trademark screening — not a legal clearance opinion.** It records which registers were\n * searched, for which classes, with which match types, on which day, and what each returned, so a\n * reader can see exactly how far the check went. It never says a name is \"available\" or \"cleared\":\n * consult an IP professional before filing or launching under any name recorded here.\n *\n * ## Why it exists\n *\n * On a first real run the brand name was a required pre-run free-text question. The creator expected\n * proposals, a coding assistant improvised four names in chat with no check at all, and one of them was\n * almost certainly a registered software mark. The name is printed on every surface and rendered into\n * the logo, so the cheapest moment to catch a conflict is before anyone chooses.\n *\n * ## The outcome is DERIVED, never authored\n *\n * There is no `outcome` field on a candidate. {@link deriveBrandNameTrademarkOutcome} computes it from\n * the register queries — a conflict on any query is a CONFLICT; a jurisdiction, class or match type no\n * clear query covered, or any query that could not be completed, is UNKNOWN; only full coverage with\n * every query clear is CLEAR. So a model cannot label a half-checked name clear: an unchecked register\n * is simply an uncovered jurisdiction, and the derivation reads it as UNKNOWN.\n */\n\n/** The payload-format version of a brand-name screening. */\nexport enum BrandNameScreeningVersion {\n V1 = 'v1',\n}\n\n/** Who put a candidate on the list. The companion proposes; the creator may ask for their own names to be screened. */\nexport enum BrandNameCandidateOrigin {\n /** Proposed by the companion from the vision and the market snapshot. */\n COMPANION_PROPOSED = 'COMPANION_PROPOSED',\n /** A name the creator supplied, screened exactly like a proposed one. */\n CREATOR_SUPPLIED = 'CREATOR_SUPPLIED',\n}\n\n/**\n * The public register a query was run against.\n *\n * `NATIONAL_OFFICE` covers any national IP office (DPMA, INPI, UKIPO, USPTO, …); which country it is\n * lives in the query's `jurisdictionsCovered`, so the vocabulary does not hard-code one market.\n */\nexport enum BrandNameTrademarkRegister {\n /** EUIPO's EU trade mark register (eSearch plus) — EU-wide marks. */\n EUIPO_EUTM = 'EUIPO_EUTM',\n /** TMview — the EUIPO-hosted aggregator over the EU office and participating national offices. */\n TMVIEW = 'TMVIEW',\n /** WIPO Global Brand Database — international (Madrid) registrations and many national collections. */\n WIPO_GLOBAL_BRAND_DATABASE = 'WIPO_GLOBAL_BRAND_DATABASE',\n /** A national IP office's own register. */\n NATIONAL_OFFICE = 'NATIONAL_OFFICE',\n}\n\n/** How close a register hit had to be to count. A screening searches both. */\nexport enum BrandNameMatchType {\n /** The same mark, ignoring case and spacing. */\n IDENTICAL = 'IDENTICAL',\n /** Plurals, hyphenation, transposed or substituted letters, and common phonetic variants. */\n NEAR_IDENTICAL = 'NEAR_IDENTICAL',\n}\n\n/** What one register query returned. `UNKNOWN` is a query that could not be completed — never a clear one. */\nexport enum BrandNameTrademarkQueryOutcome {\n /** Searched, at full coverage, and no live identical or near-identical mark found. */\n CLEAR = 'CLEAR',\n /** At least one live identical or near-identical mark in a searched class. */\n CONFLICT = 'CONFLICT',\n /** The register was unreachable, the search could not be run, or its result could not be read. */\n UNKNOWN = 'UNKNOWN',\n}\n\n/** The status of a conflicting mark. Only LIVE marks are recorded: an expired or withdrawn mark is not a conflict. */\nexport enum BrandNameConflictingMarkStatus {\n REGISTERED = 'REGISTERED',\n /** Filed and not yet registered, including under opposition. */\n PENDING = 'PENDING',\n}\n\n/** What a domain check found. Recorded as a signal beside the registers, never a blocker. */\nexport enum BrandNameDomainStatus {\n REGISTERED = 'REGISTERED',\n AVAILABLE = 'AVAILABLE',\n UNKNOWN = 'UNKNOWN',\n}\n\n/** A candidate's derived trademark standing — see {@link deriveBrandNameTrademarkOutcome}. */\nexport enum BrandNameTrademarkOutcome {\n CLEAR = 'CLEAR',\n CONFLICT = 'CONFLICT',\n UNKNOWN = 'UNKNOWN',\n}\n\n/** The pseudo-jurisdiction an EU trade mark covers. */\nexport const EU_TRADE_MARK_JURISDICTION = 'EU';\n/** The pseudo-jurisdiction an international (Madrid, via WIPO) registration covers. */\nexport const INTERNATIONAL_REGISTRATION_JURISDICTION = 'WO';\n\n/**\n * The EU member states (ISO 3166-1 alpha-2) — a target in any of them makes an EU trade mark relevant,\n * because an EUTM has effect in every member state.\n */\nexport const EU_MEMBER_STATE_CODES: readonly string[] = [\n 'AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE',\n 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE',\n];\n\n/**\n * A jurisdiction code: an ISO 3166-1 alpha-2 country, `EU` (an EU trade mark) or `WO` (an international\n * registration). Stated as a description too, because a JSON schema shown to a generating model drops\n * the refinement.\n */\nexport const BrandNameJurisdictionCodeSchema = z\n .string()\n .trim()\n .regex(/^[A-Z]{2}$/)\n .describe('ISO 3166-1 alpha-2 country code (e.g. \"DE\", \"FR\"), or \"EU\" for the EU trade mark, or \"WO\" for an international registration. Never a name.');\n\n/** The first Nice class number. */\nexport const NICE_CLASS_MIN = 1;\n/** The last Nice class number (the Nice Classification has 45 classes: 1–34 goods, 35–45 services). */\nexport const NICE_CLASS_MAX = 45;\n\n/** The Nice classes every software product lives in: 9 (downloadable software) and 42 (SaaS). */\nexport const SOFTWARE_NICE_CLASSES: readonly number[] = [9, 42];\n\nconst NiceClassNumberSchema = z.number().int().min(NICE_CLASS_MIN).max(NICE_CLASS_MAX);\n/** An ISO calendar date (`YYYY-MM-DD`): the day a check was made. */\nconst IsoDateSchema = z.iso.date();\n\n/** One jurisdiction the screening covers, and where that target came from. */\nexport const BrandNameScreeningJurisdictionSchema = z.object({\n code: BrandNameJurisdictionCodeSchema,\n /** What declared this target — an ICP geography, a vision compliance detail, the application's configured jurisdictions. */\n derivedFrom: NonEmptyStringSchema,\n});\nexport type BrandNameScreeningJurisdiction = z.infer<typeof BrandNameScreeningJurisdictionSchema>;\n\n/** One Nice class searched, and why this product lives in it. */\nexport const BrandNameScreeningNiceClassSchema = z.object({\n classNumber: NiceClassNumberSchema,\n rationale: NonEmptyStringSchema,\n});\nexport type BrandNameScreeningNiceClass = z.infer<typeof BrandNameScreeningNiceClassSchema>;\n\n/** A live mark a query found, with the record it was read from. */\nexport const BrandNameConflictingMarkSchema = z.object({\n /** The mark as registered. */\n mark: NonEmptyStringSchema,\n owner: NonEmptyStringSchema.optional(),\n /** The application or registration number on the register. */\n registrationNumber: NonEmptyStringSchema.optional(),\n /** The Nice classes the mark is registered or filed in. */\n niceClasses: z.array(NiceClassNumberSchema).min(1),\n status: z.enum(BrandNameConflictingMarkStatus).systemEnum('BrandNameConflictingMarkStatus'),\n matchType: z.enum(BrandNameMatchType).systemEnum('BrandNameMatchType'),\n /** The register record that was read. */\n sourceUrl: z.url(),\n});\nexport type BrandNameConflictingMark = z.infer<typeof BrandNameConflictingMarkSchema>;\n\n/** One search of one register for one candidate. */\nexport const BrandNameTrademarkQuerySchema = z.object({\n register: z.enum(BrandNameTrademarkRegister).systemEnum('BrandNameTrademarkRegister'),\n /** The jurisdictions this search covers (`EU` for an EUTM search, `WO` for international registrations, country codes otherwise). */\n jurisdictionsCovered: z.array(BrandNameJurisdictionCodeSchema).min(1),\n niceClassesSearched: z.array(NiceClassNumberSchema).min(1),\n matchTypesSearched: z.array(z.enum(BrandNameMatchType).systemEnum('BrandNameMatchType')).min(1),\n outcome: z.enum(BrandNameTrademarkQueryOutcome).systemEnum('BrandNameTrademarkQueryOutcome'),\n /** Every live mark found. Present exactly when the outcome is CONFLICT. */\n conflictingMarks: z.array(BrandNameConflictingMarkSchema).default([]),\n /** The search or results page that was read — what a reader opens to check this row. */\n sourceUrl: z.url(),\n checkedOn: IsoDateSchema,\n /** Why an UNKNOWN query is unknown, or anything a reader needs to interpret the result. */\n note: NonEmptyStringSchema.optional(),\n});\nexport type BrandNameTrademarkQuery = z.infer<typeof BrandNameTrademarkQuerySchema>;\n\n/** A domain checked for a candidate — exact match on `.com` and the main ccTLDs of the target countries. */\nexport const BrandNameDomainSignalSchema = z.object({\n domain: NonEmptyStringSchema,\n status: z.enum(BrandNameDomainStatus).systemEnum('BrandNameDomainStatus'),\n checkedOn: IsoDateSchema,\n sourceUrl: z.url().optional(),\n});\nexport type BrandNameDomainSignal = z.infer<typeof BrandNameDomainSignalSchema>;\n\n/** A company or product already trading under (or close to) the name in the same category. */\nexport const BrandNameSameCategoryUseSchema = z.object({\n name: NonEmptyStringSchema,\n sourceUrl: z.url(),\n note: NonEmptyStringSchema.optional(),\n});\nexport type BrandNameSameCategoryUse = z.infer<typeof BrandNameSameCategoryUseSchema>;\n\n/** A competitor or alternative named in the market snapshot that the candidate is identical or confusingly close to. */\nexport const BrandNameCompetitorCollisionSchema = z.object({\n /** The market snapshot's alternative ref, when the collision is with one of its alternatives. */\n alternativeRef: NonEmptyStringSchema.optional(),\n /** The competitor's name as the market snapshot names it. */\n competitorName: NonEmptyStringSchema,\n matchType: z.enum(BrandNameMatchType).systemEnum('BrandNameMatchType'),\n});\nexport type BrandNameCompetitorCollision = z.infer<typeof BrandNameCompetitorCollisionSchema>;\n\n/** One candidate name and everything its screening found. */\nexport const BrandNameCandidateSchema = z.object({\n /** Stable ref (`name-<slug>`), stamped by the runtime. */\n ref: z.string().regex(/^name-[a-z0-9]+(?:-[a-z0-9]+)*$/),\n /** The exact, case-sensitive name. */\n name: NonEmptyStringSchema,\n origin: z.enum(BrandNameCandidateOrigin).systemEnum('BrandNameCandidateOrigin'),\n /** Why this name fits: what in the vision and the market's category language and voice it answers. Empty for a creator-supplied name. */\n rationale: NonEmptyStringSchema.optional(),\n trademarkQueries: z.array(BrandNameTrademarkQuerySchema).default([]),\n competitorCollisions: z.array(BrandNameCompetitorCollisionSchema).default([]),\n domainSignals: z.array(BrandNameDomainSignalSchema).default([]),\n sameCategoryUses: z.array(BrandNameSameCategoryUseSchema).default([]),\n});\nexport type BrandNameCandidate = z.infer<typeof BrandNameCandidateSchema>;\n\n/**\n * THE brand-name screening payload — one per application. `jurisdictions` and `niceClasses` are the\n * coverage every candidate is measured against: a candidate whose queries do not reach all of them is\n * UNKNOWN, whatever its queries say.\n */\nexport const BrandNameScreeningSchema = z.object({\n version: z.enum(BrandNameScreeningVersion).default(BrandNameScreeningVersion.V1),\n /** The day the screening was run. */\n screenedOn: IsoDateSchema,\n jurisdictions: z.array(BrandNameScreeningJurisdictionSchema).min(1),\n niceClasses: z.array(BrandNameScreeningNiceClassSchema).min(1),\n candidates: z.array(BrandNameCandidateSchema).min(1),\n});\nexport type BrandNameScreening = z.infer<typeof BrandNameScreeningSchema>;\n/** @wildo_source:part:end brand.name-screening.config */\n\n/**\n * The jurisdictions every candidate must be covered in: the declared ones, plus international\n * registrations (`WO`), which can designate any declared country and are visible only through WIPO or\n * an aggregator. Total over the declaration, so a jurisdiction added tomorrow is uncovered for every\n * existing candidate until it is searched.\n */\nexport function requiredBrandNameScreeningJurisdictions(screening: Pick<BrandNameScreening, 'jurisdictions'>): readonly string[] {\n return [...new Set([...screening.jurisdictions.map((jurisdiction) => jurisdiction.code), INTERNATIONAL_REGISTRATION_JURISDICTION])];\n}\n\n/** Does this query cover a jurisdiction at the depth a CLEAR verdict needs — every declared class, both match types? */\nfunction queryCoversAtFullDepth(query: BrandNameTrademarkQuery, classNumbers: readonly number[]): boolean {\n return classNumbers.every((classNumber) => query.niceClassesSearched.includes(classNumber))\n && Object.values(BrandNameMatchType).every((matchType) => query.matchTypesSearched.includes(matchType));\n}\n\n/**\n * The jurisdictions a candidate has NOT been cleared in — those with no CLEAR query that searched every\n * declared class with both match types. Empty means fully covered.\n */\nexport function uncoveredBrandNameJurisdictions(screening: Pick<BrandNameScreening, 'jurisdictions' | 'niceClasses'>, candidate: Pick<BrandNameCandidate, 'trademarkQueries'>): readonly string[] {\n const classNumbers = screening.niceClasses.map((niceClass) => niceClass.classNumber);\n const covered = new Set(candidate.trademarkQueries\n .filter((query) => query.outcome === BrandNameTrademarkQueryOutcome.CLEAR && queryCoversAtFullDepth(query, classNumbers))\n .flatMap((query) => query.jurisdictionsCovered));\n return requiredBrandNameScreeningJurisdictions(screening).filter((code) => !covered.has(code));\n}\n\n/**\n * A candidate's trademark standing, DERIVED from its queries — never stored, so never mislabelled.\n *\n * - any query CONFLICT → `CONFLICT` (a live mark exists; that outranks anything unknown);\n * - otherwise any required jurisdiction without a full-depth CLEAR query, or any UNKNOWN query → `UNKNOWN`;\n * - otherwise → `CLEAR`.\n *\n * An UNKNOWN query is deliberately not ignored even when another register covered the same ground: a\n * register that could not be read is a fact the reader should see, and \"probably fine\" is what UNKNOWN\n * exists to stop anyone saying.\n */\nexport function deriveBrandNameTrademarkOutcome(screening: Pick<BrandNameScreening, 'jurisdictions' | 'niceClasses'>, candidate: Pick<BrandNameCandidate, 'trademarkQueries'>): BrandNameTrademarkOutcome {\n if (candidate.trademarkQueries.some((query) => query.outcome === BrandNameTrademarkQueryOutcome.CONFLICT)) return BrandNameTrademarkOutcome.CONFLICT;\n if (candidate.trademarkQueries.some((query) => query.outcome === BrandNameTrademarkQueryOutcome.UNKNOWN)) return BrandNameTrademarkOutcome.UNKNOWN;\n return uncoveredBrandNameJurisdictions(screening, candidate).length === 0 ? BrandNameTrademarkOutcome.CLEAR : BrandNameTrademarkOutcome.UNKNOWN;\n}\n\n/** Lower-cased, with every non-letter-or-digit removed — how two spellings of one name are compared. */\nexport function normalizeBrandNameForComparison(name: string): string {\n return name.normalize('NFKD').toLowerCase().replace(/[^\\p{L}\\p{N}]/gu, '');\n}\n"]}
@@ -122,4 +122,27 @@ export declare const BrandSnapshotSchema: z.ZodObject<{
122
122
  }, z.core.$strip>;
123
123
  export type BrandSnapshot = z.infer<typeof BrandSnapshotSchema>;
124
124
  /** @wildo_source:part:end brand.snapshot.config */
125
+ /**
126
+ * The module that holds a brand's ACCEPTED assets, beside the brand brief (`specifications/src/brand/`) — one definition
127
+ * for every party that writes or reads it (#2237): the brief's landing composes it, the logo step's landed check reads
128
+ * it, and the brand accept step rewrites it.
129
+ *
130
+ * The brief does not carry `resolvedAssets` as data. It composes this module, so the assets promoted after the brief
131
+ * landed reach every reader of the brief, and a later re-landing of the brief keeps them. Measured on
132
+ * app-creation-test-004 (2026-10-01): the landing wrote `resolvedAssets: []` as a literal, the logo step promoted a full
133
+ * set into this module, and nothing joined the two, so every reader of the brief saw a brand with no logo.
134
+ */
135
+ export declare const BRAND_RESOLVED_ASSETS_MODULE_FILE = "resolved-assets.generated.ts";
136
+ /** The module's one export, the accepted `BrandAssetConfig[]`. */
137
+ export declare const BRAND_RESOLVED_ASSETS_EXPORT = "generatedResolvedBrandAssets";
138
+ /** The import specifier the brief uses for the module, relative to the brief's own file. */
139
+ export declare const BRAND_RESOLVED_ASSETS_MODULE_SPECIFIER = "./resolved-assets.generated";
140
+ /**
141
+ * The module's header: the imports a PROMOTED asset list needs, and what the file is. The accept step keeps an existing
142
+ * header and rewrites only the export, so a module created empty must already import what a promotion will use, or the
143
+ * first promotion writes a file that does not compile.
144
+ */
145
+ export declare const BRAND_RESOLVED_ASSETS_MODULE_HEADER: string;
146
+ /** The module before any logo is accepted: the header, and an empty list. */
147
+ export declare function renderEmptyBrandResolvedAssetsModule(): string;
125
148
  //# sourceMappingURL=brand-snapshot.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"brand-snapshot.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-snapshot.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;GAOG;AACH,oBAAY,oBAAoB;IAC9B,EAAE,OAAO;CACV;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqB9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,mDAAmD"}
1
+ {"version":3,"file":"brand-snapshot.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-snapshot.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;GAOG;AACH,oBAAY,oBAAoB;IAC9B,EAAE,OAAO;CACV;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqB9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,mDAAmD;AAEnD;;;;;;;;;GASG;AACH,eAAO,MAAM,iCAAiC,iCAAiC,CAAC;AAChF,kEAAkE;AAClE,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AAC3E,4FAA4F;AAC5F,eAAO,MAAM,sCAAsC,gCAAgC,CAAC;AAEpF;;;;GAIG;AACH,eAAO,MAAM,mCAAmC,EAAE,MAQvC,CAAC;AAEZ,6EAA6E;AAC7E,wBAAgB,oCAAoC,IAAI,MAAM,CAE7D"}
@@ -84,4 +84,36 @@ export const BrandSnapshotSchema = z.object({
84
84
  resolvedAssets: z.array(BrandAssetConfigSchema).default([]),
85
85
  });
86
86
  /** @wildo_source:part:end brand.snapshot.config */
87
+ /**
88
+ * The module that holds a brand's ACCEPTED assets, beside the brand brief (`specifications/src/brand/`) — one definition
89
+ * for every party that writes or reads it (#2237): the brief's landing composes it, the logo step's landed check reads
90
+ * it, and the brand accept step rewrites it.
91
+ *
92
+ * The brief does not carry `resolvedAssets` as data. It composes this module, so the assets promoted after the brief
93
+ * landed reach every reader of the brief, and a later re-landing of the brief keeps them. Measured on
94
+ * app-creation-test-004 (2026-10-01): the landing wrote `resolvedAssets: []` as a literal, the logo step promoted a full
95
+ * set into this module, and nothing joined the two, so every reader of the brief saw a brand with no logo.
96
+ */
97
+ export const BRAND_RESOLVED_ASSETS_MODULE_FILE = 'resolved-assets.generated.ts';
98
+ /** The module's one export, the accepted `BrandAssetConfig[]`. */
99
+ export const BRAND_RESOLVED_ASSETS_EXPORT = 'generatedResolvedBrandAssets';
100
+ /** The import specifier the brief uses for the module, relative to the brief's own file. */
101
+ export const BRAND_RESOLVED_ASSETS_MODULE_SPECIFIER = './resolved-assets.generated';
102
+ /**
103
+ * The module's header: the imports a PROMOTED asset list needs, and what the file is. The accept step keeps an existing
104
+ * header and rewrites only the export, so a module created empty must already import what a promotion will use, or the
105
+ * first promotion writes a file that does not compile.
106
+ */
107
+ export const BRAND_RESOLVED_ASSETS_MODULE_HEADER = `import { BrandAssetComposition, BrandAssetFormat, BrandAssetPurpose, BrandAssetTheme } from '@wildo-ai/saas-specifications';\n`
108
+ + `import type { BrandAssetConfig } from '@wildo-ai/saas-specifications';\n\n`
109
+ + `/**\n`
110
+ + ` * GENERATED + COMMITTED brand assets — the ACCEPTED logo set. This is the\n`
111
+ + ` * source-of-truth \`resolvedAssets\` consumed by the application-owned brand snapshot.\n`
112
+ + ` * The image files live beside this file in \`./assets/\`; each entry's\n`
113
+ + ` * \`storageRef\` is a path relative to THIS spec's brand folder.\n`
114
+ + ` */\n`;
115
+ /** The module before any logo is accepted: the header, and an empty list. */
116
+ export function renderEmptyBrandResolvedAssetsModule() {
117
+ return `${BRAND_RESOLVED_ASSETS_MODULE_HEADER}export const ${BRAND_RESOLVED_ASSETS_EXPORT}: BrandAssetConfig[] = [];\n`;
118
+ }
87
119
  //# sourceMappingURL=brand-snapshot.schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"brand-snapshot.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-snapshot.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,iCAAS,CAAA;AACX,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;IACtE,oEAAoE;IACpE,IAAI,EAAE,qBAAqB;IAC3B,4EAA4E;IAC5E,aAAa,EAAE,8BAA8B,CAAC,QAAQ,EAAE;IACxD,kFAAkF;IAClF,UAAU,EAAE,2BAA2B,CAAC,QAAQ,EAAE;IAClD;;;;OAIG;IACH,QAAQ,EAAE,yBAAyB,CAAC,QAAQ,EAAE;IAC9C;;;;;OAKG;IACH,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC5D,CAAC,CAAC;AAEH,mDAAmD","sourcesContent":["import { z } from 'zod';\n\nimport { BrandAssetConfigSchema } from './brand-asset.schemas';\nimport { BrandLogoDirectionConfigSchema } from './brand-logo-direction.schemas';\nimport { BrandNameConfigSchema } from './brand-name.schemas';\nimport { BrandVisualToneConfigSchema } from './brand-visual-tone.schemas';\nimport { BrandAudienceConfigSchema } from './brand-audience.schemas';\n\n/**\n * @wildo_source:part:start brand.snapshot.config facet:layer:specification facet:family:brand\n *\n * Versioning for the brand-snapshot payload format itself. `V1` — initial\n * shape (name + logo direction + visual tone + resolved assets). The\n * shape grows additively across versions; the `version` field is the\n * explicit marker for consumers that need to branch on era.\n */\nexport enum BrandSnapshotVersion {\n V1 = 'v1',\n}\n\n/**\n * THE brand-snapshot payload — a **single aggregate per product**\n * (vision/market-snapshot style, NOT a keyed entries map): there is\n * exactly one brand identity per application. It is the visual-identity\n * definition artifact the app-creation top-down catalog reads/writes,\n * and — via `resolvedAssets` — the **single source of truth for every\n * logo/favicon/brand-image consumer in the app** that is actually wired:\n * the app shell, the website, the docs site, the website OG image, and the\n * backend runtime configuration that transactional email resolves its logo\n * from.\n *\n * PDF templates and schema.org are NOT among them. The pdf-templates tree\n * contains no brand or logo reference at all, and the website's structured-data\n * payloads are authored by each section's `getStructuredData()` hook rather than\n * resolved from here. Both would arrive as new propagation destinations; until\n * they do, a PDF or a JSON-LD payload that needs the mark carries it by hand.\n *\n * **Artifact-family id: `brand-brief`.** This schema is the shape of the\n * journey artifact selected by `MetaWorkflow_ArtifactSelector.family ===\n * 'brand-brief'`. As with `vision-brief`, the `family` vocabulary is an\n * OPEN string (owned by the assertion surface, not a frozen enum), so it\n * is intentionally NOT re-declared as a constant here; this note is the\n * single place that ties the `BrandSnapshot` SHAPE to the `brand-brief`\n * family NAME so the brand-identity playbook and the companion logo step\n * select it consistently.\n *\n * Shape decision (framework mindset — each member carries its own\n * semantic weight):\n * - **`name`** — REQUIRED. A brand without a name has nothing for a mark\n * to render.\n * - **`logoDirection`** / **`visualTone`** — OPTIONAL singletons, elicited\n * progressively (the brand-identity playbook fills them after the name).\n * Absence is a first-class \"not yet directed\" state surfaced as a WARN\n * by `validateBrandSnapshot`, never a parse failure.\n * - **`resolvedAssets`** — the collection the COMPANION logo step\n * populates (empty until generation runs), each entry described by the\n * three orthogonal axes (composition × theme × purpose) rather than a\n * flat role. This is the SSOT half: authored direction in the\n * singletons, produced assets here.\n *\n * The direction singletons are the INPUT to logo generation (enriched by\n * vision idea/mission + market `tonesOfVoice` in the companion\n * introspection subprocess); `resolvedAssets` is its OUTPUT. Authored in\n * English (like the vision + market families).\n */\nexport const BrandSnapshotSchema = z.object({\n version: z.enum(BrandSnapshotVersion).default(BrandSnapshotVersion.V1),\n /** The brand name — the anchor lexical identity. Always present. */\n name: BrandNameConfigSchema,\n /** The logo creative brief — elicited progressively; WARNed when absent. */\n logoDirection: BrandLogoDirectionConfigSchema.optional(),\n /** The visual aesthetic register — elicited progressively; WARNed when absent. */\n visualTone: BrandVisualToneConfigSchema.optional(),\n /**\n * WHO the brand is for: the market ICPs (`targetIcpRefs`) its name and tone were chosen to speak to\n * (#1424). Optional, like the two directions — a brand elicited before its market exists has none —\n * and cross-checked against the market by the coherence report, which reports a ref naming no ICP.\n */\n audience: BrandAudienceConfigSchema.optional(),\n /**\n * The generated + derived assets, each described by the three\n * orthogonal axes (composition × theme × purpose). Populated by the\n * companion logo-generation step; empty until it runs. THE source of\n * truth every brand-image consumer resolves against.\n */\n resolvedAssets: z.array(BrandAssetConfigSchema).default([]),\n});\nexport type BrandSnapshot = z.infer<typeof BrandSnapshotSchema>;\n/** @wildo_source:part:end brand.snapshot.config */\n"]}
1
+ {"version":3,"file":"brand-snapshot.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/brand/brand-snapshot.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,iCAAS,CAAA;AACX,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;IACtE,oEAAoE;IACpE,IAAI,EAAE,qBAAqB;IAC3B,4EAA4E;IAC5E,aAAa,EAAE,8BAA8B,CAAC,QAAQ,EAAE;IACxD,kFAAkF;IAClF,UAAU,EAAE,2BAA2B,CAAC,QAAQ,EAAE;IAClD;;;;OAIG;IACH,QAAQ,EAAE,yBAAyB,CAAC,QAAQ,EAAE;IAC9C;;;;;OAKG;IACH,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC5D,CAAC,CAAC;AAEH,mDAAmD;AAEnD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,8BAA8B,CAAC;AAChF,kEAAkE;AAClE,MAAM,CAAC,MAAM,4BAA4B,GAAG,8BAA8B,CAAC;AAC3E,4FAA4F;AAC5F,MAAM,CAAC,MAAM,sCAAsC,GAAG,6BAA6B,CAAC;AAEpF;;;;GAIG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAC9C,gIAAgI;MAC9H,4EAA4E;MAC5E,OAAO;MACP,8EAA8E;MAC9E,2FAA2F;MAC3F,2EAA2E;MAC3E,qEAAqE;MACrE,OAAO,CAAC;AAEZ,6EAA6E;AAC7E,MAAM,UAAU,oCAAoC;IAClD,OAAO,GAAG,mCAAmC,gBAAgB,4BAA4B,8BAA8B,CAAC;AAC1H,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { BrandAssetConfigSchema } from './brand-asset.schemas';\nimport { BrandLogoDirectionConfigSchema } from './brand-logo-direction.schemas';\nimport { BrandNameConfigSchema } from './brand-name.schemas';\nimport { BrandVisualToneConfigSchema } from './brand-visual-tone.schemas';\nimport { BrandAudienceConfigSchema } from './brand-audience.schemas';\n\n/**\n * @wildo_source:part:start brand.snapshot.config facet:layer:specification facet:family:brand\n *\n * Versioning for the brand-snapshot payload format itself. `V1` — initial\n * shape (name + logo direction + visual tone + resolved assets). The\n * shape grows additively across versions; the `version` field is the\n * explicit marker for consumers that need to branch on era.\n */\nexport enum BrandSnapshotVersion {\n V1 = 'v1',\n}\n\n/**\n * THE brand-snapshot payload — a **single aggregate per product**\n * (vision/market-snapshot style, NOT a keyed entries map): there is\n * exactly one brand identity per application. It is the visual-identity\n * definition artifact the app-creation top-down catalog reads/writes,\n * and — via `resolvedAssets` — the **single source of truth for every\n * logo/favicon/brand-image consumer in the app** that is actually wired:\n * the app shell, the website, the docs site, the website OG image, and the\n * backend runtime configuration that transactional email resolves its logo\n * from.\n *\n * PDF templates and schema.org are NOT among them. The pdf-templates tree\n * contains no brand or logo reference at all, and the website's structured-data\n * payloads are authored by each section's `getStructuredData()` hook rather than\n * resolved from here. Both would arrive as new propagation destinations; until\n * they do, a PDF or a JSON-LD payload that needs the mark carries it by hand.\n *\n * **Artifact-family id: `brand-brief`.** This schema is the shape of the\n * journey artifact selected by `MetaWorkflow_ArtifactSelector.family ===\n * 'brand-brief'`. As with `vision-brief`, the `family` vocabulary is an\n * OPEN string (owned by the assertion surface, not a frozen enum), so it\n * is intentionally NOT re-declared as a constant here; this note is the\n * single place that ties the `BrandSnapshot` SHAPE to the `brand-brief`\n * family NAME so the brand-identity playbook and the companion logo step\n * select it consistently.\n *\n * Shape decision (framework mindset — each member carries its own\n * semantic weight):\n * - **`name`** — REQUIRED. A brand without a name has nothing for a mark\n * to render.\n * - **`logoDirection`** / **`visualTone`** — OPTIONAL singletons, elicited\n * progressively (the brand-identity playbook fills them after the name).\n * Absence is a first-class \"not yet directed\" state surfaced as a WARN\n * by `validateBrandSnapshot`, never a parse failure.\n * - **`resolvedAssets`** — the collection the COMPANION logo step\n * populates (empty until generation runs), each entry described by the\n * three orthogonal axes (composition × theme × purpose) rather than a\n * flat role. This is the SSOT half: authored direction in the\n * singletons, produced assets here.\n *\n * The direction singletons are the INPUT to logo generation (enriched by\n * vision idea/mission + market `tonesOfVoice` in the companion\n * introspection subprocess); `resolvedAssets` is its OUTPUT. Authored in\n * English (like the vision + market families).\n */\nexport const BrandSnapshotSchema = z.object({\n version: z.enum(BrandSnapshotVersion).default(BrandSnapshotVersion.V1),\n /** The brand name — the anchor lexical identity. Always present. */\n name: BrandNameConfigSchema,\n /** The logo creative brief — elicited progressively; WARNed when absent. */\n logoDirection: BrandLogoDirectionConfigSchema.optional(),\n /** The visual aesthetic register — elicited progressively; WARNed when absent. */\n visualTone: BrandVisualToneConfigSchema.optional(),\n /**\n * WHO the brand is for: the market ICPs (`targetIcpRefs`) its name and tone were chosen to speak to\n * (#1424). Optional, like the two directions — a brand elicited before its market exists has none —\n * and cross-checked against the market by the coherence report, which reports a ref naming no ICP.\n */\n audience: BrandAudienceConfigSchema.optional(),\n /**\n * The generated + derived assets, each described by the three\n * orthogonal axes (composition × theme × purpose). Populated by the\n * companion logo-generation step; empty until it runs. THE source of\n * truth every brand-image consumer resolves against.\n */\n resolvedAssets: z.array(BrandAssetConfigSchema).default([]),\n});\nexport type BrandSnapshot = z.infer<typeof BrandSnapshotSchema>;\n/** @wildo_source:part:end brand.snapshot.config */\n\n/**\n * The module that holds a brand's ACCEPTED assets, beside the brand brief (`specifications/src/brand/`) — one definition\n * for every party that writes or reads it (#2237): the brief's landing composes it, the logo step's landed check reads\n * it, and the brand accept step rewrites it.\n *\n * The brief does not carry `resolvedAssets` as data. It composes this module, so the assets promoted after the brief\n * landed reach every reader of the brief, and a later re-landing of the brief keeps them. Measured on\n * app-creation-test-004 (2026-10-01): the landing wrote `resolvedAssets: []` as a literal, the logo step promoted a full\n * set into this module, and nothing joined the two, so every reader of the brief saw a brand with no logo.\n */\nexport const BRAND_RESOLVED_ASSETS_MODULE_FILE = 'resolved-assets.generated.ts';\n/** The module's one export, the accepted `BrandAssetConfig[]`. */\nexport const BRAND_RESOLVED_ASSETS_EXPORT = 'generatedResolvedBrandAssets';\n/** The import specifier the brief uses for the module, relative to the brief's own file. */\nexport const BRAND_RESOLVED_ASSETS_MODULE_SPECIFIER = './resolved-assets.generated';\n\n/**\n * The module's header: the imports a PROMOTED asset list needs, and what the file is. The accept step keeps an existing\n * header and rewrites only the export, so a module created empty must already import what a promotion will use, or the\n * first promotion writes a file that does not compile.\n */\nexport const BRAND_RESOLVED_ASSETS_MODULE_HEADER: string =\n `import { BrandAssetComposition, BrandAssetFormat, BrandAssetPurpose, BrandAssetTheme } from '@wildo-ai/saas-specifications';\\n`\n + `import type { BrandAssetConfig } from '@wildo-ai/saas-specifications';\\n\\n`\n + `/**\\n`\n + ` * GENERATED + COMMITTED brand assets — the ACCEPTED logo set. This is the\\n`\n + ` * source-of-truth \\`resolvedAssets\\` consumed by the application-owned brand snapshot.\\n`\n + ` * The image files live beside this file in \\`./assets/\\`; each entry's\\n`\n + ` * \\`storageRef\\` is a path relative to THIS spec's brand folder.\\n`\n + ` */\\n`;\n\n/** The module before any logo is accepted: the header, and an empty list. */\nexport function renderEmptyBrandResolvedAssetsModule(): string {\n return `${BRAND_RESOLVED_ASSETS_MODULE_HEADER}export const ${BRAND_RESOLVED_ASSETS_EXPORT}: BrandAssetConfig[] = [];\\n`;\n}\n"]}
@@ -148,6 +148,11 @@ export declare const BuildPlanTaskGenerationSchema: z.ZodObject<{
148
148
  }, z.core.$strict>, z.ZodObject<{
149
149
  kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodLiteral<import("./build-plan-task-graph.schemas").BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT>>;
150
150
  productKey: z.ZodString;
151
+ }, z.core.$strict>, z.ZodObject<{
152
+ kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodLiteral<import("./build-plan-task-graph.schemas").BuildPlanTaskProductKind.APPLICATION_DATA_SEED>>;
153
+ seedKey: z.ZodString;
154
+ resourceRef: z.ZodString;
155
+ content: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./build-plan-task-graph.schemas").BuildPlanDataSeedContent>>;
151
156
  }, z.core.$strict>, z.ZodObject<{
152
157
  kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodLiteral<import("./build-plan-task-graph.schemas").BuildPlanTaskProductKind.WEBSITE_PAGE>>;
153
158
  pageRef: z.ZodString;
@@ -313,6 +318,11 @@ export declare const BuildPlanTaskGraphGenerationSchema: z.ZodObject<{
313
318
  }, z.core.$strict>, z.ZodObject<{
314
319
  kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodLiteral<import("./build-plan-task-graph.schemas").BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT>>;
315
320
  productKey: z.ZodString;
321
+ }, z.core.$strict>, z.ZodObject<{
322
+ kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodLiteral<import("./build-plan-task-graph.schemas").BuildPlanTaskProductKind.APPLICATION_DATA_SEED>>;
323
+ seedKey: z.ZodString;
324
+ resourceRef: z.ZodString;
325
+ content: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodEnum<typeof import("./build-plan-task-graph.schemas").BuildPlanDataSeedContent>>;
316
326
  }, z.core.$strict>, z.ZodObject<{
317
327
  kind: import("@wildo-ai/zod-decorators").DecoratedPrimitiveZodType<z.ZodLiteral<import("./build-plan-task-graph.schemas").BuildPlanTaskProductKind.WEBSITE_PAGE>>;
318
328
  pageRef: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"build-plan-task-graph-generation.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan-task-graph-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,4BAA4B,EAAE,MAAM,mEAAmE,CAAC;AAEjH,OAAO,EAML,KAAK,kBAAkB,EACxB,MAAM,iCAAiC,CAAC;AAYzC;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIxC;;;;;;;;;;;;;;;OAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIH,qEAAqE;;;kBAGrE,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,+FAA+F;AAC/F,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA1B7C;;;;;;;;;;;;;;;WAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIH,qEAAqE;;;;kBAqBrE,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,8FAA8F;AAC9F,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAkBpF"}
1
+ {"version":3,"file":"build-plan-task-graph-generation.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan-task-graph-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,4BAA4B,EAAE,MAAM,mEAAmE,CAAC;AAEjH,OAAO,EAML,KAAK,kBAAkB,EACxB,MAAM,iCAAiC,CAAC;AAYzC;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIxC;;;;;;;;;;;;;;;OAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIH,qEAAqE;;;kBAGrE,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,+FAA+F;AAC/F,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA1B7C;;;;;;;;;;;;;;;WAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIH,qEAAqE;;;;kBAqBrE,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,8FAA8F;AAC9F,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,OAAO,GAAG,kBAAkB,CAkBpF"}
@@ -1,4 +1,5 @@
1
1
  import { CoreResourceOperation, type FlowsActors_Relationship } from '@wildo-ai/saas-models';
2
+ import type { DomainPlanOutputSet } from '../domain-plan/domain-plan-output-set.schemas';
2
3
  import { type BuildPlanTaskGraph } from './build-plan-task-graph.schemas';
3
4
  /** Deterministic finding over a build-plan task graph; authoring consistency beyond structural validity. */
4
5
  export declare enum BuildPlanTaskGraphFindingCode {
@@ -205,4 +206,60 @@ export declare function projectBuildPlanAsExecutionPlanSteps(graph: BuildPlanTas
205
206
  * is told the answer and never how it was reached.
206
207
  */
207
208
  export declare function selectReadyBuildPlanTasks(graph: BuildPlanTaskGraph, landedTaskRefs: ReadonlySet<string>): readonly BuildPlanTaskGraph['tasks'][number][];
209
+ /**
210
+ * What a build plan leaves out of the domain plan it decomposes (#2220): a resource nothing builds,
211
+ * or a relationship nothing wires.
212
+ */
213
+ export declare enum BuildPlanDomainCoverageGapKind {
214
+ /** A domain-plan resource (main or supporting) that no `RESOURCE_STAGE` task targets. */
215
+ RESOURCE_WITHOUT_TASK = "RESOURCE_WITHOUT_TASK",
216
+ /** A MAIN resource whose tasks include no `SCHEMA` stage, so nothing gives it its fields. */
217
+ MAIN_RESOURCE_WITHOUT_SCHEMA_STAGE = "MAIN_RESOURCE_WITHOUT_SCHEMA_STAGE",
218
+ /** A relationship between two declared resources that no `RELATIONSHIP` task names. */
219
+ RELATIONSHIP_WITHOUT_TASK = "RELATIONSHIP_WITHOUT_TASK"
220
+ }
221
+ /** One element of the domain plan the build plan does not cover, named by the domain plan's own ref. */
222
+ export interface BuildPlanDomainCoverageGap {
223
+ readonly kind: BuildPlanDomainCoverageGapKind;
224
+ /** The resource ref, or the relationship ref, exactly as the domain plan authors it. */
225
+ readonly ref: string;
226
+ /** The module that lists the resource, or `undefined` for a relationship. */
227
+ readonly moduleRef?: string;
228
+ }
229
+ /**
230
+ * Every element of the domain plan this build plan does not cover (#2220). Pure, and TOTAL over the
231
+ * domain plan, so a resource added to it tomorrow is reported by every existing plan.
232
+ *
233
+ * ## Why this is a refusal and not a coverage note
234
+ *
235
+ * The cross-family coherence report treats coverage as advisory, because a coverage gap there is often a
236
+ * deliberate deferral (a criterion pushed past this horizon). This one is not: the build plan's contract
237
+ * is to decompose the ACCEPTED domain plan, and the build loop reports the application done when the
238
+ * plan's tasks have landed. A plan that leaves a resource out is therefore FALSE, not unfinished: the
239
+ * build would finish without that resource and say it is complete. That is the case
240
+ * `application-creation-directive.md` allows to refuse, and the remedy is fixing the artifact, not
241
+ * obtaining a decision.
242
+ *
243
+ * Measured on app-creation-test-004, 2026-10-01: two one-task plans landed over a domain plan whose
244
+ * resources a 91-task plan covered, one through a whole-artifact retry (run 6abe4b92…) and one on a
245
+ * re-run whose model returned only the task it was adding (run 6abe7c05…). Only the advisory judge
246
+ * noticed either.
247
+ *
248
+ * ## What counts
249
+ *
250
+ * - a resource is covered by any `RESOURCE_STAGE` task targeting it; a MAIN resource additionally needs
251
+ * a `SCHEMA` stage. A supporting resource may omit stages it does not need (a junction with schema and
252
+ * config, say), which is the judge's rule too;
253
+ * - a relationship is covered by a `RELATIONSHIP` task naming its `relationshipRef`, when both its ends are
254
+ * resources the domain plan declares. A relationship to an undeclared resource is not this check's: no
255
+ * task could wire it, and the coherence report names it as a conception gap instead.
256
+ *
257
+ * Refs compare exactly, as the declared `target.resourceRef` and `target.relationshipRef` edges already
258
+ * require them to.
259
+ *
260
+ * Known limit: a domain plan that lists an ENGINE-provided resource in a module inventory would be held to
261
+ * a `RESOURCE_STAGE` task for it. Neither dogfood application does (measured 2026-10-02), and the domain
262
+ * plan's own method models the application's resources, so this is recorded rather than special-cased.
263
+ */
264
+ export declare function findBuildPlanDomainCoverageGaps(graph: BuildPlanTaskGraph, domainPlan: Pick<DomainPlanOutputSet, 'modules' | 'relationships'>): readonly BuildPlanDomainCoverageGap[];
208
265
  //# sourceMappingURL=build-plan-task-graph-validation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"build-plan-task-graph-validation.d.ts","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan-task-graph-validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAmE,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAE9J,OAAO,EAA6E,KAAK,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErJ,4GAA4G;AAC5G,oBAAY,6BAA6B;IACvC,oFAAoF;IACpF,kBAAkB,uBAAuB;IACzC;;;;;;OAMG;IACH,wBAAwB,6BAA6B;IACrD;;;;;;;;;;;;;OAaG;IACH,wCAAwC,6CAA6C;IACrF;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,iCAAiC,sCAAsC;IACvE,wIAAwI;IACxI,kCAAkC,uCAAuC;IACzE;;;;;;;;;;;;;;;;OAgBG;IACH,uCAAuC,4CAA4C;IACnF;;;;;;;;;;;;;;OAcG;IACH,gCAAgC,qCAAqC;CACtE;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,6BAA6B,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC,EAAE,SAAS,qBAAqB,EA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