You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AI provider/model for consolidation phase: claude, gemini, codex, codex-spark, or opencode (default: codex-spark using gpt-5.3-codex-spark; codex uses gpt-5.6-sol)
--base-ref
Base ref for diff (default: origin/main)
--head-ref
Head ref for diff (default: HEAD)
--custom-rules
Custom review rules text to inject into the review prompt
--custom-rules-file
Path to a markdown file containing custom review rules
Custom Review Rules
Inject project-specific review rules into the AI review prompt. Rules are stacked (all sources merge):
Priority
Source
Description
Highest
--custom-rules "text"
CLI inline rules (CI/CD overrides)
Medium
--custom-rules-file path
External rules file (team-shared)
Lowest
.code-guarder/review-rules.md
Project-local rules (committed to repo)
# Inline rules
python3 scripts/run_review.py --context ./workspace/review_context.json \
--custom-rules "All crypto ops must use constant-time comparison" -o ./review-output
# Rules from file
python3 scripts/run_review.py --context ./workspace/review_context.json \
--custom-rules-file ./team-rules/crypto-review.md -o ./review-output
# Auto-detect project rules (place .code-guarder/review-rules.md in the reviewed repo)
python3 scripts/run_review.py --context ./workspace/review_context.json -o ./review-output
When using --init, the system generates context files for each AI tool:
Tool
Config File
Method
Purpose
Claude Code
CLAUDE.md
Native /init command
Project instructions, coding style
Gemini CLI
GEMINI.md
Prompt-based (non-interactive)
Project context, conventions
Codex CLI
AGENTS.md
Prompt-based (non-interactive)
Agent behavior, project overview
OpenCode
AGENTS.md
Prompt-based (non-interactive)
Shared project rules and agent behavior
Note: Claude Code has a built-in /init slash command that works non-interactively. Gemini and Codex have /init commands but they only work in interactive TUI mode (Gemini #5435, Codex #4219). OpenCode also uses AGENTS.md, so run_review.py --init generates that file via a non-interactive prompt path when needed. For automation, we use prompts to generate the context files.
Output Files
review-output/
├── review_prompt.md # Prompt sent to AI reviewers
├── claude_output.txt # Claude raw output
├── claude_review.md/html/json # Claude individual report
├── gemini_output.txt # Gemini raw output (if enabled)
├── gemini_review.md/html/json # Gemini individual report
├── codex_output.txt # Codex raw output (if enabled)
├── codex_review.md/html/json # Codex individual report
├── opencode_output.txt # OpenCode raw output (if enabled)
├── opencode_review.md/html/json # OpenCode individual report
├── consolidation_prompt.md # Consolidation prompt
├── consolidation_output.txt # Consolidation raw output
└── final_report.md/html/json # Final consolidated report
opencode run --dangerously-skip-permissions "<prompt>"
--dangerously-skip-permissions
Note: Codex reads the prompt from stdin via -. Gemini, Claude, and OpenCode run headlessly by receiving the prompt as a CLI argument. Regular Codex phases use gpt-5.6-sol with --codex-reasoning-effort xhigh by default, while consolidation defaults to gpt-5.3-codex-spark; pass --consolidation-model codex to use gpt-5.6-sol for consolidation. Codex bypasses its internal sandbox by default; pass --codex-use-sandbox to restore the older --full-auto mode. The review flow is constrained to the local checkout and should not need remote PR pages or web search.