Captain review

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

Captain review is an AI agent skill from the GitHub repository the-agency-ai/the-agency. Captain-only. Review all draft PRs (or a specified PR / project) and generate per-workstream dispatch files routing findings to worktree agents. Formerly `/captain-review` v1 — v2 migration preserves semantics.

How to use this skill

Skill file

<!--

Flag #62/#63: allowed-tools removed. Inherits Bash(*) from

.claude/settings.json. Restricting to specific subcommand patterns at the

skill level silently blocks agents on permission prompts the agent cannot

see — see dispatch #171 for the devex incident that surfaced this trap.

-->

Captain Review

Captain-only multi-PR review pass. For each draft PR in scope, invoke /code-review and materialize the findings as a dispatch file under the owning workstream so the worktree agent picks up the review as part of its normal dispatch flow.

Why this exists

Draft PRs accumulate. A worktree agent cannot self-review their own open work with the captain's fleet-wide lens, and posting review comments directly on each PR floods worktree agents with low-signal noise when the same findings could be routed as a single coherent dispatch.

This skill:

The boundary is deliberate: this is a captain-side triage pass, not a gate. Boundary gates with the fix cycle live in /iteration-complete, /phase-complete, and /pr-prep.

Required reading

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

Usage

/captain-review                    # fleet-wide (all open draft PRs)
/captain-review --all              # same as above, explicit
/captain-review 123                # single PR by number
/captain-review mdpal              # all draft PRs on the mdpal project

Preconditions

  1. You are the captain on the main checkout (master). This skill is scoped to the captain family — paths: [] keeps it out of worktree autocomplete and the captain-family name signals scope. The captain must verify main-checkout/master before running; this skill has no Step-1 runtime refuse-from-wrong-context check yet (follow-up tracked). Do not run from a worktree.
  2. gh is authenticated against the repo's origin.
  3. Working tree is clean or contains only coordination-artifact edits — this skill writes dispatch files and commits them, so incidental code changes would be swept into the coord commit.
  4. /code-review is available (Batch 4 v2 skill).

Flow / Steps

Step 1: Identify PRs to review

Resolve $ARGUMENTS:

If the scope resolves to zero PRs, stop and report "no draft PRs in scope" — do not emit empty dispatch files.

Step 2: Review each PR

For each PR in scope, invoke /code-review via the Skill tool with the PR number. /code-review handles the 7-agent confidence-scored local review; this skill does not re-implement it.

Step 3: Generate dispatch files

For each workstream that produced findings, create a dispatch file at:

agency/workstreams/{workstream}/code-reviews/{workstream}-dispatch-{YYYYMMDD-HHMM}.md

Contents:

The workstream is derived from the PR branch name (segment before /).

Step 4: Present dispatch report

Show a summary table of all reviews performed this pass:

Captain Review Complete:

Project          PR    Findings   Dispatch
─────────────────────────────────────────────
mdpal            #12   8 issues   agency/workstreams/mdpal/code-reviews/mdpal-dispatch-20260401-1430.md
mock-and-mark    #15   3 issues   agency/workstreams/mock-and-mark/code-reviews/mock-and-mark-dispatch-20260401-1430.md

Step 5: Commit review and dispatch files

Stage and commit the review and dispatch files as coordination artifacts via /git-safe-commit --force (or /coord-commit if the caller prefers the wrapper). These are coordination artifacts — not application code — so the commit does not route through the full QG.

Failure modes

What this does NOT do

Status

active (v2 migrated from v1 in the sister-repo v1→v2 Batch 8+9 captain cluster). Surface preserved from v1; behavior identical. Composes /code-review + dispatch file emission + coord commit.

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.