Usage
/review <repo-key> --branch=<branch> [--workspace=<slug>]
/review <repo-path> --branch=<branch> --type=<tech-stack>
Arguments
repo-key: a key from the workspace config'sreposblock (e.g.,publisher-service)- OR
repo-path: absolute path to a repo (if not using workspace config)
Flags
| Flag | Required | Default | Description |
|------|----------|---------|-------------|
| --branch | yes | — | Feature branch to review (e.g., feature/contract-types) |
| --workspace | no | auto-detect | Workspace slug — used to find config for repo type |
| --type | no | from config | Override tech stack type (spring-boot, react, nextjs, nestjs, fastapi) |
| --base | no | main | Base branch to diff against |
Examples
/review publisher-service --branch=feature/contract-types
/review publisher-service --branch=feature/contract-types --workspace=my-platform
/review /path/to/repo --branch=feature/upload --type=spring-boot --base=develop
Instructions
Step 1: Resolve repo info
If repo-key is provided (no / in the argument):
- Read
{workspace_root}/{workspace}/config.json - Look up
repos[repo-key]→ getpath,type - If not found, report error and stop
If repo-path is provided (contains /):
- Use the path directly
--typeflag is required (no config to look it up from)
Step 2: Resolve reviewer agent
Use the TYPE_TO_AGENT mapping:
| type | Reviewer agent |
|--------|---------------|
| spring-boot | spring-boot-reviewer |
| react | react-reviewer |
| nextjs | nextjs-reviewer |
| nestjs | nestjs-reviewer |
| node-mock | (skip — mock not reviewed) |
| cdk | (skip — CDK verified by synth) |
| fastapi | (no dedicated reviewer yet — report this and skip) |
If the type has no reviewer, report "No reviewer agent for type '{type}'. Skipping." and exit cleanly.
Step 3: Pre-compute the diff (reviewers have no `Bash`)
Reviewer agents are granted Read, Glob, Grep, Write — no Bash — so they cannot run git diff themselves (Write exists solely for persisting a report file in the /deliver pipeline; their read-only-on-code rule plus the Step 5 backstop keeps the repo untouched). Pre-compute the diff to a file first; the helper prints only a byte-count, so the diff body never enters your context:
node {plugin_dir}/scripts/write-review-diff.js --worktree={repo_path} --base={base_branch} --out={diff_out}
{diff_out} = {workspace_root}/{workspace}/runs/review/{run_id}/{repo}.diff when a workspace is known, otherwise an OS temp path (e.g. {tmpdir}/pipecrew-review-{repo}-{branch-slug}.diff). The branch under review must be checked out in {repo_path} (or pass --base such that {base_branch}...HEAD is the intended comparison).
Step 4: Dispatch the reviewer
Tool: Agent
subagent_type: {reviewer-agent}
description: "Review — {repo-name} — {branch}"
prompt:
You are reviewing code in the repo at {repo_path}, branch {branch}.
Diff base: {base_branch}.
Read {repo_path}/AGENTS.md first for conventions (else legacy {repo_path}/CLAUDE.md).
Read the diff: it is pre-computed at {diff_out} (DIFF FILE) — Read that file;
it is the complete set of changes to review. You have no Bash and never run
git yourself; use Read/Glob/Grep over the repo for any surrounding context.
Review the diff against the repo's conventions and any OpenAPI spec
at {spec_file} (if applicable).
{include this block ONLY when a workspace is known (repo resolved via config in Step 1):}
RECIPE DETECTORS (workspace lint — Invariant 10; a missing or empty directory is a silent no-op):
{workspace_root}/{workspace}/context/recipes/ (run each applicable recipe's match pattern against the diff per your system prompt's recipe detector pass — load match metadata only, never a recipe's fix body)
Produce your full report in the Output Format from your system prompt.
In repo-path mode (no workspace config), omit the RECIPE DETECTORS block — the
recipes path cannot resolve, and the reviewer's recipe pass no-ops by design.
Step 5: Backstop + present the report
Read-only backstop: after the reviewer returns, run git -C {repo_path} status --porcelain. If non-empty, the reviewer mutated the repo (a read-only-on-code violation — its Write grant is for report files only, never the repo). Revert (git -C {repo_path} checkout -- . && git -C {repo_path} clean -fd, or git stash), and warn the user that a reviewer mutated the tree and a claude restart / plugin reinstall may be needed. The findings are still valid.
Show the reviewer's full report to the user (this standalone skill passes no REPORT FILE, so the reviewer returns the full report per its Report delivery rule). Highlight critical findings count.
If critical findings exist:
{N} critical findings. Run /deliver with a fix round, or fix manually.