var n=Object.defineProperty;var o=(t)=>t;function i(t,s){this[t]=o.bind(null,s)}var m=(t,s)=>{for(var r in s)n(t,r,{get:s[r],enumerable:!0,configurable:!0,set:i.bind(s,r)})};var h=(t,s)=>()=>(t&&(s=t(t=0)),s);import{CodeBlock as c}from"@contractspec/lib.design-system";import l from"@contractspec/lib.ui-link";import{ChevronRight as d}from"lucide-react";import{jsx as e,jsxs as a}from"react/jsx-runtime";var u=["root `README.md` and generated root `AGENTS.md` inputs when contributor or operator workflow changes","the nearest package `README.md` and `AGENTS.md` for any touched public package surface","website docs and `/llms*` summaries when the release changes how users or contributors should work"];function v(){return a("div",{className:"space-y-8",children:[a("div",{className:"space-y-3",children:[e("h1",{className:"font-bold text-4xl",children:"Author release capsules"}),e("p",{className:"text-lg text-muted-foreground",children:"Pair each publishable changeset with a structured release capsule so changelog, upgrade, and docs surfaces all read from the same release source of truth."})]}),a("div",{className:"card-subtle space-y-4 p-6",children:[e("h2",{className:"font-bold text-2xl",children:"What you'll build"}),a("ul",{className:"space-y-2 text-muted-foreground text-sm",children:[a("li",{children:["A ",e("code",{children:".changeset/<slug>.md"})," file for package/version intent."]}),a("li",{children:["A ",e("code",{children:".changeset/<slug>.release.yaml"})," companion for audiences, migrations, validation, and evidence."]}),e("li",{children:"Generated release artifacts that the website changelog and upgrade flows can consume safely."})]})]}),a("div",{className:"space-y-6",children:[a("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"1) Create the paired changeset files"}),e("p",{className:"text-muted-foreground text-sm",children:"The Markdown file states the package bumps and reader-facing change intent. The YAML file carries the structured release metadata."}),e(c,{language:"yaml",filename:".changeset/contract-dx-first-slice.release.yaml",code:`schemaVersion: "1"
slug: contract-dx-first-slice
summary: Improve app-config, theme, and feature authoring with explicit validation and shared setup alignment.
isBreaking: false
packages:
  - name: "@contractspec/lib.contracts-spec"
    releaseType: minor
validation:
  commands:
    - "cd packages/libs/contracts-spec && bun run test && bun run typecheck"
  evidence:
    - "Package-level validation entrypoints now back setup, docs, and CLI authoring flows."`}),e("p",{className:"text-muted-foreground text-sm",children:"Expected output: every publishable slug has both the human-facing changeset and the structured release capsule beside it."})]}),a("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"2) Use the release authoring commands instead of raw drift-prone edits"}),e(c,{language:"bash",filename:"release-authoring",code:`contractspec release init --summary "Improve app-config, theme, and feature authoring"

# Or revise an existing capsule with the guided flow
contractspec release edit contract-dx-first-slice`}),e("p",{className:"text-muted-foreground text-sm",children:"Expected output: the CLI scaffolds or revises the paired files with the current release schema instead of leaving maintainers to hand-roll YAML structure."})]}),a("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"3) Build the generated release artifacts before consuming them"}),e(c,{language:"bash",filename:"release-build",code:"contractspec release build"}),e("p",{className:"text-muted-foreground text-sm",children:"Expected output: `generated/releases/manifest.json`, `generated/releases/upgrade-manifest.json`, and the related customer/maintainer guidance files are refreshed from the release capsules."})]}),a("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"4) Enforce completeness before publishing or building the changelog"}),e(c,{language:"bash",filename:"release-check",code:"contractspec release check --strict"}),e("p",{className:"text-muted-foreground text-sm",children:"Expected output: missing capsules, incomplete migration guidance, or stale generated release artifacts are flagged before the website changelog or publish workflow treats the release data as canonical."})]}),a("div",{className:"card-subtle space-y-3 p-6",children:[e("h3",{className:"font-semibold text-lg",children:"5) Sync the public docs if workflow expectations changed"}),e("ul",{className:"space-y-2 text-muted-foreground text-sm",children:u.map((t)=>e("li",{children:t},t))})]})]}),a("div",{className:"flex items-center gap-4 pt-4",children:[a(l,{href:"/docs/guides/connect-in-a-repo",className:"btn-primary",children:["Connect guide ",e(d,{size:16})]}),e(l,{href:"/changelog",className:"btn-ghost",children:"Website changelog"})]})]})}export{v as GuideReleaseCapsulesPage};
