---
name: devxkit-release
description: Plan and publish reviewed releases through the governed devxkit git + gh workflow.
scope: global
devxkit_commands:
  - devxkit release plan
  - devxkit release create
---

# devxkit release

## When to use

- A release commit has been prepared, reviewed, and merged to `main`
- Version source, `CHANGELOG.md`, and `releases/vX.Y.Z.md` are already committed
- A human wants a read-only readiness plan or explicitly authorizes publication

GitHub MCP is not the release publisher. `devxkit release` governs the bounded
`git + gh` publication sequence.

## Human workflow

1. Prepare source/version changes.
2. Prepare `releases/vX.Y.Z.md` and `CHANGELOG.md`.
3. Review and merge the final preparation commit to `main`.
4. Update local `main` so `HEAD == origin/main` and keep the tree clean.
5. Run `devxkit release plan --version X.Y.Z`.
6. Review blockers, warnings, tag state, notes, and planned operations.
7. Run `devxkit release create --version X.Y.Z --dry-run`.
8. Obtain explicit human approval for real publication.
9. Run `devxkit release create --version X.Y.Z --yes`.
10. Verify with `gh release view vX.Y.Z`.
11. Perform branch cleanup separately after release verification.

## Safety contract

- `plan` and `create --dry-run` are read-only.
- Real publication requires `--yes`; agents must not pass it autonomously.
- Publication is allowed only from clean, synchronized `main` with reviewed notes.
- The mutator creates an annotated tag, pushes only that tag, then uses
  `gh release create --verify-tag`.
- Existing tags at another commit block publication; tags are never forced or
  deleted automatically.
- If the remote tag is already at the expected HEAD and the GitHub Release is
  missing, rerun safely: only the GitHub Release is created.
- The command does not edit or commit version files, release notes, or changelog.

## Commands

```bash
devxkit release plan --version 0.3.0
devxkit release create --version 0.3.0 --dry-run
# Human-only after explicit approval:
devxkit release create --version 0.3.0 --yes
gh release view v0.3.0
```

## Stop conditions

- Stop on any blocker or tag conflict.
- Do not bypass the `main`, clean-tree, origin parity, or reviewed-notes guards.
- Do not use GitHub MCP, force-push, delete tags, or create follow-up commits
  after tagging.
