Captain release

From the-agency-ai/the-agency · View interactive version

Captain release is an AI agent skill from the GitHub repository the-agency-ai/the-agency. Captain-only. Quality-check, commit, push, create PR, and cut a release in one flow. The "code is ready" command for captain-owned branches. Every PR is a release. Formerly `/release` — v2 rename to captain-actor-verb.

How to use this skill

Skill file

<!--

allowed-tools omitted — inherits Bash(*). This skill composes many

tools (commit-precheck, git-safe-commit, git-push, pr-create, Edit,

Read for manifest.json) plus Skill invocations (/pr-prep, /git-safe-commit).

Inherit Bash(*) rather than enumerate at subcommand level (flag #62/#63

/ devex dispatch #171).

-->

captain-release

Captain's one-flow release command for captain-owned branches (captain-*). Runs quality-check → commit → push → create PR → version-bump → summary. Every PR is a release.

Name pattern: captain- actor prefix (captain-only), release verb. Grouped with captain-log, captain-review in the captain family.

Why this exists

When captain has staged coordination work (a framework fix, a refactor, a doc update) on a captain-* branch, that work needs to land as a PR with proper QG + release tagging + version bump. Without one cohesive command, each step gets skipped or done out of order. captain-release bundles the full flow.

Agents use a different path: /pr-submit → captain's /pr-captain-land. That's the agent-owned-work flow. captain-release is for captain-owned work (framework fixes, REFERENCE doc updates, captain-* coord artifacts).

Required reading

Before proceeding, Read the files listed in required_reading: frontmatter.

Usage

/captain-release <commit description>
/captain-release --no-push <description>
/captain-release --no-pr <description>

Preconditions

Flow / Steps

Step 1: Pre-flight

  1. Check current branch. If master, abort.
  2. Show git status + git diff --stat HEAD.
  3. If no changes, inform user and stop.
  4. Check for pending post-merge (C#372 Fix B). Run ./agency/tools/post-merge-state check. If exit 1, STOP — a prior PR is in pending-post-merge state (merged but release not yet cut). Run /pr-captain-post-merge <pending-PR> first, then re-invoke this skill. A release cannot start while the last release is incomplete. Exit 0 → continue.

Step 2: Quality gate

Run ./agency/tools/commit-precheck. Verify formatting, linting, tests pass. If fails, stop and report.

Step 3: Commit

Invoke /git-safe-commit with the commit description from <arguments>. Produces a commit on the captain-* branch.

Step 4: Push (unless `--no-push`)

  1. Show commits that will be pushed.
  2. Ask for confirmation.
  3. ./agency/tools/git-push --force-with-lease <branch>.

Step 5: PR (unless `--no-pr` and push happened)

  1. Check if PR exists: gh pr view <branch>.
  2. If exists: report URL.
  3. If not: ./agency/tools/pr-create --title "..." --body "...".

Never raw gh pr create. The pr-create tool validates a QGR receipt before allowing PR creation.

Step 6: Version bump

  1. Parse PR title for release version (D#-R# → version #.# OR agency_version increment).
  2. Update agency/config/manifest.json: bump appropriate version field + updated_at.
  3. Commit the bump via /git-safe-commit --no-work-item.
  4. Push: ./agency/tools/git-push <branch>.

Step 7: Summary

Release complete:
  Committed: <commit-hash> <message>
  Version: <old> → <new>
  Pushed: origin/<branch>
  PR: <url> (or skipped)
  Post-merge: run /pr-captain-post-merge after PR merges on GitHub

Failure modes

What this does NOT do

Captain-only — three-layer defense

  1. paths: [] — no file-path auto-activation; universally discoverable for the captain but scoped out of worktree contexts.
  2. Name contains captain- — scope visible in listing.
  3. Step 1 precondition — captain must be on a captain-* branch, not master or agent branch.

(Historically disable-model-invocation: true was a fourth layer. That flag was removed 2026-04-20 because the captain session IS the principal's session — DMI was blocking the captain from invoking captain-* skills. See REFERENCE-SKILL-CONVENTIONS.md §1.)

Status

active (v2, refactored from legacy release 2026-04-19).

Related

OFFENDERS WILL BE FED TO THE — CUTE — ATTACK KITTENS!

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.