---
name: release-manager
description: >
  Manage project releases, version bumping, changelog generation, and GitHub release creation using the docyrus release CLI.
  Handles SemVer versioning, changelog assembly (including Docyrus platform changes), git tagging, and optional GitHub release publishing.

**Triggers — use this skill when:**
- User says "release", "new version", "bump version", "tag release", "cut a release"
- User wants to publish, ship, or prepare a release
- User asks about the current version, release status, or unreleased changes
- User says "what's changed since last release"

**Covers:** Projects using the docyrus project plan system with package.json versioning.
---

# Release Manager

Manage releases using the `docyrus release` CLI commands.

## Quick Reference

### Check release status

```bash
docyrus release status --json
```

Returns: current version, latest git tag, unreleased commit count, and suggested bump type.

### Create a release (auto-detect bump)

```bash
docyrus release new-version
```

Automatically detects the bump type from commits:
- Breaking changes → **major**
- New features (`feat:`) → **minor**
- Fixes and other changes → **patch**

### Create a release with explicit bump

```bash
docyrus release new-version --bump minor
```

### Create a release with explicit version

```bash
docyrus release new-version --version 1.0.0
```

### Preview a release (dry run)

```bash
docyrus release new-version --bump minor --dryRun
```

Shows the changelog preview and version bump without committing any changes.

### Skip specific steps

```bash
docyrus release new-version --bump patch --skipGithubRelease
docyrus release new-version --bump minor --skipTag
docyrus release new-version --bump minor --skipChangelog
```

## Release Workflow

When `docyrus release new-version` runs, it performs these steps in order:

1. **Read current version** from `package.json`
2. **Extract commits** since the last git tag
3. **Detect bump type** (or use the provided one)
4. **Generate changelog** — categorizes commits into Added/Changed/Fixed/Removed/Security, plus Docyrus Platform changes
5. **Update CHANGELOG.md** — inserts new version section at the top
6. **Update package.json** — bumps the version number
7. **Update project-plan.json** — sets the `projectVersion` field
8. **Git commit** — `chore(release): vX.Y.Z`
9. **Git tag** — `vX.Y.Z`
10. **GitHub release** — creates a release via `gh release create` (requires `gh` CLI)

## Docyrus Platform Changes

The changelog generator automatically detects Docyrus backend modifications:

- New data sources, fields, and enums created via `docyrus studio`
- Data source architecture changes from `data-sources.plan.json`
- Knowledge graph updates

These appear under a **Docyrus Platform** section in the changelog.

## Version Initialization

When a project plan is first created, `package.json` is initialized to version `0.1.0`. Each phase and feature is stamped with the current `projectVersion` at creation time.

## After Release

After creating a release, consider:
- Pushing the commit and tag: `git push && git push --tags`
- Notifying the team about the new version
- If authenticated with Docyrus, the release record is automatically created in the platform
