Perform effective code review for Mu2e pull requests. Use when reviewing PRs, assessing risk, checking cross-repo impacts, validating tests/builds, and producing actionable reviewer feedback with severity and evidence.
Use this skill to review pull requests in a way that is:
These conventions are intended for Mu2e offline repositories only.
Apply this skill's conventions to:
OfflineProductionEventNtupleEventDisplayDQMTutorialPassNRefAnaArtAnalysisFor other repositories, treat these conventions as out of scope unless the PR explicitly asks to apply them. Other repos may be online, personal, or minor projects with different standards.
When asking an AI reviewer to review a PR, provide this minimum packet first.
Offline, Production, mu2e-trig-config.If this packet is missing, ask for missing items before issuing strong conclusions.
using Parameters = art::EDProducer::Table<Config>;
.fcl keys aligned with Config names and types?Production updates?mu2e-trig-config updates?-Werror) in expected environments?Source of truth: https://mu2ewiki.fnal.gov/wiki/CodingStandards.
If this skill conflicts with that page, follow the wiki.
Reviewers should enforce these high-impact rules:
.hh and .cc for Mu2e code.-std=c++20.art::Event (except EDFilter true/false behavior).using directives/declarations in headers; fully qualify types in headers.mu2e namespace unless coordinated with software team.new/delete patterns unless forced by external APIs; prefer safe ownership.RecoDataProducts.art::Handle/art::ValidHandle/GeomHandle/ConditionsHandle across events.const and override where applicable.cet::exception with meaningful category/message; do not use assert for production runtime control flow.Source of truth: https://mu2ewiki.fnal.gov/wiki/CodingStandards.
If this skill conflicts with that page, follow the wiki.
Reviewers should strongly encourage these recommendations:
.cc unless inlining is justified.++i) over post-increment (i++) when equivalent.operator< definitions for types with multiple meaningful sort orders; prefer named comparator functions.std::pair where a named struct improves readability.CLHEP::mm), especially for short names.fhicl-dump -a) when config behavior changes.Capture and enforce project-local patterns here, even when they are not universal C++ style rules.
_hh suffix.#ifndef GeneralUtilities_FooBar_hh
#define GeneralUtilities_FooBar_hh
// ...
#endif
Offline, omit the repo prefix from include guards.Examples:
Offline/GeneralUtilities/inc/FooBar.hh -> GeneralUtilities_FooBar_hhProduction/.../MyHeader.hh -> Production_<Path>_MyHeader_hhmu2e-trig-config/.../TrigThing.hh -> mu2e_trig_config_<Path>_TrigThing_hhReviewer check:
S2 (raise if collision or multiple-include bugs are observed).Only raise severity when evidence supports it.
Use these concise prompts:
"Best practice reminder: could you keep this PR focused on a single topic, or split unrelated changes into follow-up PRs?"
"Best practice reminder: please add a meaningful PR description including intent, scope, and validation evidence."
"What exact user-visible behavior should change?"
"Which files/repos are intentionally not touched in this PR?"
"What commands did you run to validate and what were outcomes?"
"Any expected downstream config/data-product impacts?"
"What rollback path exists if this regresses in production?"
### PR Review Summary
**Decision**
- <approve | request changes | comment only>
**Scope understood**
- <1-3 bullets>
**Findings**
1. [S0|S1|S2|S3] <title>
- Evidence: <file/behavior/command>
- Impact: <why it matters>
- Suggested fix: <concrete change>
2. [Sx] ...
**Validation check**
- Build/tests run: <yes/no + commands>
- Config contract check: <pass/fail/partial>
- Cross-repo consistency: <pass/fail/needs follow-up>
**Residual risk**
- <short bullets>
**Author follow-ups**
- <numbered actionable requests>
Review this PR using the `reviewing-pull-requests` skill.
Intent:
<what is changing and why>
Scope:
<files changed + out-of-scope>
Risk areas:
<physics/config/perf/etc>
Validation run:
<commands + outputs>
Cross-repo links:
<related PRs/branches>
Acceptance criteria:
<must-pass conditions>
Return findings with severity (S0-S3), evidence, and suggested fixes.
For PRs touching .fcl composition, include checks that:
Production config intent is preserved,Offline/*/fcl/prolog.fcl defaults are overridden intentionally,FHICL_FILE_PATH is valid,fhicl-dump -a provenance confirms final values.