Flow Plan Review
Conduct a John Carmack-level review of epic plans before implementation.
Follow this skill and linked workflow exactly. Deviations cause drift, bad gates, retries, and user frustration.
Role: Code Review Coordinator (NOT the reviewer) Backends: RepoPrompt (rp) via rp-cli
Setup
All commands use the repo-local flowctl CLI with dynamic path resolution:
REPO_ROOT="${REPO_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || true)}"
if [ -z "$REPO_ROOT" ]; then
echo "Error: Set REPO_ROOT=/absolute/path/to/repo (git rev-parse failed; cwd may be outside repo)."
exit 1
fi
FLOWCTL="$REPO_ROOT/.flow/bin/flowctl"
Backend Selection
Priority (first match wins):
- •
--review=rp|noneargument - •
FLOW_REVIEW_BACKENDenv var (rp,none) - •
.flow/config.json->review.backend - •Error - no auto-detection
Parse from arguments first
Check arguments for:
- •
--review=rpor--review rp-> use rp - •
--review=noneor--review none-> skip review
If found, use that backend and skip all other detection.
Otherwise read from config
# Priority: --review flag > env > config BACKEND=$($FLOWCTL review-backend) if [[ "$BACKEND" == "ASK" ]]; then echo "Error: No review backend configured." echo "Configure review.backend in .flow/config.json, or pass --review=rp|none" exit 1 fi echo "Review backend: $BACKEND (override: --review=rp|none)"
Critical Rules
For rp backend:
- •DO NOT REVIEW THE PLAN YOURSELF - you coordinate, RepoPrompt reviews
- •MUST WAIT for actual RP response - never simulate/skip the review
- •MUST use
flowctl rp setup-review- handles window selection + builder atomically - •DO NOT add --json flag to chat-send - it suppresses the review response
- •Re-reviews MUST stay in SAME chat - omit
--new-chatafter first review
For all backends:
- •Any failure -> inform user and stop
- •Never self-declare SHIP without actual backend verdict
FORBIDDEN:
- •Self-declaring SHIP without actual backend verdict
- •Mixing backends mid-review (stick to one)
- •Skipping review when backend is "none" without user consent
Input
Arguments format: <flow-epic-id> [focus areas]
Examples:
- •
fn-1-abc- Review epic fn-1-abc - •
fn-1-abc architecture security- Review with focus on architecture and security
Workflow
Read workflow.md and follow each phase in order.
Review Criteria
Conduct a John Carmack-level review examining:
- •Completeness - All requirements covered? Missing edge cases?
- •Feasibility - Technically sound? Dependencies clear?
- •Clarity - Specs unambiguous? Acceptance criteria testable?
- •Architecture - Right abstractions? Clean boundaries?
- •Risks - Blockers identified? Security gaps? Mitigation?
- •Scope - Right-sized? Over/under-engineering?
- •Testability - How will we verify this works?
- •Consistency - Do task specs align with epic spec?
Fix Loop
CRITICAL: Do NOT ask user for confirmation. Automatically fix ALL valid issues and re-review.
If verdict is NEEDS_WORK, loop internally until SHIP:
- •Parse issues from reviewer feedback
- •Fix epic spec using
$FLOWCTL epic set-plan - •Sync affected task specs using
$FLOWCTL task set-spec - •Re-review (stay in same chat for RP)
- •Repeat until
<verdict>SHIP</verdict>
Verification
REPO_ROOT="${REPO_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || true)}"
if [ -z "$REPO_ROOT" ]; then
echo "Error: Set REPO_ROOT=/absolute/path/to/repo (git rev-parse failed; cwd may be outside repo)."
exit 1
fi
# Verify skill file exists
ls "$REPO_ROOT/.factory/skills/flow-plan-review/SKILL.md"
# Expected: file exists, exit code 0
# Verify workflow file exists
ls "$REPO_ROOT/.factory/skills/flow-plan-review/workflow.md"
# Expected: file exists, exit code 0
# Verify rp-cli availability (macOS only)
rp-cli --version 2>/dev/null || echo "rp-cli not available (non-macOS or not installed)"
# Expected: version number or degradation message
# Verify flowctl is callable
"$REPO_ROOT/.flow/bin/flowctl" --help >/dev/null 2>&1 && echo "flowctl OK"
# Expected: outputs "flowctl OK", exit code 0