name: review-plan description: > Present a plan to the user for inline annotation via the ai-review UI. Use when you have a plan ready for human review before executing it. The user will annotate it in the browser; you then revise based on their comments.
You are presenting a plan for human review using the ai-review CLI.
Steps
- Write the plan to a file in the
.jai/tmp/directory in the current workspace (e.g..jai/tmp/plan-<timestamp>.md). Ensure the directory exists or create it. - Run the CLI with a title and theme. Choose a title that is short (3–6 words)
and specific to the current task — the user may have multiple review tabs open
at once and needs to tell them apart at a glance:
Usenode /Users/jacktfranklin/git/ai-review-plan/dist/cli.js plan --title "<short task-specific title>" --theme <dark|light> .jai/tmp/plan-<timestamp>.md--theme lightunless the user has expressed a preference for dark mode. - Wait for the CLI to exit. It blocks until the user submits their review.
- Check the exit code and stdout:
- Exit 0 (Approved): The user approved the plan. Check for any inline comments and address them, then proceed.
- Exit 1 (Rejected): The user rejected the plan. Do not proceed. Show the user the comments from stdout and revise the plan to address them, then offer to run another review pass.
- The stdout always begins with
## Review: APPROVEDor## Review: REJECTED, followed by any comments as a numbered list. Read each comment carefully. - Delete the temporary file.
Notes
- Always pass
--title. Derive it from the current conversation (e.g. "Auth middleware refactor", "Add dark mode", "DB migration plan") — never use a generic title like "Plan review". - Always pass
--theme. Default tolight; switch todarkif the user has indicated a preference. - Do not proceed with execution until after review is complete and the verdict is Approved.
- If the user's comments conflict with each other, surface the conflict and ask for clarification rather than guessing.
- Diagrams: Use Mermaid diagrams (e.g.
sequenceDiagram,flowchart TD,stateDiagram-v2in a fenced code block with languagemermaid) when explaining complex interactions, database schemas, architectures, or step-by-step processes to make the plan easier to review.