@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,41 @@
1
+ {
2
+ "_note": "Versioned policy constants for bounded orientation reads. These are the ONLY authority for orientation size bounds — no checker, schema, doc, or test may carry its own literal. Exceeding any limit is a fail-closed refusal with stable reason code orientation_too_large; nothing is ever silently truncated. A measurement that is absent or non-finite counts as exceeded for the same reason. Raising a limit is a reviewed policy change that advances limits_version and owes a release-ledger entry.",
3
+ "schema": "campaigns-os-orientation-limits/v1",
4
+ "limits_version": "1.0.0",
5
+ "refusal_reason_code": "orientation_too_large",
6
+ "truncation_allowed": false,
7
+ "_measurement_note": "Every limit below is a WHOLE-ARTIFACT guardrail, measured over the complete changelog and the complete ledger at the target commit — not over a baseline-to-target window. That is deliberate and it is the conservative direction: a consumer's window is always a subset of the whole, so a whole-artifact read that fits also fits for any window inside it. It also means these bounds must be sized for the repository's whole life, not for one release cycle. scripts/orientation-contract.mjs maps each limit to exactly one measurement (LIMIT_MEASUREMENTS) and the contract-consistency check fails if this file declares a limit that nothing measures, or omits one that something does.",
8
+ "_growth_note": "Section count and ledger entries grow monotonically and are the two bounds that will eventually be reached. When they are, the answer is baseline rotation, not a quiet raise: archive the changelog sections and ledger entries older than a reviewed baseline into a dated archive file, declare that baseline as the new floor, and record the rotation as its own ledger entry. A consumer that cannot fit the remaining window adopts a newer reviewed baseline. Raising a bound is the fallback, and it advances limits_version.",
9
+ "limits": {
10
+ "max_source_bytes": {
11
+ "value": 1048576,
12
+ "unit": "bytes",
13
+ "applies_to": "The total bytes of orientation source read from Git objects at the target OID: the whole release ledger, the whole changelog, the supported-surface manifest, the orientation contract data files, and both orientation schemas — every mandatory read in the canonical sequence in AGENTS.md.",
14
+ "rationale": "1 MiB. Measured at surface 1.14.0 the whole set is about 88 KB, so this is roughly 12x current headroom while still bounding a single read to something a consumer can hold in memory and hash without streaming."
15
+ },
16
+ "max_section_count": {
17
+ "value": 1024,
18
+ "unit": "sections",
19
+ "applies_to": "The number of sections in CHANGELOG.md at the target commit.",
20
+ "rationale": "9 sections existed at surface 1.14.0 across roughly one month of releases. Because this bounds the whole file rather than a window, it has to survive years: 1024 is on the order of a decade at that cadence, and reaching it is the signal to rotate the baseline rather than to raise the number again."
21
+ },
22
+ "max_section_bytes": {
23
+ "value": 65536,
24
+ "unit": "bytes",
25
+ "applies_to": "The bytes of any single changelog section body.",
26
+ "rationale": "64 KiB. The largest section at surface 1.14.0 was 3.9 KB, so this is about 16x headroom. Unlike the counts this one does not accumulate — a single section larger than this is a drafting error, not a release worth orienting on in one read."
27
+ },
28
+ "max_envelope_bytes": {
29
+ "value": 262144,
30
+ "unit": "bytes",
31
+ "applies_to": "The serialized orientation envelope handed to the consumer. The real envelope is assembled by the consumer and never exists in this repository, so the repository-side check measures the largest assembled example it ships, contracts/fixtures/orientation/envelope/*.json.",
32
+ "rationale": "256 KiB. Roughly 64k tokens worst case, which keeps a full orientation read inside a model context budget with room for the session's own work. Deliberately smaller than max_source_bytes: the envelope is a selection of source, not a copy of it. The largest shipped example at surface 1.14.0 is about 4.5 KB."
33
+ },
34
+ "max_ledger_entries": {
35
+ "value": 1024,
36
+ "unit": "entries",
37
+ "applies_to": "The number of entries in contracts/release-ledger.json at the target commit.",
38
+ "rationale": "The ledger holds 1 entry at limits_version 1.0.0 and is append-only, so like max_section_count this accumulates for the life of the repository. 1024 is on the order of a decade at the observed release cadence; reaching it means rotating the baseline as described in _growth_note."
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,196 @@
1
+ {
2
+ "_note": "The stable reason-code vocabulary for campaigns-os-tooling-orientation/v1. This file is the single source: the schema enum in schemas/campaigns-os-tooling-orientation.v1.schema.json is checked against these keys exactly, and docs/orientation-contract-reference.md is GENERATED from here. Codes are append-only — a code may gain meaning text, but renaming, merging, or removing one is a breaking surface change. `owner` says which repository's test suite is obliged to exercise the code; a campaigns-os-owned code must have a test whose name contains its test_id in this repository.",
3
+ "schema": "campaigns-os-orientation-reason-codes/v1",
4
+ "vocabulary_version": "1.0.0",
5
+ "codes": {
6
+ "wrong_remote": {
7
+ "meaning": "The observed checkout's origin remote does not normalize to the expected owner/repository identity.",
8
+ "remedy": "Point the checkout at the expected remote, or supply a checkout whose origin matches the manifest's remote_identity. The refusal names the expected identity.",
9
+ "outcomes": ["refused"],
10
+ "owner": "campaigns-agent",
11
+ "test_id": "TP-D2-wrong-remote"
12
+ },
13
+ "dirty_checkout": {
14
+ "meaning": "The operator-supplied checkout has uncommitted worktree or index changes, so its bytes are not the bytes of any commit.",
15
+ "remedy": "Commit or stash the local changes, or run against a managed generation. Orientation never writes to an operator checkout to clean it.",
16
+ "outcomes": ["refused"],
17
+ "owner": "campaigns-agent",
18
+ "test_id": "TP-D4-dirty-checkout"
19
+ },
20
+ "detached_head": {
21
+ "meaning": "The checkout's HEAD is detached, so there is no branch to compare against the expected branch.",
22
+ "remedy": "Check out the expected branch, or declare the checkout managed so orientation supplies its own generation.",
23
+ "outcomes": ["refused"],
24
+ "owner": "campaigns-agent",
25
+ "test_id": "TP-D4-detached-head"
26
+ },
27
+ "missing_upstream": {
28
+ "meaning": "The checkout's current branch has no upstream tracking ref, so ahead/behind cannot be computed.",
29
+ "remedy": "Set the branch upstream to the expected remote branch, or use managed mode.",
30
+ "outcomes": ["refused"],
31
+ "owner": "campaigns-agent",
32
+ "test_id": "TP-D4-missing-upstream"
33
+ },
34
+ "ahead_of_upstream": {
35
+ "meaning": "The checkout carries commits the upstream default branch does not, so its contracts are not a published generation.",
36
+ "remedy": "Push or drop the local commits, or run against a managed generation at the published OID.",
37
+ "outcomes": ["refused"],
38
+ "owner": "campaigns-agent",
39
+ "test_id": "TP-D4-ahead-of-upstream"
40
+ },
41
+ "diverged_history": {
42
+ "meaning": "The checkout and the upstream default branch have diverged; neither is an ancestor of the other.",
43
+ "remedy": "Reconcile the branch with upstream by hand. Orientation refuses rather than choosing a side.",
44
+ "outcomes": ["refused"],
45
+ "owner": "campaigns-agent",
46
+ "test_id": "TP-D3-diverged-history"
47
+ },
48
+ "history_incomplete": {
49
+ "meaning": "The reviewed baseline commit or an entry's introducing commit is not reachable in the available history, typically a shallow clone.",
50
+ "remedy": "Deepen the clone to include the reviewed baseline, or adopt a newer reviewed baseline that is present.",
51
+ "outcomes": ["refused"],
52
+ "owner": "campaigns-agent",
53
+ "test_id": "TP-B2-shallow-history"
54
+ },
55
+ "fetch_failed": {
56
+ "meaning": "The bounded freshness fetch did not complete: offline, DNS failure, timeout, or authentication failure.",
57
+ "remedy": "Restore network access and rerun. The prior verified generation is left intact and no launch proceeds under strict-latest policy.",
58
+ "outcomes": ["freshness_unknown", "refused"],
59
+ "owner": "campaigns-agent",
60
+ "test_id": "TP-D2-fetch-failed"
61
+ },
62
+ "orientation_in_progress": {
63
+ "meaning": "Another process holds the orientation lock for this target.",
64
+ "remedy": "Wait for the holder named in the diagnostic to finish, or clear a stale lock after confirming its owner process is gone.",
65
+ "outcomes": ["refused"],
66
+ "owner": "campaigns-agent",
67
+ "test_id": "TP-D3-orientation-in-progress"
68
+ },
69
+ "pointer_race": {
70
+ "meaning": "The active generation pointer changed between read and compare-and-swap.",
71
+ "remedy": "Rerun. The transaction is safe to retry; the prior generation stays active until a swap succeeds.",
72
+ "outcomes": ["refused"],
73
+ "owner": "campaigns-agent",
74
+ "test_id": "TP-E2-pointer-race"
75
+ },
76
+ "orientation_incomplete": {
77
+ "meaning": "The target commit declares an agent-relevant change that no release-ledger entry covers, or a ledger entry that maps to no classified change and no reviewed amendment. The two-way release gate is not satisfied at that commit.",
78
+ "remedy": "At the target commit, add the missing ledger change item, or add a reviewed amendment entry. The refusal names the uncovered path or the orphaned change identity. Never weaken the classifier to pass.",
79
+ "outcomes": ["refused"],
80
+ "owner": "campaigns-os",
81
+ "test_id": "A1-orientation-incomplete"
82
+ },
83
+ "orientation_too_large": {
84
+ "meaning": "A declared limit in contracts/orientation-limits.v1.json was exceeded: source bytes, section count, section bytes, envelope bytes, or ledger entries.",
85
+ "remedy": "Adopt a newer reviewed baseline so the window is smaller, or raise the limit as a reviewed policy change that advances limits_version and carries its own ledger entry. Orientation refuses; it never truncates.",
86
+ "outcomes": ["refused"],
87
+ "owner": "campaigns-os",
88
+ "test_id": "A1-orientation-too-large"
89
+ },
90
+ "surface_incompatible": {
91
+ "meaning": "The target supported-surface version falls outside the consumer's accepted supported_surface_range.",
92
+ "remedy": "Upgrade the consumer to a build whose accepted range covers the target, or pin a reviewed baseline inside the current range.",
93
+ "outcomes": ["refused"],
94
+ "owner": "campaigns-agent",
95
+ "test_id": "TP-G-surface-incompatible"
96
+ },
97
+ "orientation_contract_missing": {
98
+ "meaning": "The target commit predates campaigns-os-tooling-orientation/v1 and carries no orientation contract, and it is not the one reviewed legacy baseline.",
99
+ "remedy": "Target a commit that ships the orientation contract, or declare the exact reviewed legacy baseline for the one-time attended migration path.",
100
+ "outcomes": ["refused"],
101
+ "owner": "campaigns-agent",
102
+ "test_id": "TP-G-orientation-contract-missing"
103
+ },
104
+ "checkout_missing": {
105
+ "meaning": "No checkout exists at the configured location and the mode does not authorize acquiring one.",
106
+ "remedy": "Supply the operator checkout at the configured path, or switch to managed mode so a generation can be acquired.",
107
+ "outcomes": ["refused"],
108
+ "owner": "campaigns-agent",
109
+ "test_id": "TP-D1-checkout-missing"
110
+ },
111
+ "checkout_acquisition_failed": {
112
+ "meaning": "Managed acquisition did not complete: interrupted clone, remote validation failure, or a broken linked-worktree backpointer. Partial state is quarantined, never exposed as ready.",
113
+ "remedy": "Rerun acquisition. If it fails repeatedly, inspect the quarantined partial named in the diagnostic and confirm remote reachability.",
114
+ "outcomes": ["refused"],
115
+ "owner": "campaigns-agent",
116
+ "test_id": "TP-D1-acquisition-failed"
117
+ },
118
+ "checkout_already_exists": {
119
+ "meaning": "The managed root reserved for acquisition appeared concurrently and is not an empty reservation this run owns.",
120
+ "remedy": "Rerun so the existing root is validated as a managed store, or remove the unexpected directory after confirming it holds no needed state.",
121
+ "outcomes": ["refused"],
122
+ "owner": "campaigns-agent",
123
+ "test_id": "TP-D1-checkout-already-exists"
124
+ },
125
+ "checkout_mutation_not_authorized": {
126
+ "meaning": "The requested action would write to an operator-supplied checkout, which is always inspect-only.",
127
+ "remedy": "Switch to managed mode, or perform the change yourself in the operator checkout. No flag grants this authority.",
128
+ "outcomes": ["refused"],
129
+ "owner": "campaigns-agent",
130
+ "test_id": "TP-D4-mutation-not-authorized"
131
+ },
132
+ "git_environment_unsafe": {
133
+ "meaning": "Ambient Git configuration could change command behavior: hooks, aliases, pagers, credential prompts, external diff or merge helpers, or filesystem monitors.",
134
+ "remedy": "Rerun through the supported launcher, which runs Git under an explicit environment and config allowlist. Do not disable the allowlist.",
135
+ "outcomes": ["refused"],
136
+ "owner": "campaigns-agent",
137
+ "test_id": "TP-D2-hostile-git-config"
138
+ },
139
+ "runtime_refresh_required": {
140
+ "meaning": "The generated runtime is absent or does not match its source fingerprint at the target commit.",
141
+ "remedy": "Let the launcher prepare a fresh generation, which runs the declared preparation recipe in isolation. Never rebuild in place over an active generation.",
142
+ "outcomes": ["restart_required", "refused"],
143
+ "owner": "campaigns-agent",
144
+ "test_id": "TP-E1-runtime-refresh-required"
145
+ },
146
+ "runtime_refresh_failed": {
147
+ "meaning": "The declared preparation recipe ran and did not produce a verifiable generated runtime.",
148
+ "remedy": "Read the recorded recipe output in the run evidence. The prior verified generation remains active and usable.",
149
+ "outcomes": ["refused"],
150
+ "owner": "campaigns-agent",
151
+ "test_id": "TP-E1-runtime-refresh-failed"
152
+ },
153
+ "runtime_commit_mismatch": {
154
+ "meaning": "Source, skills, and command-line bytes in the candidate generation do not all resolve to one commit.",
155
+ "remedy": "Discard the candidate generation and prepare a fresh one. A session is never bound to a mixed-commit generation.",
156
+ "outcomes": ["refused"],
157
+ "owner": "campaigns-agent",
158
+ "test_id": "TP-E2-runtime-commit-mismatch"
159
+ },
160
+ "transaction_incomplete": {
161
+ "meaning": "A prior promotion transaction was interrupted and its record cannot be reconciled to a safe terminal state.",
162
+ "remedy": "Inspect the promotion record named in the diagnostic. The prior verified generation stays active; no partial generation is promoted.",
163
+ "outcomes": ["refused"],
164
+ "owner": "campaigns-agent",
165
+ "test_id": "TP-E3-transaction-incomplete"
166
+ },
167
+ "transaction_reconciled": {
168
+ "meaning": "An interrupted promotion transaction was found and completed or rolled back deterministically on this run.",
169
+ "remedy": "None. This is an informational terminal state; the reconciliation outcome is recorded in run evidence.",
170
+ "outcomes": ["recovered_interrupted_update"],
171
+ "owner": "campaigns-agent",
172
+ "test_id": "TP-E3-transaction-reconciled"
173
+ },
174
+ "evidence_budget_exceeded": {
175
+ "meaning": "Bounded operator-state evidence storage would be exceeded by this run's records.",
176
+ "remedy": "Let retention prune, or raise the evidence budget as a reviewed policy change. Orientation refuses rather than launching a session it cannot audit.",
177
+ "outcomes": ["refused"],
178
+ "owner": "campaigns-agent",
179
+ "test_id": "TP-F-evidence-budget-exceeded"
180
+ },
181
+ "already_current": {
182
+ "meaning": "The verified target equals the active generation; nothing changed and no restart is required.",
183
+ "remedy": "None.",
184
+ "outcomes": ["current"],
185
+ "owner": "campaigns-agent",
186
+ "test_id": "TP-B3-already-current"
187
+ },
188
+ "orientation_rendered": {
189
+ "meaning": "A complete orientation envelope was assembled and rendered without mutating anything.",
190
+ "remedy": "None. Read the envelope's release_ledger and changelog groups to see what changed since the reviewed baseline.",
191
+ "outcomes": ["orientation_available", "updated", "restart_required", "legacy_baseline"],
192
+ "owner": "campaigns-agent",
193
+ "test_id": "TP-B3-orientation-rendered"
194
+ }
195
+ }
196
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "schema_version": "private-template-source/v0",
3
+ "sources": {
4
+ "arjuna": { "repo": "Sellmore-Co/adsbranded-templates", "contract_path": "contracts/arjuna.json" },
5
+ "karna": { "repo": "Sellmore-Co/adsbranded-templates", "contract_path": "contracts/karna.json" },
6
+ "limos": { "repo": "Sellmore-Co/adsbranded-templates", "contract_path": "contracts/limos.json" }
7
+ }
8
+ }