@nextcommerce/campaigns-os 1.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/AGENTS.md +204 -0
  2. package/CHANGELOG.md +5002 -0
  3. package/CONTEXT.md +685 -0
  4. package/LICENSE +202 -0
  5. package/NOTICE +4 -0
  6. package/README.md +368 -0
  7. package/agents/claude/CLAUDE.md +32 -0
  8. package/agents/codex/AGENTS.md +27 -0
  9. package/agents/copilot/copilot-instructions.md +14 -0
  10. package/agents/cursor/campaigns-os.mdc +13 -0
  11. package/bin/campaigns-os.mjs +38 -0
  12. package/campaign-spec/README.md +138 -0
  13. package/campaign-spec/dist/analytics-vocabulary.d.ts +47 -0
  14. package/campaign-spec/dist/analytics-vocabulary.js +74 -0
  15. package/campaign-spec/dist/index.d.ts +40 -0
  16. package/campaign-spec/dist/index.js +77 -0
  17. package/campaign-spec/dist/normalize.d.ts +22 -0
  18. package/campaign-spec/dist/normalize.js +41 -0
  19. package/campaign-spec/dist/routing.d.ts +190 -0
  20. package/campaign-spec/dist/routing.js +263 -0
  21. package/campaign-spec/dist/rules/analytics-contract-shape.d.ts +42 -0
  22. package/campaign-spec/dist/rules/analytics-contract-shape.js +303 -0
  23. package/campaign-spec/dist/rules/assembly-hints-shape.d.ts +42 -0
  24. package/campaign-spec/dist/rules/assembly-hints-shape.js +191 -0
  25. package/campaign-spec/dist/rules/campaign-metadata.d.ts +14 -0
  26. package/campaign-spec/dist/rules/campaign-metadata.js +40 -0
  27. package/campaign-spec/dist/rules/checkout-has-success-url.d.ts +31 -0
  28. package/campaign-spec/dist/rules/checkout-has-success-url.js +66 -0
  29. package/campaign-spec/dist/rules/cycle-detection.d.ts +12 -0
  30. package/campaign-spec/dist/rules/cycle-detection.js +141 -0
  31. package/campaign-spec/dist/rules/design-source-shape.d.ts +29 -0
  32. package/campaign-spec/dist/rules/design-source-shape.js +142 -0
  33. package/campaign-spec/dist/rules/downsell-without-upsell.d.ts +11 -0
  34. package/campaign-spec/dist/rules/downsell-without-upsell.js +40 -0
  35. package/campaign-spec/dist/rules/exit-intent-validation.d.ts +23 -0
  36. package/campaign-spec/dist/rules/exit-intent-validation.js +147 -0
  37. package/campaign-spec/dist/rules/funnel-count.d.ts +9 -0
  38. package/campaign-spec/dist/rules/funnel-count.js +37 -0
  39. package/campaign-spec/dist/rules/funnel-hypothesis-length.d.ts +22 -0
  40. package/campaign-spec/dist/rules/funnel-hypothesis-length.js +60 -0
  41. package/campaign-spec/dist/rules/funnel-identity.d.ts +15 -0
  42. package/campaign-spec/dist/rules/funnel-identity.js +57 -0
  43. package/campaign-spec/dist/rules/funnel-weight-sum.d.ts +20 -0
  44. package/campaign-spec/dist/rules/funnel-weight-sum.js +66 -0
  45. package/campaign-spec/dist/rules/index.d.ts +69 -0
  46. package/campaign-spec/dist/rules/index.js +131 -0
  47. package/campaign-spec/dist/rules/offer-ref-integrity.d.ts +13 -0
  48. package/campaign-spec/dist/rules/offer-ref-integrity.js +59 -0
  49. package/campaign-spec/dist/rules/package-pricing-sanity.d.ts +12 -0
  50. package/campaign-spec/dist/rules/package-pricing-sanity.js +42 -0
  51. package/campaign-spec/dist/rules/page-count.d.ts +11 -0
  52. package/campaign-spec/dist/rules/page-count.js +31 -0
  53. package/campaign-spec/dist/rules/page-id-uniqueness.d.ts +14 -0
  54. package/campaign-spec/dist/rules/page-id-uniqueness.js +47 -0
  55. package/campaign-spec/dist/rules/promo-code-input-validation.d.ts +8 -0
  56. package/campaign-spec/dist/rules/promo-code-input-validation.js +126 -0
  57. package/campaign-spec/dist/rules/promo-codes-shape.d.ts +30 -0
  58. package/campaign-spec/dist/rules/promo-codes-shape.js +187 -0
  59. package/campaign-spec/dist/rules/route-field-ignored-for-page-type.d.ts +33 -0
  60. package/campaign-spec/dist/rules/route-field-ignored-for-page-type.js +81 -0
  61. package/campaign-spec/dist/rules/route-target-resolves.d.ts +32 -0
  62. package/campaign-spec/dist/rules/route-target-resolves.js +112 -0
  63. package/campaign-spec/dist/rules/schema-version.d.ts +21 -0
  64. package/campaign-spec/dist/rules/schema-version.js +53 -0
  65. package/campaign-spec/dist/rules/sdk-version.d.ts +26 -0
  66. package/campaign-spec/dist/rules/sdk-version.js +96 -0
  67. package/campaign-spec/dist/rules/shipping-countries-shape.d.ts +10 -0
  68. package/campaign-spec/dist/rules/shipping-countries-shape.js +30 -0
  69. package/campaign-spec/dist/rules/shipping-methods-present.d.ts +10 -0
  70. package/campaign-spec/dist/rules/shipping-methods-present.js +26 -0
  71. package/campaign-spec/dist/rules/store-profile-shape.d.ts +30 -0
  72. package/campaign-spec/dist/rules/store-profile-shape.js +127 -0
  73. package/campaign-spec/dist/rules/thank-you-requirement.d.ts +16 -0
  74. package/campaign-spec/dist/rules/thank-you-requirement.js +50 -0
  75. package/campaign-spec/dist/rules/unknown-top-level-fields.d.ts +28 -0
  76. package/campaign-spec/dist/rules/unknown-top-level-fields.js +114 -0
  77. package/campaign-spec/dist/rules/upsell-has-packages.d.ts +9 -0
  78. package/campaign-spec/dist/rules/upsell-has-packages.js +35 -0
  79. package/campaign-spec/dist/rules/upsell-routing-complete.d.ts +10 -0
  80. package/campaign-spec/dist/rules/upsell-routing-complete.js +45 -0
  81. package/campaign-spec/dist/rules/upsell-without-checkout.d.ts +11 -0
  82. package/campaign-spec/dist/rules/upsell-without-checkout.js +44 -0
  83. package/campaign-spec/dist/rules/variant-labels-shape.d.ts +28 -0
  84. package/campaign-spec/dist/rules/variant-labels-shape.js +86 -0
  85. package/campaign-spec/dist/sdk-version-parse.d.ts +43 -0
  86. package/campaign-spec/dist/sdk-version-parse.js +62 -0
  87. package/campaign-spec/dist/types.d.ts +674 -0
  88. package/campaign-spec/dist/types.js +40 -0
  89. package/campaign-spec/package.json +12 -0
  90. package/compatibility.json +25 -0
  91. package/contracts/agent-relevant-change-policy.v1.json +111 -0
  92. package/contracts/brand-theme-source-defaults.figma-sections-export.v0.json +32 -0
  93. package/contracts/brand-theme-target-tokens.next-core.v0.json +65 -0
  94. package/contracts/campaign-cart-checkout-field-contract.v0.json +45 -0
  95. package/contracts/campaign-cart-sdk-support-policy.v0.json +11 -0
  96. package/contracts/commerce-surface-catalog.json +2452 -0
  97. package/contracts/fixtures/orientation/canonicalization/v1.json +34 -0
  98. package/contracts/fixtures/orientation/envelope/current.json +95 -0
  99. package/contracts/fixtures/orientation/envelope/freshness_unknown.json +97 -0
  100. package/contracts/fixtures/orientation/envelope/legacy_baseline.json +95 -0
  101. package/contracts/fixtures/orientation/envelope/orientation_available.json +136 -0
  102. package/contracts/fixtures/orientation/envelope/recovered_interrupted_update.json +136 -0
  103. package/contracts/fixtures/orientation/envelope/refused.json +100 -0
  104. package/contracts/fixtures/orientation/envelope/restart_required.json +137 -0
  105. package/contracts/fixtures/orientation/envelope/updated.json +135 -0
  106. package/contracts/fixtures/orientation/hostile-target/README.md +61 -0
  107. package/contracts/fixtures/orientation/hostile-target/manifest.json +82 -0
  108. package/contracts/fixtures/orientation/hostile-target/repo/CHANGELOG.md +18 -0
  109. package/contracts/fixtures/orientation/hostile-target/repo/bin/intended.mjs +12 -0
  110. package/contracts/fixtures/orientation/hostile-target/repo/bin/tripwire.mjs +15 -0
  111. package/contracts/fixtures/orientation/hostile-target/repo/contracts/release-ledger.json +48 -0
  112. package/contracts/fixtures/orientation/hostile-target/repo/contracts/supported-surface.json +17 -0
  113. package/contracts/fixtures/orientation/hostile-target/repo/docs/example-contract.md +13 -0
  114. package/contracts/fixtures/orientation/hostile-target/repo/hooks/post-checkout +5 -0
  115. package/contracts/fixtures/orientation/hostile-target/repo/hooks/post-merge +5 -0
  116. package/contracts/fixtures/orientation/hostile-target/repo/hooks/pre-commit +5 -0
  117. package/contracts/fixtures/orientation/hostile-target/repo/hostile-dependency-tripwire/package.json +15 -0
  118. package/contracts/fixtures/orientation/hostile-target/repo/hostile-dependency-tripwire/tripwire.mjs +9 -0
  119. package/contracts/fixtures/orientation/hostile-target/repo/package.json +20 -0
  120. package/contracts/fixtures/orientation/hostile-target/repo/schemas/example.v0.schema.json +15 -0
  121. package/contracts/fixtures/orientation/release-gate/cases.json +1073 -0
  122. package/contracts/fixtures/runtime-recipe/accept/current.json +299 -0
  123. package/contracts/fixtures/runtime-recipe/accept/minimal.json +294 -0
  124. package/contracts/fixtures/runtime-recipe/dist-states.json +51 -0
  125. package/contracts/fixtures/runtime-recipe/manifest.json +85 -0
  126. package/contracts/fixtures/runtime-recipe/reject/advisory-enforcement.json +299 -0
  127. package/contracts/fixtures/runtime-recipe/reject/allowlist-without-hosts.json +297 -0
  128. package/contracts/fixtures/runtime-recipe/reject/committed-output-claim.json +299 -0
  129. package/contracts/fixtures/runtime-recipe/reject/engines-disagreement-warns.json +299 -0
  130. package/contracts/fixtures/runtime-recipe/reject/lifecycle-scripts-enabled.json +299 -0
  131. package/contracts/fixtures/runtime-recipe/reject/missing-required-field.json +251 -0
  132. package/contracts/fixtures/runtime-recipe/reject/unknown-kind.json +299 -0
  133. package/contracts/fixtures/runtime-recipe/reject/unknown-network-policy.json +299 -0
  134. package/contracts/fixtures/runtime-recipe/reject/unknown-output-check.json +310 -0
  135. package/contracts/fixtures/runtime-recipe/reject/unknown-revision.json +299 -0
  136. package/contracts/fixtures/runtime-recipe/reject/unknown-step-id.json +299 -0
  137. package/contracts/fixtures/runtime-recipe/reject/unperformable-check-skipped.json +299 -0
  138. package/contracts/fixtures/runtime-recipe/reject/unpinned-lockfile.json +299 -0
  139. package/contracts/fixtures/sidecar-bundle/production-shaped/.campaign-runtime/assembly-report.json +180 -0
  140. package/contracts/fixtures/sidecar-bundle/production-shaped/.campaign-runtime/build-context.json +115 -0
  141. package/contracts/fixtures/sidecar-bundle/production-shaped/.campaign-runtime/doctor-output.json +29 -0
  142. package/contracts/fixtures/sidecar-bundle/production-shaped/.campaign-runtime/qa-verdict.json +27 -0
  143. package/contracts/fixtures/sidecar-bundle/production-shaped/campaign-runtime.build.json +141 -0
  144. package/contracts/migration-sidecar-bundle.v0.json +149 -0
  145. package/contracts/orientation-limits.v1.json +41 -0
  146. package/contracts/orientation-reason-codes.v1.json +196 -0
  147. package/contracts/private-template-sources.json +8 -0
  148. package/contracts/release-ledger.json +4598 -0
  149. package/contracts/reserved-skill-names.json +13 -0
  150. package/contracts/runtime-recipe.campaigns-os-node-v1.json +299 -0
  151. package/contracts/supported-surface.json +180 -0
  152. package/contracts/template-brand-contract.apollo-mv-single-step.v0.json +27 -0
  153. package/contracts/template-brand-contract.apollo.v0.json +27 -0
  154. package/contracts/template-brand-contract.demeter.v0.json +27 -0
  155. package/contracts/template-brand-contract.olympus-mv-single-step.v0.json +27 -0
  156. package/contracts/template-brand-contract.olympus-mv-two-step.v0.json +28 -0
  157. package/contracts/template-brand-contract.olympus.v0.json +27 -0
  158. package/contracts/template-brand-contract.shared-commerce.v0.json +190 -0
  159. package/contracts/template-brand-contract.shop-single-step.v0.json +27 -0
  160. package/contracts/template-brand-contract.shop-three-step.v0.json +29 -0
  161. package/contracts/template-slot-manifest.apollo-mv-single-step.v0.json +14 -0
  162. package/contracts/template-slot-manifest.apollo.v0.json +12 -0
  163. package/contracts/template-slot-manifest.demeter.v0.json +30 -0
  164. package/contracts/template-slot-manifest.olympus-mv-single-step.v0.json +14 -0
  165. package/contracts/template-slot-manifest.olympus-mv-two-step.v0.json +15 -0
  166. package/contracts/template-slot-manifest.olympus.v0.json +12 -0
  167. package/contracts/template-slot-manifest.shared-content-core.v0.json +4254 -0
  168. package/contracts/template-slot-manifest.shop-single-step.v0.json +47 -0
  169. package/contracts/template-slot-manifest.shop-three-step.v0.json +33 -0
  170. package/docs/brand-theme-bridge.md +159 -0
  171. package/docs/build-packet.md +1300 -0
  172. package/docs/campaign-build-brief.md +145 -0
  173. package/docs/campaign-standardization-report.md +329 -0
  174. package/docs/campaigns-os-build-flow.md +117 -0
  175. package/docs/design-source-package.md +784 -0
  176. package/docs/legacy-migration.md +58 -0
  177. package/docs/migration-sidecar-bundle.md +139 -0
  178. package/docs/orientation-contract-reference.md +1220 -0
  179. package/docs/polish-evidence.md +502 -0
  180. package/docs/qa-and-test-orders.md +1691 -0
  181. package/docs/release-ledger-authoring-guide.md +274 -0
  182. package/docs/runtime-readiness.md +211 -0
  183. package/docs/supported-surface.md +83 -0
  184. package/docs/versioning.md +55 -0
  185. package/docs/workflow-findings-sidecar.md +588 -0
  186. package/package.json +135 -0
  187. package/prompts/first-build.md +27 -0
  188. package/prompts/friction-log.md +30 -0
  189. package/schemas/campaign-build-brief.v1.schema.json +149 -0
  190. package/schemas/campaign-design-source-package.v0.schema.json +697 -0
  191. package/schemas/campaign-runtime-assembly-report.v0.schema.json +390 -0
  192. package/schemas/campaign-runtime-build-context.v0.schema.json +339 -0
  193. package/schemas/campaign-runtime-build-packet.v0.schema.json +452 -0
  194. package/schemas/campaign-spec.v4.schema.json +582 -0
  195. package/schemas/campaigns-os-doctor-output.v0.schema.json +43 -0
  196. package/schemas/campaigns-os-legacy-migration-inventory.v0.schema.json +112 -0
  197. package/schemas/campaigns-os-legacy-provisioning-plan.v0.schema.json +38 -0
  198. package/schemas/campaigns-os-legacy-provisioning-receipt.v0.schema.json +57 -0
  199. package/schemas/campaigns-os-qa-verdict-sidecar.v0.schema.json +150 -0
  200. package/schemas/campaigns-os-qa-verdict.v0.schema.json +438 -0
  201. package/schemas/campaigns-os-release-ledger.v1.schema.json +162 -0
  202. package/schemas/campaigns-os-run-record.v0.schema.json +343 -0
  203. package/schemas/campaigns-os-runtime-recipe.v1.schema.json +313 -0
  204. package/schemas/campaigns-os-sidecar-bundle-conformance.v0.schema.json +78 -0
  205. package/schemas/campaigns-os-tooling-orientation.v1.schema.json +381 -0
  206. package/schemas/campaigns-os-workflow-finding.v0.schema.json +134 -0
  207. package/schemas/source-html-manifest.v0.schema.json +252 -0
  208. package/skills/next-campaigns-build/SKILL.md +73 -0
  209. package/skills/next-campaigns-os/SKILL.md +101 -0
  210. package/skills/next-campaigns-os/references/session-intake.md +160 -0
  211. package/skills/next-campaigns-os-setup/SKILL.md +22 -0
  212. package/skills/next-campaigns-polish/SKILL.md +145 -0
  213. package/skills/next-campaigns-qa/SKILL.md +92 -0
  214. package/skills.json +56 -0
  215. package/skills.sh +64 -0
  216. package/src/adapter-decision-contract.mjs +333 -0
  217. package/src/brand-theme.mjs +1151 -0
  218. package/src/browser-launch.mjs +79 -0
  219. package/src/build-brief.mjs +781 -0
  220. package/src/built-site-scope.mjs +312 -0
  221. package/src/campaign-ecosystem.mjs +734 -0
  222. package/src/campaign-identity.mjs +405 -0
  223. package/src/campaign-workspace.mjs +127 -0
  224. package/src/checkpoint-waiver.mjs +302 -0
  225. package/src/cli.mjs +13442 -0
  226. package/src/commercial-journey.mjs +1119 -0
  227. package/src/commercial-parity.mjs +965 -0
  228. package/src/consent.mjs +347 -0
  229. package/src/content-residue.mjs +322 -0
  230. package/src/deadline.mjs +81 -0
  231. package/src/design-source-package.mjs +2604 -0
  232. package/src/deviation.mjs +107 -0
  233. package/src/doctor-check-registry.mjs +49 -0
  234. package/src/doctor-sidecar.mjs +106 -0
  235. package/src/finding-cause.mjs +557 -0
  236. package/src/findings.mjs +326 -0
  237. package/src/fs-identity.mjs +68 -0
  238. package/src/gate-actions.mjs +105 -0
  239. package/src/html-scan.mjs +53 -0
  240. package/src/install-mode.mjs +272 -0
  241. package/src/legacy-migration.d.ts +128 -0
  242. package/src/legacy-migration.mjs +510 -0
  243. package/src/lifecycle.mjs +338 -0
  244. package/src/local-proof.mjs +401 -0
  245. package/src/map-pin-writeback.mjs +210 -0
  246. package/src/orchestration-stage-contract.mjs +81 -0
  247. package/src/package-install-fixture.mjs +33 -0
  248. package/src/page-kit-build-summary.mjs +175 -0
  249. package/src/page-kit-campaign-config.mjs +57 -0
  250. package/src/page-kit-sdk-version.mjs +392 -0
  251. package/src/page-kit-store-profile.mjs +369 -0
  252. package/src/page-kit-sync.mjs +162 -0
  253. package/src/polish-browser.mjs +867 -0
  254. package/src/polish-capture.mjs +1094 -0
  255. package/src/polish-deadline.mjs +51 -0
  256. package/src/polish-gate.mjs +739 -0
  257. package/src/polish-node.mjs +639 -0
  258. package/src/polish-page-load.mjs +1100 -0
  259. package/src/private-template-source.mjs +237 -0
  260. package/src/proof-policy.mjs +82 -0
  261. package/src/qa-analytics-correctness.mjs +307 -0
  262. package/src/qa-analytics-errors.mjs +38 -0
  263. package/src/qa-analytics-parity.mjs +699 -0
  264. package/src/qa-binding-evidence.mjs +140 -0
  265. package/src/qa-browser.mjs +6608 -0
  266. package/src/qa-cart-entry.mjs +406 -0
  267. package/src/qa-commercial-parity.mjs +641 -0
  268. package/src/qa-node.mjs +3620 -0
  269. package/src/qa-order-bump.mjs +381 -0
  270. package/src/qa-parity-capture.mjs +428 -0
  271. package/src/qa-parity-fixture.mjs +359 -0
  272. package/src/qa-publish.mjs +362 -0
  273. package/src/qa-purchase-data-layer.mjs +263 -0
  274. package/src/qa-route-probe.mjs +272 -0
  275. package/src/qa-sidecar.mjs +188 -0
  276. package/src/qa-test-order-topology.mjs +207 -0
  277. package/src/qa-url-privacy.mjs +13 -0
  278. package/src/qa-verdict-discovery.mjs +192 -0
  279. package/src/qa-verdict-publish.mjs +105 -0
  280. package/src/qa-verdict.mjs +287 -0
  281. package/src/remit.mjs +388 -0
  282. package/src/repo-scan.mjs +83 -0
  283. package/src/route-identity.mjs +133 -0
  284. package/src/run-record-closeout.mjs +229 -0
  285. package/src/run-record.mjs +839 -0
  286. package/src/run-session.mjs +226 -0
  287. package/src/runtime-state-ignore.mjs +113 -0
  288. package/src/sdk-attribute-index.mjs +212 -0
  289. package/src/sdk-markup.mjs +358 -0
  290. package/src/sdk-meta-tags.mjs +52 -0
  291. package/src/shell-token.mjs +7 -0
  292. package/src/sidecar-bundle.mjs +399 -0
  293. package/src/source-asset-crawl.mjs +469 -0
  294. package/src/source-html-intake.mjs +627 -0
  295. package/src/source-html-manifest.mjs +276 -0
  296. package/src/source-prep.mjs +284 -0
  297. package/src/spec-derive-store.mjs +431 -0
  298. package/src/spec-derive.mjs +514 -0
  299. package/src/spec-fetch.mjs +66 -0
  300. package/src/spec-hash.mjs +48 -0
  301. package/src/spec-identity.mjs +27 -0
  302. package/src/stage-ledger.mjs +509 -0
  303. package/src/standardization-report.mjs +1297 -0
  304. package/src/template-brand-contract.mjs +473 -0
  305. package/src/template-freshness.mjs +196 -0
  306. package/src/template-reference.mjs +81 -0
  307. package/src/template-slot-manifest.mjs +150 -0
  308. package/src/text-safety.mjs +62 -0
  309. package/src/theme-gate.mjs +185 -0
  310. package/src/upsell-selector-scope.mjs +299 -0
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Type surface for the CampaignSpec contract layer.
3
+ *
4
+ * The CampaignSpec is the central authoring contract of this repo (see
5
+ * ../CONTEXT.md). v4.3 is the authoring shape; v4.2 funnels[] is the canonical
6
+ * internal shape that rules operate on (after normalize()).
7
+ *
8
+ * Types here are intentionally permissive on optional fields — the rule
9
+ * registry catches missing/malformed fields, rather than the type system
10
+ * refusing to compile against in-progress Map Builder drafts.
11
+ */
12
+ /**
13
+ * Optional hint declaring which starter template family the campaign was
14
+ * authored against. Doctrine: template family is a build-time decision,
15
+ * not a spec-time decision; this field is a HINT that the build agent
16
+ * uses as the default when no `--template-family` CLI override is given.
17
+ *
18
+ * Pre-Slice 4a, this field already existed as an undocumented convention
19
+ * read by campaigns-os/src/cli.mjs preferredTemplateFamily(); Slice 4a
20
+ * blesses it in the schema, adds Map Builder UI to author it, and adds
21
+ * a validation rule that warns if the value isn't a recognized family.
22
+ *
23
+ * Operators / agents always retain veto power via `--template-family`;
24
+ * the hint never silently locks the build.
25
+ *
26
+ * Known families track the certified Campaigns OS commerce-surface catalog.
27
+ * The AssemblyHintsShape test pins this list to the vendored catalog so a
28
+ * newly certified family cannot start producing a false unknown-family
29
+ * warning.
30
+ */
31
+ export const KNOWN_TEMPLATE_FAMILY_HINTS = [
32
+ 'apollo',
33
+ 'apollo-mv-single-step',
34
+ 'demeter',
35
+ 'olympus',
36
+ 'olympus-mv-single-step',
37
+ 'olympus-mv-two-step',
38
+ 'shop-single-step',
39
+ 'shop-three-step',
40
+ ];
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "nc-campaign-spec",
3
+ "version": "0.1.0",
4
+ "description": "CampaignSpec contract: normalize, rule registry, fixture corpus. Sits at the centre of Campaigns OS — every other module either authors, validates, projects, or consumes specs through this interface.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "build": "tsc -p tsconfig.build.json",
10
+ "test": "node --test \"test/**/*.test.ts\""
11
+ }
12
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "package": "@nextcommerce/campaigns-os",
3
+ "version": "1.33.0",
4
+ "status": "developer-preview",
5
+ "contracts": {
6
+ "campaign_spec": "4.2-4.3",
7
+ "build_packet": "campaign-runtime-build-packet/v0",
8
+ "build_context": "campaign-runtime-build-context/v0",
9
+ "assembly_report": "campaign-runtime-assembly-report/v0",
10
+ "starter_template_agent_contract": 1,
11
+ "commerce_surface_catalog": 2
12
+ },
13
+ "source_adapters": {
14
+ "current": ["html_funnel"]
15
+ },
16
+ "runtime": {
17
+ "node": ">=20",
18
+ "page_kit": "target repo dependency",
19
+ "campaign_cart_sdk": "0.4.x expected by current fixtures"
20
+ },
21
+ "notes": [
22
+ "This toolkit is an agent-assisted build surface; launch still requires build, polish, deploy, and QA evidence.",
23
+ "The starter-template catalog snapshot should be refreshed from campaign-cart-starter-templates before toolkit releases."
24
+ ]
25
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "_note": "The SINGLE definition of 'agent-relevant change' for this repository. The changed-path classifier (scripts/orientation-contract.mjs), the two-way release gate (scripts/check-release-ledger.mjs), the generated reference (docs/orientation-contract-reference.md), and every contract test read this file. Do not hand-maintain a second copy anywhere. Authoring rules and worked pass/fail examples: docs/release-ledger-authoring-guide.md.",
3
+ "schema": "campaigns-os-agent-relevant-change-policy/v1",
4
+ "policy_version": "1.0.0",
5
+ "definition": "A change is agent-relevant when it alters something a downstream agent orients on: hashed or named supported-surface paths, CLI commands/subcommands/flags, skills, schemas, package exports, compatibility policy, agent-facing documentation, repository workflows that produce those artifacts, or the generated runtime a consumer must rebuild. This is the union of the release-gate list and the same-surface list in the harness upgrade build plan; neither list alone is normative.",
6
+ "semantic_classes": {
7
+ "schema": {
8
+ "description": "A JSON Schema in schemas/ that a consumer validates artifacts against.",
9
+ "requires_change_item": true
10
+ },
11
+ "hashed_surface": {
12
+ "description": "A path recorded in contracts/supported-surface.json hashed{}; its bytes are pinned and a change owes a surface_version advance.",
13
+ "requires_change_item": true
14
+ },
15
+ "named_surface": {
16
+ "description": "A path recorded in contracts/supported-surface.json named[]; content may evolve but the path must keep existing.",
17
+ "requires_change_item": true
18
+ },
19
+ "cli_surface": {
20
+ "description": "A CLI command, subcommand, or flag reachable from the supported argv surface.",
21
+ "requires_change_item": true
22
+ },
23
+ "skill": {
24
+ "description": "A versioned skill package or its installer.",
25
+ "requires_change_item": true
26
+ },
27
+ "package_export": {
28
+ "description": "package.json exports, bin, files, engines, or the dependency/script set a consumer installs.",
29
+ "requires_change_item": true
30
+ },
31
+ "compatibility_policy": {
32
+ "description": "The published compatibility statement, the supported-surface manifest, or the documents that define surface discipline.",
33
+ "requires_change_item": true
34
+ },
35
+ "documentation": {
36
+ "description": "Agent-facing documentation of record: the agent entry point, contract references, and authoring guides.",
37
+ "requires_change_item": true
38
+ },
39
+ "workflow": {
40
+ "description": "A repository workflow or workflow contract that produces or gates a supported artifact.",
41
+ "requires_change_item": true
42
+ },
43
+ "generated_runtime": {
44
+ "description": "Sources or lockfiles for the generated runtime a consumer must prepare before use.",
45
+ "requires_change_item": true
46
+ }
47
+ },
48
+ "_evaluation_note": "Evaluation order is fixed and total: self_referential_exemptions -> rules -> derived_from_supported_surface -> ignored -> unclassified (an error). First match wins within each ordered list. match.kind is one of exact | prefix. A rule may carry match_suffix (the path must also end with it) and exclude[] (matches that make the rule NOT apply, so a narrower path falls through to a later rule or to ignored). The derived pass runs BEFORE ignored so that a path newly added to the supported surface can never be swallowed by a broad ignore prefix; that is the fail-closed direction.",
49
+ "self_referential_exemptions": [
50
+ { "match": { "kind": "exact", "value": "contracts/release-ledger.json" }, "reason": "The ledger records changes; recording a change in it is not itself a recorded change." },
51
+ { "match": { "kind": "exact", "value": "CHANGELOG.md" }, "reason": "Changelog sections are linked one-to-one from ledger entries and are enforced by the changelog correspondence gate, not by a separate change item." }
52
+ ],
53
+ "rules": [
54
+ { "match": { "kind": "prefix", "value": "schemas/" }, "match_suffix": ".schema.json", "class": "schema" },
55
+ { "match": { "kind": "exact", "value": "compatibility.json" }, "class": "compatibility_policy" },
56
+ { "match": { "kind": "exact", "value": "contracts/supported-surface.json" }, "class": "compatibility_policy" },
57
+ { "match": { "kind": "exact", "value": "docs/supported-surface.md" }, "class": "compatibility_policy" },
58
+ { "match": { "kind": "exact", "value": "docs/versioning.md" }, "class": "compatibility_policy" },
59
+ { "match": { "kind": "exact", "value": "contracts/agent-relevant-change-policy.v1.json" }, "class": "compatibility_policy" },
60
+ { "match": { "kind": "exact", "value": "contracts/orientation-limits.v1.json" }, "class": "compatibility_policy" },
61
+ { "match": { "kind": "exact", "value": "contracts/orientation-reason-codes.v1.json" }, "class": "compatibility_policy" },
62
+ { "match": { "kind": "exact", "value": "bin/campaigns-os.mjs" }, "class": "cli_surface" },
63
+ { "match": { "kind": "exact", "value": "src/cli.mjs" }, "class": "cli_surface" },
64
+ { "match": { "kind": "exact", "value": "skills.json" }, "class": "skill" },
65
+ { "match": { "kind": "exact", "value": "skills.sh" }, "class": "skill" },
66
+ { "match": { "kind": "prefix", "value": "skills/" }, "class": "skill" },
67
+ { "match": { "kind": "exact", "value": "package.json" }, "class": "package_export" },
68
+ { "match": { "kind": "exact", "value": "package-lock.json" }, "class": "generated_runtime" },
69
+ {
70
+ "match": { "kind": "prefix", "value": "campaign-spec/" },
71
+ "exclude": [
72
+ { "kind": "prefix", "value": "campaign-spec/test/" },
73
+ { "kind": "prefix", "value": "campaign-spec/fixtures/" },
74
+ { "kind": "exact", "value": "campaign-spec/README.md" },
75
+ { "kind": "exact", "value": "campaign-spec/.npmignore" }
76
+ ],
77
+ "class": "generated_runtime"
78
+ },
79
+ { "match": { "kind": "prefix", "value": ".github/workflows/" }, "class": "workflow" },
80
+ { "match": { "kind": "exact", "value": "AGENTS.md" }, "class": "documentation" },
81
+ { "match": { "kind": "exact", "value": "CONTEXT.md" }, "class": "documentation" },
82
+ { "match": { "kind": "exact", "value": "docs/orientation-contract-reference.md" }, "class": "documentation" },
83
+ { "match": { "kind": "exact", "value": "docs/release-ledger-authoring-guide.md" }, "class": "documentation" }
84
+ ],
85
+ "_ignored_note": "Explicitly NOT agent-relevant. Every ignore carries a reason so 'no agent impact' is an asserted classification, not an omission. A changed path that matches no exemption, rule, derived surface entry, or ignore is an error (unclassified_path) — the classifier fails closed.",
86
+ "ignored": [
87
+ { "match": { "kind": "prefix", "value": "contracts/fixtures/" }, "reason": "Test fixtures. Consumer-facing fixtures reach the supported surface through contracts/supported-surface.json named[], which the derived pass classifies first." },
88
+ { "match": { "kind": "prefix", "value": "fixtures/" }, "reason": "Test fixtures." },
89
+ { "match": { "kind": "prefix", "value": "scripts/" }, "reason": "Repository checkers. Explicitly unsupported implementation (docs/supported-surface.md)." },
90
+ { "match": { "kind": "prefix", "value": "src/" }, "reason": "Implementation. Explicitly unsupported except through declared package exports, which package.json changes classify." },
91
+ { "match": { "kind": "prefix", "value": "campaign-spec/" }, "reason": "Tests, fixtures, and packaging metadata for the generated runtime. The runtime sources a consumer must rebuild are classified by the generated_runtime rule first; only that rule's exclusions reach here." },
92
+ { "match": { "kind": "prefix", "value": "examples/" }, "reason": "Illustrative, regenerated at will (docs/supported-surface.md)." },
93
+ { "match": { "kind": "prefix", "value": "prompts/" }, "reason": "Illustrative, regenerated at will (docs/supported-surface.md)." },
94
+ { "match": { "kind": "prefix", "value": "agents/" }, "reason": "Illustrative, regenerated at will (docs/supported-surface.md)." },
95
+ { "match": { "kind": "prefix", "value": "docs/adr/" }, "reason": "Architecture decision records: rationale, not a consumed contract." },
96
+ { "match": { "kind": "prefix", "value": "docs/" }, "reason": "Documentation that is not on the named supported surface and not an agent document of record. Named docs are classified by the derived pass first." },
97
+ { "match": { "kind": "exact", "value": "README.md" }, "reason": "Repository front page; the agent entry point is AGENTS.md." },
98
+ { "match": { "kind": "prefix", "value": "contracts/" }, "reason": "Internal build/QA contract data. Supported contract files are classified by explicit rules or the derived pass first." },
99
+ { "match": { "kind": "prefix", "value": ".github/" }, "reason": "Repository metadata other than workflows, which an explicit rule classifies first." },
100
+ { "match": { "kind": "exact", "value": ".gitignore" }, "reason": "Repository metadata." },
101
+ { "match": { "kind": "exact", "value": "LICENSE" }, "reason": "Licence text (Apache-2.0); governs use, not agent behaviour." },
102
+ { "match": { "kind": "exact", "value": "NOTICE" }, "reason": "Apache-2.0 attribution notice; governs use, not agent behaviour." },
103
+ { "match": { "kind": "prefix", "value": "." }, "reason": "Dotfile repository metadata." }
104
+ ],
105
+ "derived_from_supported_surface": {
106
+ "manifest": "contracts/supported-surface.json",
107
+ "hashed_class": "hashed_surface",
108
+ "named_class": "named_surface",
109
+ "_note": "Every path in hashed{} and named[] is agent-relevant by construction. Deriving this instead of copying the list is what keeps a newly declared surface entry from being born unclassified."
110
+ }
111
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "schema_version": "brand-theme-source-defaults/v0",
3
+ "producer": "figma-sections-export",
4
+ "producer_version": "v0",
5
+ "description": "Known scaffold defaults emitted by figma-sections-export new-section.sh. Matching these values is evidence of uncustomized source tokens, not brand truth.",
6
+ "core_tokens": [
7
+ "--brand-primary",
8
+ "--brand-secondary",
9
+ "--brand-accent",
10
+ "--surface-bg",
11
+ "--surface-card",
12
+ "--text-primary",
13
+ "--text-secondary",
14
+ "--text-inverse",
15
+ "--border-default"
16
+ ],
17
+ "tokens": {
18
+ "--brand-primary": "#0f75ff",
19
+ "--brand-secondary": "#edf2ff",
20
+ "--brand-accent": "#22c55e",
21
+ "--surface-bg": "#ffffff",
22
+ "--surface-card": "#f8faff",
23
+ "--surface-alt": "#f1f5ff",
24
+ "--text-primary": "#020b1e",
25
+ "--text-secondary": "#4a5568",
26
+ "--text-inverse": "#ffffff",
27
+ "--border-default": "#e2e8f0",
28
+ "--state-success": "#22c55e",
29
+ "--state-warning": "#f59e0b",
30
+ "--state-error": "#ef4444"
31
+ }
32
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "schema_version": "brand-theme-target-tokens/v0",
3
+ "target": "next-core",
4
+ "target_version": "v0",
5
+ "description": "Shared root custom-property target surface for Campaigns OS brand-theme.css generation. V0 generation must emit only these :root variables.",
6
+ "tokens": [
7
+ "--brand--color--primary",
8
+ "--brand--color--primary-dark",
9
+ "--brand--color--primary-light",
10
+ "--brand--color--primary-lighter",
11
+ "--brand--color--cta-primary",
12
+ "--brand--color--accent",
13
+ "--brand--color--secondary",
14
+ "--brand--color--background",
15
+ "--brand--color--surface",
16
+ "--brand--color--foreground",
17
+ "--brand--color--text-primary",
18
+ "--brand--color--text-secondary",
19
+ "--brand--color--text-inverse",
20
+ "--brand--color--border",
21
+ "--brand--color--primary-foreground",
22
+ "--brand--color--accent-foreground",
23
+ "--brand--color--cta-foreground",
24
+ "--brand--color--rating-star",
25
+ "--component--color--outline",
26
+ "--system-colors--success",
27
+ "--system-colors--destructive"
28
+ ],
29
+ "source_mappings": {
30
+ "--brand-primary": ["--brand--color--primary"],
31
+ "--brand-accent": ["--brand--color--accent"],
32
+ "--brand-secondary": ["--brand--color--secondary"],
33
+ "--surface-bg": ["--brand--color--background"],
34
+ "--surface-card": ["--brand--color--surface"],
35
+ "--text-primary": ["--brand--color--text-primary", "--brand--color--foreground"],
36
+ "--text-secondary": ["--brand--color--text-secondary"],
37
+ "--border-default": ["--brand--color--border", "--component--color--outline"],
38
+ "--rating-star": ["--brand--color--rating-star"],
39
+ "--state-success": ["--system-colors--success"],
40
+ "--ui-success": ["--system-colors--success"],
41
+ "--state-error": ["--system-colors--destructive"],
42
+ "--ui-danger": ["--system-colors--destructive"],
43
+ "--brand-cta": ["--brand--color--cta-primary"],
44
+ "--cta-primary": ["--brand--color--cta-primary"],
45
+ "--button-primary-bg": ["--brand--color--cta-primary"]
46
+ },
47
+ "derived_mappings": {
48
+ "--brand-primary": {
49
+ "--brand--color--primary-dark": { "method": "mix-black", "amount": 0.18 },
50
+ "--brand--color--primary-light": { "method": "mix-white", "amount": 0.2 },
51
+ "--brand--color--primary-lighter": { "method": "mix-white", "amount": 0.86 }
52
+ }
53
+ },
54
+ "foreground_derivations": {
55
+ "description": "Foreground/on-color tokens are derived from the luminance of the background they sit on, never copied blindly from a source --text-inverse token (which defaults to white and renders illegible on a light brand, e.g. white-on-yellow CTAs). Each foreground target picks the first paired background that was mapped and emits the readable choice from foreground_choices. next-core .button/.submit-button render their label with --brand--color--text-inverse, so text-inverse pairs with the CTA background first.",
56
+ "foreground_choices": { "dark": "#0a0a0a", "light": "#ffffff" },
57
+ "min_contrast_ratio": 4.5,
58
+ "derivations": {
59
+ "--brand--color--cta-foreground": ["--brand--color--cta-primary"],
60
+ "--brand--color--text-inverse": ["--brand--color--cta-primary", "--brand--color--primary"],
61
+ "--brand--color--primary-foreground": ["--brand--color--primary"],
62
+ "--brand--color--accent-foreground": ["--brand--color--accent"]
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "schema_version": "campaign-cart-checkout-field-contract/v0",
3
+ "provenance": {
4
+ "source": "NextCommerceCo/campaign-cart v0.4.36 docs/guides/reference/data-attributes.md and src/features/checkout/checkout-form/expiration-fields.ts",
5
+ "sdk_version": "0.4.36",
6
+ "captured_at": "2026-08-18"
7
+ },
8
+ "binding_attributes": ["data-next-checkout-field", "os-checkout-field"],
9
+ "canonical_fields": [
10
+ "email",
11
+ "phone",
12
+ "fname",
13
+ "lname",
14
+ "address1",
15
+ "address2",
16
+ "city",
17
+ "province",
18
+ "postal",
19
+ "country",
20
+ "cc-number",
21
+ "exp-month",
22
+ "exp-year",
23
+ "cvv",
24
+ "cc-name",
25
+ "coupon",
26
+ "payment-method",
27
+ "accepts_marketing"
28
+ ],
29
+ "accepted_aliases": {
30
+ "cc-month": "exp-month",
31
+ "cc-year": "exp-year"
32
+ },
33
+ "prefixes": ["billing-"],
34
+ "stale_aliases": {
35
+ "state": "province",
36
+ "region": "province",
37
+ "postal_code": "postal",
38
+ "zip": "postal",
39
+ "postcode": "postal",
40
+ "town": "city",
41
+ "first_name": "fname",
42
+ "last_name": "lname",
43
+ "street": "address1"
44
+ }
45
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "schema_version": "campaign-cart-sdk-support-policy/v0",
3
+ "provenance": {
4
+ "source": "NextCommerceCo/campaign-cart release tags",
5
+ "latest_known_release": "0.4.36",
6
+ "captured_at": "2026-08-18"
7
+ },
8
+ "source": "contracts/campaign-cart-sdk-support-policy.v0.json",
9
+ "minimum_supported": "0.4.20",
10
+ "preferred_minimum": "0.4.30"
11
+ }