# Release policy

import { Callout } from "fumadocs-ui/components/callout";
import { Step, Steps } from "fumadocs-ui/components/steps";
import { Badge } from "@pycolors/ui";
import {
  GitBranch,
  History,
  Layers3,
  LayoutTemplate,
  Map,
  PackageCheck,
  RefreshCcw,
  ShieldCheck,
  Sparkles,
  TriangleAlert,
  Wrench,
} from "lucide-react";

import { DocsConceptTabs } from "@/components/docs/docs-concept-tabs";
import { DocsDecisionGrid } from "@/components/docs/docs-decision-grid";
import { DocsFeatureGrid } from "@/components/docs/docs-feature-grid";
import { DocsLinks } from "@/components/docs/docs-links";

<div className="flex flex-wrap items-center gap-2">
  <Badge variant="outline">
    Reference
  </Badge>

  <Badge>
    Release policy
  </Badge>
</div>

## How PyColors ships

PyColors is designed to move fast **without becoming unstable**.

The release model separates two things that often get mixed together:

* **packages** → technical versioning
* **ecosystem** → product progress

That separation lets PyColors publish precise package updates while communicating product progress in a way customers and developers can understand.

<Callout title="Core idea">
  Packages follow technical truth. The ecosystem communicates product momentum.
</Callout>

## Release model

<DocsFeatureGrid
  columns={2}
  tone="platform"
  items={[
  {
    title: 'Packages',
    description:
      'Public packages use Semantic Versioning and Changesets so technical changes stay precise, traceable, and safe to consume.',
    icon: PackageCheck,
  },
  {
    title: 'Ecosystem',
    description:
      'Weekly releases communicate progress across UI, starters, templates, docs, patterns, and platform layers.',
    icon: Sparkles,
  },
]}
/>

### Package versioning

Public packages such as `@pycolors/ui`, `@pycolors/tokens`, and shared configuration packages follow **Semantic Versioning**.

```txt title="semver.txt"
MAJOR → breaking changes
MINOR → new features, backward compatible
PATCH → fixes and small improvements
```

Examples:

```txt title="examples.txt"
1.0.3 → bug fixes
1.1.0 → new components or backward-compatible features
2.0.0 → breaking changes
```

<DocsConceptTabs
  items={[
  {
    value: 'Patch',
    title: 'Patch release',
    icon: Wrench,
    description: (
      <>
        <p>
          Use for bug fixes, documentation fixes, small polish, dependency-safe maintenance, and internal improvements that do not change the public API.
        </p>

        <div className="mt-4 flex flex-wrap gap-2">
          <Badge variant="outline">Bug fixes</Badge>
          <Badge variant="outline">Docs fixes</Badge>
          <Badge variant="outline">Small polish</Badge>
          <Badge variant="outline">Safe maintenance</Badge>
        </div>
      </>
    ),
  },
  {
    value: 'Minor',
    title: 'Minor release',
    icon: Sparkles,
    description: (
      <>
        <p>
          Use for new components, new APIs, new exports, new examples, or backward-compatible product additions.
        </p>

        <div className="mt-4 flex flex-wrap gap-2">
          <Badge variant="outline">New components</Badge>
          <Badge variant="outline">New exports</Badge>
          <Badge variant="outline">New APIs</Badge>
          <Badge variant="outline">Backward compatible</Badge>
        </div>
      </>
    ),
  },
  {
    value: 'Major',
    title: 'Major release',
    icon: TriangleAlert,
    description: (
      <>
        <p>
          Use for breaking API changes, removed exports, migration-required behavior, or incompatible design system updates.
        </p>

        <div className="mt-4 flex flex-wrap gap-2">
          <Badge variant="outline">Breaking changes</Badge>
          <Badge variant="outline">Removed exports</Badge>
          <Badge variant="outline">Migration required</Badge>
          <Badge variant="outline">Incompatible behavior</Badge>
        </div>
      </>
    ),
  },
]}
/>

### Source of truth

Release information is split by audience and purpose.

| Surface         | Purpose                                            |
| --------------- | -------------------------------------------------- |
| GitHub Releases | Technical release details                          |
| `CHANGELOG.md`  | Package-level changes generated through Changesets |
| `/changelog`    | Weekly ecosystem updates                           |
| `/roadmap`      | Product direction and upcoming work                |

<Callout type="info" title="Why this split matters">
  Developers need precise technical changes. Customers need clear product progress. PyColors keeps both visible without mixing them.
</Callout>

## Ecosystem releases

The website communicates a weekly release cadence.

This includes updates across:

* PyColors UI
* PyColors Tokens
* Starter Free
* Starter Pro
* templates
* documentation
* patterns
* marketing pages
* platform and delivery layers

Packages ship when they are ready.

The ecosystem ships as a clear product narrative.

> Technical truth stays precise. Product progress stays understandable.

## Changesets workflow

All package releases follow the same operational model.

<Steps>
  <Step>
    ### Make changes in the monorepo

    Development happens in the core PyColors monorepo where packages, apps, templates, docs, and shared configuration evolve together.
  </Step>

  <Step>
    ### Add a changeset

    Each package-level change gets a changeset with the correct release type: patch, minor, or major.
  </Step>

  <Step>
    ### Merge to main

    Changes are reviewed and merged through the normal repository workflow.
  </Step>

  <Step>
    ### Version and changelog are updated

    CI updates package versions and generates package-level changelog entries.
  </Step>

  <Step>
    ### Publish and release

    CI publishes packages and creates GitHub Releases where relevant.
  </Step>
</Steps>

### Non-negotiables

These rules keep releases predictable.

<DocsDecisionGrid
  columns={2}
  items={[
  {
    eyebrow: 'Technical rules',
    title: 'Keep package releases precise',
    icon: ShieldCheck,
    description:
      'Technical release surfaces should remain reliable, traceable, and safe for developers consuming PyColors packages.',
    items: [
      'development happens in the core monorepo',
      'public repositories are distribution surfaces',
      'public packages use Changesets',
      'breaking changes require major versions',
      'GitHub Releases remain technical truth',
    ],
  },
  {
    eyebrow: 'Product rules',
    title: 'Keep ecosystem progress readable',
    icon: RefreshCcw,
    tone: 'pro',
    description:
      'Product communication should make progress clear without exposing private operational details.',
    items: [
      'the website reflects product progress',
      'weekly releases explain ecosystem movement',
      'changelog entries stay readable',
      'roadmap updates stay transparent',
      'internal secrets and CI details are not exposed',
    ],
  },
]}
/>

## Why this approach

Most projects fall into one of two release problems:

* releases are too slow, so the product feels inactive
* releases are too chaotic, so users lose trust

PyColors balances both:

* fast technical iteration at the package level
* predictable communication at the ecosystem level

This creates a release rhythm that supports both developer confidence and commercial trust.

### What this guarantees

This policy is designed to provide:

* predictable updates
* clear versioning
* no hidden breaking changes
* visible product progress
* traceable package history
* separation between technical truth and product narrative

<Callout title="Trust principle">
  A premium developer product should not only ship frequently. It should make progress easy to understand.
</Callout>

## Public vs internal

The release model is public on purpose.

<DocsDecisionGrid
  columns={2}
  items={[
  {
    eyebrow: 'Public',
    title: 'Visible release information',
    icon: History,
    description:
      'Public release surfaces help customers and developers understand what changed and where the ecosystem is going.',
    items: [
      'package versions',
      'changelog entries',
      'GitHub Releases',
      'roadmap progress',
      'weekly ecosystem updates',
    ],
  },
  {
    eyebrow: 'Internal',
    title: 'Private operational details',
    icon: GitBranch,
    description:
      'Operational internals remain private so release communication stays useful without exposing sensitive implementation details.',
    items: [
      'CI secrets',
      'deployment credentials',
      'infrastructure internals',
      'private operational workflows',
    ],
  },
]}
/>

### Mental model

> Packages move with technical precision.
> The ecosystem moves with product clarity.

## Related

<DocsLinks
  variant="grid"
  tone="platform"
  items={[
  {
    title: 'Changelog',
    href: '/changelog',
    description:
      'Follow weekly ecosystem updates across PyColors.',
    icon: History,
  },
  {
    title: 'Roadmap',
    href: '/roadmap',
    description:
      'See what is planned next across the ecosystem.',
    icon: Map,
  },
  {
    title: 'UI docs',
    href: '/docs/ui',
    description:
      'Explore PyColors UI components and design system foundations.',
    icon: LayoutTemplate,
  },
  {
    title: 'Starters',
    href: '/starters',
    description:
      'Compare Starter Free and Starter Pro foundations.',
    icon: Layers3,
  },
]}
/>