# Release Automation

[Docs index](../README.md) | [GitHub rules](./github-rules.md) | [Operations](../operations.md) | [Backlog](../backlog.md)

Kocteau uses Release Please for versioning, changelog updates, tags, and GitHub Releases.

This keeps release control with the maintainer while avoiding manual version and changelog work.

## Scope

The release surface is `apps/web`. A native mobile app is outside the current workspace.

## How It Works

1. Contributors open PRs with clear titles.
2. Maintainers squash merge with a conventional title.
3. Release Please watches `main`.
4. Release Please opens or updates a release PR.
5. The release PR updates the root and web `package.json` versions, `.release-please-manifest.json`, and `CHANGELOG.md`.
6. When the maintainer merges the release PR, Release Please creates the tag and GitHub Release.

Release Please requires GitHub Actions to be allowed to create pull requests. See `docs/maintainers/github-rules.md` for the repository setting.

## PR Title Inputs

Make sure user-facing web changes use clear conventional titles:

```text
feat(web): add saved review empty state
fix(web): prevent profile header overflow
docs: clarify contributor setup
chore(repo): update maintainer automation
```

## Release PR Review

Before merging a Release Please PR:

- Read the generated `CHANGELOG.md` section.
- Confirm the version bump matches the merged changes.
- Confirm the root `package.json`, `apps/web/package.json`, and `.release-please-manifest.json` match.
- Confirm CI passes.

Prefer fixing noisy PR titles before merge. Avoid hand-editing generated release PR files unless the generated output is clearly wrong.

## Post-Release Smoke Check

After deploy:

1. Open `/` while signed out and verify the redirect to `/home` (public canonical, indexable).
2. Sign in and confirm `/` loads the personalized, noindex For You feed. Visit `/home` while signed in and confirm the public landing still works.
3. Open search and confirm its return capsule goes to Feed at `/`. Verify `/feed` is a compatibility redirect.
4. Open a track page.
5. Open a profile page.
6. Check login/signup OTP flow only if auth changed.
7. Check Supabase recommendation/starter health only if data logic changed.

## Public App Changelog

The root `CHANGELOG.md` is the technical release history. The public `/help/changelog` page is separate and renders curated MDX notes from `apps/web/content/changelog`.

Use Release Please, GitHub Releases, and tags as the technical source of truth:

1. Merge the product work to `main`.
2. Let Release Please create the release PR.
3. Review the generated `CHANGELOG.md` section before merging.
4. Merge the release PR so Release Please creates the tag and GitHub Release.
5. The release workflow drafts a public MDX changelog note in `apps/web/content/changelog`.
6. The workflow opens a follow-up PR for the public changelog note.
7. Review the generated note, add screenshots or edits if useful, and merge when it is ready to publish.

The automation should save writing time, not remove maintainer taste. Public notes should describe what changed for listeners and writers; they should not expose raw commit language, implementation details, or internal maintenance work.

To draft the latest public note locally:

```bash
pnpm --filter web changelog:draft
```

The generated MDX includes an editorial prompt in a hidden comment so the note can be refined with any assistant later without making the app depend on a paid review bot.

## What Is Intentionally Not Automated Yet

- npm publishing
- Auto-merge for release PRs
- Production deploy promotion
