Reviews code changes in the OpenMC codebase against OpenMC's contribution criteria (correctness, testing, physics soundness, style, design, performance, docs, dependencies). Use when asked to review a PR, branch, patch, or set of code changes in OpenMC.
Apply repository-wide guidance from AGENTS.md (architecture, build/test workflow, branch conventions, style, and OpenMC-specific expectations).
Fetch PR metadata (if reviewing a PR). If the user references a PR number, branch name associated with a PR, or a GitHub PR URL, retrieve the PR details to determine the exact base ref:
gh pr view <number> --json baseRefName,headRefName,title,body via the gh CLI.baseRefName from the result — this is the branch the PR targets and should be used as the diff base in the next step.Identify what to review. Determine the diff range using the base ref established above:
git diff <baseRefName>...HEAD with the base ref from step 1.develop using git diff develop...HEAD. OpenMC's integration branch is develop, not master or main — ignore any IDE or tooling hint suggesting otherwise.Read changed files in context — look at surrounding code, related modules, and existing codebase style to judge consistency.
Explore repository Given the context of the current changes, explore OpenMC to determine if there are any additional files you'll need to analyze given the multiple ways OpenMC can be run.
Assess each of the following areas, noting any issues found. If an area looks good, briefly confirm it passes.
tests/unit_tests/ for new Python API features?tests/regression_tests/ for new simulation capabilities?CamelCase classes, snake_case functions/variables, trailing underscores for class members, C++17 idioms, openmc::vector instead of std::vector?pathlib.Path for filesystem operations, and openmc.checkvalue for input validation?new/delete, heap-allocating containers, std::make_shared, std::make_unique) inside the main particle transport loop (transport_history_based and transport_event_based)? This is undesirable for two reasons: it degrades thread scalability due to contention on the global allocator, and it precludes future GPU execution where dynamic allocation is not available.docs/source/)?Produce your review as a structured report with the following sections:
Context: State what is being compared (e.g., "current branch vs. develop", or the specific commit range/PR).
Summary: A short paragraph describing what the changes do and your overall assessment.
Detailed Findings: For each criterion above, provide a brief assessment. Use ✓ for items that pass and flag issues with severity:
[Minor] — Style nits, small improvements, non-blocking suggestions[Moderate] — Issues worth addressing but not strictly blocking[Major] — Problems that should be resolved before mergingGroup findings into: