From oape
Production-grade OpenShift code reviewer that validates logic, safety, OLM, and build consistency against Jira requirements
How this command is triggered — by the user, by Claude, or both
Slash command
/oape:review <ticket_id> [base_ref]The summary Claude sees in its command listing — used to decide when to auto-load this command
## Name oape:review ## Synopsis ## Description The `oape:review` command performs a "Principal Engineer" level code review. It verifies that the code **actually solves the Jira problem** (Logic) and follows OpenShift safety standards. The review covers four key modules: - **Golang Logic & Safety**: Intent matching, execution traces, edge cases, context usage, concurrency, error handling - **Bash Scripts**: Safety patterns, variable quoting, temp file handling - **Operator Metadata (OLM)**: RBAC updates, finalizer handling - **Build Consistency**: Generation drift detection for types an...
oape:review
/oape:review <ticket_id> [base_ref]
The oape:review command performs a "Principal Engineer" level code review. It verifies that the code actually solves the Jira problem (Logic) and follows OpenShift safety standards.
The review covers four key modules:
$1 (ticket_id): The Jira Ticket ID (e.g., OCPBUGS-12345). Required.$2 (base_ref): The base git ref to diff against. Defaults to origin/master. Optional.$2 (base_ref) is provided, use itorigin/masterBASE_REF="${2:-origin/master}"
Jira Issue: Fetch the Jira issue details using curl:
curl -s "https://issues.redhat.com/browse/$1"
Focus on Acceptance Criteria as the primary validation source.
Git Diff: Get the code changes:
git diff ${BASE_REF}...HEAD --stat -p
File List: Get list of changed files:
git diff ${BASE_REF}...HEAD --name-only
Apply the following review criteria:
Logic Verification (The "Mental Sandbox"):
nil pointers or empty slices?Deleting or Pending?Safety & Patterns:
context.TODO() in production paths. Must use context.WithTimeout.go func must be tracked (WaitGroup/ErrGroup). No race conditions.fmt.Errorf("... %w", err). No capitalized error strings.Idiomatic Clean Code (via Golang-Skills):
make if the length is known. Avoid unnecessary nil slice vs. empty slice confusion.url not URL in mixed-case, id not ID for local vars, no Get prefix).set -euo pipefail.oc/kubectl commands MUST be quoted ("$VAR").mktemp, never hardcoded paths like /tmp/data.config/rbac/role.yaml is updated.types.go is modified, AND zz_generated.deepcopy.go is NOT in the file list -> CRITICAL FAIL.types.go is modified, AND config/crd/bases/...yaml is NOT in the file list -> CRITICAL FAIL.Generate a structured JSON report based on the analysis.
After the report is generated, if the issues array is non-empty, automatically apply the suggested fixes by following the procedure in implement-review-fixes.md, passing the review report produced in Step 4 as input.
This step is skipped when the verdict is "Approved" and there are no issues.
Returns a JSON report with the following structure, followed by an automatic fix summary if issues were found:
{
"summary": {
"verdict": "Approved | Changes Requested",
"rating": "1-10",
"simplicity_score": "1-10"
},
"logic_verification": {
"jira_intent_met": true,
"missing_edge_cases": ["List handled edge cases or gaps (e.g., 'Does not handle pod deletion')"]
},
"issues": [
{
"severity": "CRITICAL",
"module": "Logic",
"file": "pkg/controller/gather.go",
"line": 45,
"description": "Logic Error: Jira asks to 'retry on failure', but code returns 'nil' immediately.",
"fix_prompt": "Update the error handling to use the retry logic..."
}
]
}
When issues are present, the fixes are applied automatically and a fix summary is appended (see implement-review-fixes.md for the summary format).
Review changes against origin/master:
/oape:review OCPBUGS-12345
Review changes against a specific branch:
/oape:review OCPBUGS-12345 origin/release-4.15
Review changes against a specific commit:
/oape:review OCPBUGS-12345 abc123def
/reviewConducts a five-axis code review of staged or recent changes covering correctness, readability, architecture, security, and performance. Outputs categorized findings with file:line references and fix recommendations.
/reviewRuns Codex code review on local git state — working tree, branch diff, or against a base ref. Supports foreground/background and scope options.
/reviewReviews code changes using OpenCodeReview (OCR) and autonomously applies high-confidence fixes. Supports workspace mode, commit range, and optional background requirement context.
/reviewRequests cross-AI peer review of phase plans from external AI CLIs (Gemini, Claude, Codex, OpenCode, Qwen, Cursor) and writes structured REVIEWS.md with per-reviewer feedback.
/reviewPerforms a multi-LLM code review with inline PR comments, checking availability of several supplemental model providers before running the enhanced review workflow.
/reviewReviews an HTML design file for anti-patterns, design principles, and accessibility issues, producing a structured markdown report.
npx claudepluginhub anirudhagniredhat/oape-ai-e2e --plugin oape