/wbRelease — Exhaustive Simulation ()
/wbRelease is the release engineer. Its job is monorepo-wide version coordination — bumping versions across packages that depend on each other, generating changelogs, creating git tags, and producing the release commit. It does not publish to npm (that's /wbPublish), does not deploy apps (that's /wbDeploy). It coordinates the version state of the repository.
Read this if you want to know how the four flags compose, why --restore exists, and where release coordination ends and the actual ship operations begin.
1. Role & target
| Aspect | Behavior |
|---|---|
| Role | The Release Engineer — version coordination across packages. |
| Target | The whole monorepo (default), or a specific package via free-text/path. |
| Cell scope | None directly. |
| Side effects allowed | Editing package.json files (version bumps); generating CHANGELOG.md entries; creating git tags (via /wbGit -A chaining or direct git invocation under explicit user gate); producing release notes. |
| Side effects forbidden | Publishing to npm; deploying apps; modifying source code beyond version fields; running tests (that's /wbTest). |
The "doesn't publish, doesn't deploy" rule is what keeps the seam clean. The full release flow is: /wbRelease (versions + tags) → /wbPublish (npm) → /wbDeploy (apps). Three commands, three concerns, three checkpoints. Compressing them into one command is tempting but loses the per-step rollback story.
2. Argument resolution matrix
| Form | Example | What /wbRelease does |
|---|---|---|
| No argument | Command: /wbRelease | Coordinates a release across all packages with changes since the last release. |
| Specific package | Command: /wbRelease core2/packages/wb-core | Releases just one package. Cascades version bumps to dependents. |
--restore | Command: /wbRelease --restore | Reverts the most recent in-progress release if it was halted partway (uncommitted version bumps, half-tagged state). |
3. Flag matrix
| Flag | Shortcut | Purpose |
|---|---|---|
--dry-run | -d | Plans the release; doesn't write. Reports what versions would bump, what changelog entries would be added, what tags would be created. |
--prerelease | -p | Releases as 1.2.3-beta.0 (or -rc, -alpha) instead of 1.2.3. Useful for pre-release stabilization. |
--restore | -r | Recover from a halted in-progress release. Reverts version bumps and any partial tags. |
--tag="<name>" | -t | Custom tag name override (default: v<version>). Rare; for projects with non-standard tag conventions. |
How the four flags compose
| Combination | Result |
|---|---|
--dry-run alone | Full report, no writes. |
--prerelease alone | Pre-release version bump committed + tagged. |
--prerelease --dry-run | Pre-release planned, no writes. |
--restore alone | Recovery; not a normal release shape. |
--tag="custom" | Override tag name only; everything else normal. |
--restore is incompatible with the others. If --restore is present, the agent ignores -d/-p/-t and runs recovery mode.
4. Pipelines (the agent-native scenarios)
/wbRelease --dry-run> /wbRelease --dry-run💠 Pipeline The dry-run first (always)
💠 Pipeline The actual release
💠 Pipeline The pre-release
💠 Pipeline The --restore recovery
A /wbRelease run was interrupted (Ctrl-C, network error, terminal closed) after some package.json edits but before tagging. The state is messy. --restore undoes it:
5. Edge cases & refusals
| Trigger | What /wbRelease does |
|---|---|
| Working tree dirty | Halt. Releases require a clean tree. |
| Not on main branch | Halt. |
--restore with no in-progress state | Honest "nothing to restore." Exit 0. |
Conflict between --restore and other flags | --restore wins; others ignored with notice. |
| No commits since last tag | Halt — nothing to release. |
| All commits are chore-only | Halt — chore-only commits don't trigger release. Suggests --prerelease if explicitly desired. |
| Cross-package dependency cycle (rare) | Halt. The version cascade can't resolve cycles deterministically. |
--tag="<name>" that already exists | Halt — won't overwrite tags. |
/wbRelease while another release is in progress (mid-run elsewhere) | Halt — single-release-at-a-time. |
The pattern: /wbRelease is version coordination, not shipping. It refuses dirty trees, refuses to push tags or publish, treats --restore as a recovery primitive, and stays narrow on its responsibility (versions + tags + changelog). The full ship flow is /wbRelease → /wbPublish → /wbDeploy — each command its own gate, each its own concern.
