From preflight
Dispatch a code review and orchestrate the review loop. This command creates (or resumes) a Preflight review for the current repository, launches a background review agent to discuss changes with the human reviewer, and implements requested changes across revision cycles until the review is closed.
npx claudepluginhub winstanley-industries/preflight --plugin preflight# /review Dispatch a code review and orchestrate the review loop. This command creates (or resumes) a Preflight review for the current repository, launches a background review agent to discuss changes with the human reviewer, and implements requested changes across revision cycles until the review is closed. ## Step 1: Find or create a review 1. Determine the review scope by running `git log --oneline main..HEAD` (or `master..HEAD`) to understand what commits are on the current branch. If the branch has diverged from the default branch, pass the default branch name as `base_ref`. 2. Run ...
/reviewInvokes external AI CLIs (Gemini, Claude, Codex, OpenCode, Qwen, Cursor) to peer review specified phase plans, producing structured REVIEWS.md with feedback.
/reviewReviews staged changes or recent commits across five axes—correctness, readability, architecture, security, performance—producing categorized findings with file:line references and fixes.
/reviewRuns Codex code review on local git state (working tree or vs base branch). Supports --wait/--background, --base <ref>, --scope auto|working-tree|branch.
/reviewOrchestrates multi-LLM code review across Codex, Gemini, Claude, Perplexity, and others; checks provider availability and posts inline PR comments.
/reviewReviews HTML file for design anti-patterns, principles violations, and accessibility issues. Generates markdown report with status tables and recommendations.
/reviewReviews specified code scope via four specialists (quality, security, performance, architecture), producing summary, detailed findings, refactoring suggestions, prioritized action plan.
Share bugs, ideas, or general feedback.
Dispatch a code review and orchestrate the review loop. This command creates (or resumes) a Preflight review for the current repository, launches a background review agent to discuss changes with the human reviewer, and implements requested changes across revision cycles until the review is closed.
git log --oneline main..HEAD (or master..HEAD) to understand what commits are on the current branch. If the branch has diverged from the default branch, pass the default branch name as base_ref.git status to check for untracked files. If any appear relevant to the changes being reviewed (new source files, config files — not temp/build artifacts), ask the user whether they should be staged. Stage approved files before creating the review so it includes the complete set of changes from the start.find_or_create_review via the preflight MCP server with:
repo_path: the absolute path to the current git repositorytitle: a short summary derived from the recent changes (optional)base_ref: the base branch or ref to diff against (optional — if omitted, the server auto-detects the merge-base with the default branch)
This will return an existing open review for the repo if one exists, or create a new one.review_id.get_review with the review_id to retrieve the full review metadata and list of changed files.changed_files summary string listing each file path and its change type (added, modified, deleted). This will be passed to the review agent for context.If review creation fails, inform the user with the error details and stop.
Ask the user if they'd like you to annotate non-trivial changes with explanations before the reviewer begins.
If the user agrees, annotations will run concurrently with the review agent (see Step 2). Prepare the annotation work now:
changed_files list. Skip lock files, generated files (e.g., package-lock.json, Cargo.lock), and straightforward changes (simple renames, import additions, etc.).git diff main -- <file> or Read when you need additional context (e.g., resuming a review you didn't implement, or changes made earlier in the conversation that have fallen out of context).create_thread via the preflight MCP server with:
review_id: the current review IDfile_path: the file being annotatedline_start / line_end: the relevant line rangebody: a concise explanation of what the change does and whyorigin: "AgentExplanation"If the user declines or skips, proceed directly to Step 2.
.docs/plans/ and any other obvious locations. If found, read the relevant document(s) and build a design_context string summarizing the design intent.review-agent as a background task. Pass it:
review_id -- the UUID of the reviewchanged_files -- the summary string from Step 1design_context -- (if available) the design/plan content or a summary of itReview is ready for discussion at: http://127.0.0.1:3000/reviews/{review_id}
When the background review agent task completes, inspect its output:
REVIEW_CLOSED: The reviewer closed the review. Inform the user that the review is complete and stop. No further action is needed.## Requested Changes section: This is a change list. Proceed to Step 4.Parse the change list returned by the review agent. Each item follows this format:
1. [file_path:line(s)] Description of the change
For each requested change:
Edit for modifications, Write for new files, Bash for deletions or renames).After all changes are implemented:
submit_revision via the preflight MCP server with:
review_id: the current review IDmessage: a brief summary of what was changed in this revision (e.g., "Renamed process_data to validate_input, extracted helper functions, removed unused imports")Go back to Step 2 to start the next review-discussion-revision cycle. The review agent will pick up the new revision's diff and the reviewer can continue providing feedback.
The loop ends when the review agent returns REVIEW_CLOSED, which means the reviewer has closed the review in the Preflight UI. At that point:
preflight binary or just run) and that the repository has uncommitted changes to review.just run or preflight serve to start it.