SF
STS Forge

/review

Review recent code changes using a game development quality rubric: CRITICAL, WARNING, and SUGGESTION findings.

Reviews changed files and produces a prioritized findings report using a rubric designed for UE5 game development.

Trigger phrases#

/review, review my changes, check the code, audit changes, look over this before I submit, or before submitting to version control.

Do NOT use for: general code questions or architecture discussion (ask the researcher agent directly).

This skill is read-only#

/review identifies issues and produces a report. It does not modify any files. Findings are reported for you to decide how to address.

Process#

  1. Gets the list of changed files from VCS (git diff, p4 opened)
  2. Reads each changed file in full plus its header/counterpart
  3. Focuses review on changed sections while checking their interaction with surrounding code
  4. If more than 10 files are changed, focuses on the 5 highest-risk files and notes which were skimmed
  5. Produces the findings report

High-risk file indicators: these get full review priority:

  • Files with replication annotations (DOREPLIFETIME, UFUNCTION(Server), UFUNCTION(Client))
  • Files with GAS components (UAbilitySystemComponent, UGameplayAbility, UGameplayEffect)
  • Files with UObject pointer management (UPROPERTY required for GC)
  • Header files that are widely included
  • Files in networking or combat subsystems

Review rubric#

CRITICAL: must fix before submitting#

Issues that cause crashes, data loss, or multiplayer breakage:

  • Crash hazards: missing UPROPERTY() on UObject* pointers (GC collects them), null pointer access on replicated references, accessing destroyed actors
  • GC hazards: raw UObject* without UPROPERTY(), TArray<UObject*> without UPROPERTY(), storing UObject* in non-UPROPERTY containers
  • Replication bugs: missing authority checks before state changes, wrong NetExecutionPolicy on abilities, RPC parameters not net-serializable, missing DOREPLIFETIME registration
  • Data corruption: writing to properties without proper replication, modifying replicated state on clients
  • Reflection errors: missing or malformed UCLASS/USTRUCT/UENUM/UFUNCTION/UPROPERTY macros, missing GENERATED_BODY()

WARNING: should address#

Performance, lifecycle, and correctness risks:

  • Performance in hot paths: expensive operations in Tick(), per-frame allocations, unnecessary traces every frame, GAS effect creation in tight loops
  • Lifecycle issues: holding references to actors that may be destroyed, not clearing timers/delegates in EndPlay, leaking gameplay effects
  • Threading concerns: accessing game thread data from async tasks without synchronization
  • Missing null checks: especially on GetOwner(), GetWorld(), AbilitySystemComponent, PlayerState
  • Blueprint API issues: UFUNCTION(BlueprintCallable) with non-Blueprint-friendly parameter types, missing UPROPERTY(EditAnywhere) on tuning values

SUGGESTION: consider for quality#

Style and maintainability:

  • Inconsistent naming (UE conventions: FStruct, EEnum, UObject, AActors)
  • Missing comments on complex logic or replication decisions
  • Magic numbers without named constants
  • Missing UE_LOG in error paths
  • Undocumented authority requirements

UE-specific checks#

Beyond the rubric, /review specifically checks:

  • Every new UFUNCTION(Server/Client/NetMulticast) has a matching _Implementation
  • Every new Replicated UPROPERTY has a corresponding DOREPLIFETIME in GetLifetimeReplicatedProps
  • Every new ReplicatedUsing UPROPERTY has the OnRep_ callback implemented
  • New #includes are necessary (not leftovers from experimentation)
  • Build.cs has required module dependencies for any new types used
  • Blueprint-callable functions have appropriate categories and tooltips

Output format#

## Review Summary

**Files reviewed**: [count] ([count] in detail, [count] skimmed)
**Risk assessment**: LOW / MEDIUM / HIGH / BLOCK
**Recommendation**: APPROVE / NEEDS_CHANGES / BLOCK

### CRITICAL
- [file:line] Issue description. Impact. Suggested fix.

### WARNING
- [file:line] Issue description. Risk.

### SUGGESTION
- [file:line] Suggestion.

### Changelist summary
[1-2 sentence summary of what the changes do]
[Note any Blueprint-side work needed to complete the changes]

Risk levels#

Level Criteria
LOW No CRITICAL, 0–2 WARNINGs, straightforward changes
MEDIUM No CRITICAL, 3+ WARNINGs, or changes touch replication
HIGH 1+ CRITICAL issues found
BLOCK Multiple CRITICAL issues or fundamentally wrong approach