一键导入
flow-next-plan-review
Carmack-level plan review via RepoPrompt or Codex. Use when reviewing Flow specs or design docs. Triggers on /flow-next:plan-review.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Carmack-level plan review via RepoPrompt or Codex. Use when reviewing Flow specs or design docs. Triggers on /flow-next:plan-review.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Drive any UI surface like a real user - a web app, a Chromium-backed desktop app (Electron / WebView2, reached over CDP), or a genuinely native app (macOS AppKit/SwiftUI, or a non-CDP webview) reached via the Cua Driver / Computer Use. Detects the surface, picks the best available driver, degrades gracefully. Use to navigate sites, verify deployed UI, test web or desktop apps, capture baseline screenshots, drive a sign-in flow, scrape data, fill forms, run an e2e check, or inspect current page state. Triggers on "check the page", "verify UI", "test the site", "test this app", "drive the app", "automate this desktop app", "read docs at", "look up API", "visit URL", "browse", "screenshot", "scrape", "e2e test", "login flow", "capture baseline", "see how it looks", "inspect current", "before redesign", "Electron app", "native app".
Carmack-level implementation review of changes via the configured backend. Use when asked to review code or a diff in a flow-next repo.
Open a PR with a cognitive-aid body rendered from flow-next spec state via gh. Use whenever asked to make or open a PR in a flow-next repo.
Single-tick autonomous build-loop conductor. Advances one ready spec one stage per tick, emits PILOT_VERDICT. Use when asked to pilot a spec or backlog.
Carmack-level review of a flow-next spec or plan via the configured backend. Use when asked to review a plan or spec.
Plan a feature into a flow-next spec with tasks in .flow/. Use when asked to plan, spec out, or break down work (fn-N ids).
| name | flow-next-plan-review |
| description | Carmack-level plan review via RepoPrompt or Codex. Use when reviewing Flow specs or design docs. Triggers on /flow-next:plan-review. |
| user-invocable | false |
Read workflow.md for detailed phases and anti-patterns.
Conduct a John Carmack-level review of spec plans.
Role: Code Review Coordinator (NOT the reviewer)
Backends (branch on the Preamble RP_ELIGIBLE guard):
RP_ELIGIBLE=1: RepoPrompt (rp), Codex CLI (codex), GitHub Copilot CLI (copilot), or Cursor CLI (cursor)RP_ELIGIBLE=0: Codex CLI (codex), GitHub Copilot CLI (copilot), or Cursor CLI (cursor) — rp is macOS-only; never list it in guidance you surface (--review=rp stays accepted)CRITICAL: flowctl is BUNDLED — NOT installed globally. which flowctl will fail (expected). Define once; subsequent blocks (here and in workflow.md) use $FLOWCTL:
FLOWCTL="${DROID_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}/scripts/flowctl"
[ -x "$FLOWCTL" ] || FLOWCTL=".flow/bin/flowctl"
# Prefer RepoPrompt CE; retain Classic only as the final compatibility rung.
if command -v rpce-cli >/dev/null 2>&1 \
|| [ -x "$HOME/RepoPrompt/repoprompt_ce_cli" ] \
|| [ -x "$HOME/Library/Application Support/RepoPrompt CE/repoprompt_ce_cli" ] \
|| command -v rp-cli >/dev/null 2>&1; then
RP_ELIGIBLE=1
else
RP_ELIGIBLE=0
fi
When RP_ELIGIBLE=0 (not macOS, no supported RepoPrompt CLI), never steer the user toward rp: every backend summary, recommendation, or override hint you surface presents only the runnable configured backends codex, copilot, cursor (plus none). export is an explicit one-off review MODE (--review=export), not a configured backend — never present it as one. Suppression is not a ban: an explicit --review=rp, FLOW_REVIEW_BACKEND=rp, or review.backend=rp still resolves to rp and errors at runtime via require_rp_cli().
Priority (first match wins):
--review=rp|codex|copilot|cursor|export|none argumentFLOW_REVIEW_BACKEND env var — bare backend (rp, codex, copilot, cursor, none) OR spec form (codex:gpt-5.4:xhigh, copilot:claude-opus-4.5, cursor:gpt-5.5-high).flow/config.json → review.backend (same bare / spec forms)Check $ARGUMENTS for:
--review=rp or --review rp → use rp--review=codex or --review codex → use codex--review=copilot or --review copilot → use copilot--review=cursor or --review cursor → use cursor--review=export or --review export → use export--review=none or --review none → skip reviewIf found, use that backend and skip all other detection.
# Priority: --review flag > per-spec `default_review` override > env > config.
# Resolve the spec id from $ARGUMENTS FIRST so a per-spec `default_review` override routes to the
# right backend BEFORE branching (empty → env/config, no regression). `$1` is the positional spec
# arg — the backend blocks below reuse it as `SPEC_ID`.
SPEC_ID="${1:-}" # the spec-id positional arg (canonicalized by review-backend); empty falls back to env/config
BACKEND=$($FLOWCTL review-backend "$SPEC_ID")
if [[ "$BACKEND" == "ASK" ]]; then
echo "Error: No review backend configured."
if [ "$RP_ELIGIBLE" = 1 ]; then
echo "Run /flow-next:setup to configure, or pass --review=rp|codex|copilot|cursor|none"
else
echo "Run /flow-next:setup to configure, or pass --review=codex|copilot|cursor|none"
fi
exit 1
fi
if [ "$RP_ELIGIBLE" = 1 ]; then
echo "Review backend: $BACKEND (override: --review=rp|codex|copilot|cursor|none)"
else
echo "Review backend: $BACKEND (override: --review=codex|copilot|cursor|none)"
fi
When RP_ELIGIBLE=0, omit the rp line below from any guidance you surface (explicit --review=rp still honored):
gpt-5.5). FLOW_CODEX_MODEL / FLOW_CODEX_EFFORT env vars, or --spec codex:gpt-5.4:xhigh.FLOW_COPILOT_MODEL / FLOW_COPILOT_EFFORT env vars, or --spec copilot:claude-opus-4.5:xhigh.cursor-agent, cross-platform); reaches gpt-5.5-high (1M-ctx default), the gpt-5.3-codex family, composer-2.5, and claude-opus-4-8-thinking-high via a Cursor subscription. FLOW_CURSOR_MODEL env var, or --spec cursor:gpt-5.5-high. Cursor folds reasoning effort into the model name — no effort field.Spec grammar: backend[:model[:effort]] — FLOW_REVIEW_BACKEND and .flow/config.json review.backend both accept this. Examples: codex, codex:gpt-5.2, copilot:claude-opus-4.5:xhigh, cursor:gpt-5.5-high (cursor takes model only — no :effort). Per-spec default_review (set via flowctl spec set-backend) overrides env.
For rp backend:
setup-review - handles window selection + builder atomically--new-chat after first reviewFor codex backend:
$FLOWCTL codex plan-review exclusively--receipt for session continuity on re-reviewsFor copilot backend:
$FLOWCTL copilot plan-review exclusively--receipt for session continuity on re-reviews (session only resumes when prior receipt has mode == "copilot")--spec backend:model:effort flag, per-spec default_review, FLOW_REVIEW_BACKEND spec, FLOW_COPILOT_MODEL / FLOW_COPILOT_EFFORT env vars, registry defaultsFor cursor backend:
$FLOWCTL cursor plan-review exclusively (requires --files <code files>, same as codex/copilot)--receipt for session continuity on re-reviews (session only resumes when prior receipt has mode == "cursor")--spec cursor:<model> flag, per-spec default_review, FLOW_REVIEW_BACKEND spec, FLOW_CURSOR_MODEL env var, registry default (gpt-5.5-high). No effort — Cursor bakes effort into the model name; cursor:<model>:<effort> is rejectedFor all backends:
REVIEW_RECEIPT_PATH set: write receipt after review (any verdict)<promise>RETRY</promise> and stopflowctl <backend> plan-review call as one blocking foreground Bash call with a generous timeout (10 minutes; verdicts typically land in 1–7) — never run_in_background + monitor/poll (a background completion does not reliably resume a subagent context)FORBIDDEN:
Arguments: $ARGUMENTS
Format: <flow-spec-id> [focus areas]
See workflow.md for full details on each backend.
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
Run backend detection from SKILL.md above. Then branch:
⚠️ STOP: You MUST read and execute workflow.md now. The per-backend execution blocks are single-sourced there (fn-110) — go to the matching "Codex Backend Workflow" / "Copilot Backend Workflow" / "Cursor Backend Workflow" section and execute it. Do not reconstruct the commands from memory here.
Each workflow is ONE atomic dispatch fence (checkpoint + spec id + receipt path + CODE_FILES reviewer anchors + $FLOWCTL <backend> plan-review …; Foreground rule applies) → update status → RETURN the verdict here. The workflow files never loop — the Fix Loop below is the single owner of NEEDS_WORK handling, MAJOR_RETHINK escalation, and the fn-90 deterministic cap.
Return here only after workflow.md execution is complete.
⚠️ STOP: You MUST read and execute workflow.md now.
Go to the "RepoPrompt Backend Workflow" section in workflow.md and execute those steps. Do not proceed here until workflow.md phases are complete.
The workflow covers:
$W and $TReturn here only after workflow.md execution is complete.
CRITICAL: Do NOT ask user for confirmation. Automatically fix ALL valid issues and re-review — our goal is production-grade world-class software and architecture. Never use AskUserQuestion in this loop.
MAJOR_RETHINK is NOT a fix-loop input. Every backend can emit MAJOR_RETHINK (a valid verdict tag), but it means the plan/approach is wrong — not something to patch finding-by-finding. Do NOT enter the fix loop on it. Escalate immediately: surface the reviewer's rationale to the caller and stop with a typed BLOCKED: DESIGN_CONFLICT (Ralph mode: output <promise>RETRY</promise>). A re-plan is a human decision, never an ad-hoc patch. Only NEEDS_WORK drives the loop below.
MAX ITERATIONS (backend-agnostic — applies to ALL backends: rp, codex, copilot, cursor): fix+re-review cycles are bounded at ${MAX_REVIEW_ITERATIONS:-4} (default 4; env-overridable, configurable in Ralph's config.env) — the counter is flowctl-owned (below), never kept in agent context. When the cap is reached and the verdict is still NEEDS_WORK, BREAK the loop and escalate: surface the surviving findings to the caller and stop (in Ralph mode output <promise>RETRY</promise> so the next iteration starts fresh). Never loop unbounded. The per-backend workflow files defer to this cap. The cap is now ALSO enforced deterministically by flowctl (fn-90 R5): each flowctl <backend> plan-review dispatch increments a cumulative spec-scoped counter (plan_review_rounds) and REFUSES at ${MAX_REVIEW_ITERATIONS:-4} with an ESCALATE: marker + exit 4 — the flowctl counter survives across fresh /flow-next:plan-review invocations, so a caller-side "re-invoke until SHIP" outer loop can no longer reset the cap by re-entering. This loop is INTERNAL — the caller (e.g. /flow-next:plan, pilot) invokes plan-review ONCE and acts on the terminal verdict; the flowctl counter resets ONLY on a SHIP verdict or an explicit re-plan (flowctl spec reset-review-rounds <spec-id>), never on a fresh invocation or a spec edit.
If verdict is NEEDS_WORK, loop internally until SHIP or the iteration cap:
# Preferred: stdin heredoc
$FLOWCTL spec set-plan <SPEC_ID> --file - --json <<'EOF'
<updated spec content>
EOF
# Or temp file — literal unique path per the path-persistence rule
$FLOWCTL spec set-plan <SPEC_ID> --file "${TMPDIR:-/tmp}/flow-plan-review-updated-plan-<spec-id>-<suffix>.md" --json
$FLOWCTL task set-spec <TASK_ID> --file - --json <<'EOF'
<updated task spec content>
EOF
Task specs need updating when spec changes affect:
flowctl codex plan-review (receipt enables context)flowctl copilot plan-review (receipt enables context; must be mode == "copilot" to resume)flowctl cursor plan-review (receipt enables context; must be mode == "cursor" to resume)$FLOWCTL rp chat-send --window "$W" --tab "$T" --message-file <literal re-review path from workflow.md's fix loop> (NO --new-chat; stdout redirected to the same literal response file, Read once)<verdict>SHIP</verdict> — or the MAX ITERATIONS cap above breaks the loop (escalate with surviving findings)Recovery: If context compaction occurred during review, restore from checkpoint:
$FLOWCTL checkpoint restore --spec <SPEC_ID> --json
CRITICAL: For RP, re-reviews must stay in the SAME chat so reviewer has context. Only use --new-chat on the FIRST review.