Code Review
Pre-commit quality gate. Read the target files, then run this checklist. Output one structured report per review. Fix all issues before committing.
Before You Start
- Read
docs/CODING_STANDARDS.mdfor formatting, class structure, serialization, null safety, and async rules. - Read
docs/NAMING_CONVENTIONS.mdfor naming rules (private fields, properties, files, asmdefs). - Read
docs/GDD.mdfor Gherkin scenarios — every scenario should have a corresponding test. - Read the files being reviewed in full before assessing.
Checklist
1. Rules Compliance
- All Inspector fields use
[SerializeField] private— nopublicfields on MonoBehaviours - All component references cached in
Awake()orStart()— never inUpdate/FixedUpdate/LateUpdate -
GameDebugused instead ofDebug.Log/Debug.LogError/Debug.LogWarning - New Input System only — no
Input.GetKey*/Input.GetAxis* -
TryGetComponent<T>()preferred overGetComponent<T>()where component may be absent - No Unity API calls from background threads
- No
.metafile modifications
2. Naming Conventions
- Private fields:
_camelCase - Public properties & methods:
PascalCase - Parameters & local variables:
camelCase - Booleans:
is/has/can/shouldprefix (e.g._isGrounded,CanJump) - Events:
Onprefix (e.g.OnDeath) - Static fields:
s_camelCase - Class name matches file name
3. Code Quality
- No magic numbers or hardcoded strings — use constants, ScriptableObjects, or serialized fields
- No
FindObjectOfType<T>()orGameObject.Find()(except in editor-only code) - No cross-assembly references that violate the TDD's asmdef dependency graph
- K&R braces (opening brace on same line)
- 4-space indentation (no tabs)
4. Performance
- No
newallocations insideUpdate/FixedUpdate/LateUpdate(no GC pressure in hot paths) - Particles are pooled or have Stop Action set to
Destroywith pool backing - DOTween/PrimeTween tweens are killed in
OnDestroyorOnDisable - No
stringconcatenation in hot paths — useGameDebugwith conditional compilation
5. Test Coverage
- Every GDD Gherkin
Given/When/Thenscenario for this feature has a corresponding NUnit test - EditMode tests for pure logic; PlayMode tests for MonoBehaviour lifecycle
- All tests currently passing
6. Game Feel
- If "later" was chosen in
/uw-cmd-implement-featureStep 3:// TODO(gamefeel): [feature] — pendingcomment exists in the main script - If "later" was chosen: a pending row exists in
docs/GFD.mdFeedback Matrix - If "now" was chosen: Rule of Three satisfied (visual + audio + kinesthetic minimum)
Output Format
## Code Review — {FeatureName}
### Rules [Pass | Issues]
### Naming [Pass | Issues]
### Code Quality [Pass | Issues]
### Performance [Pass | Issues]
### Test Coverage [X/Y scenarios | Missing]
### Game Feel [Integrated | TODO filed | Missing]
Issues to fix before commit:
- [list each issue with file and line, or "None"]
Do not commit until Issues to fix is "None".
After Review
- Fix issues: Address all flagged items, then re-run this review.
- Debug failures: Use
uw-unity-debuggingfor systematic diagnosis of any issues found. - Missing tests: Use
uw-unity-test-runnerto generate tests for uncovered Gherkin scenarios. - Missing game feel: Use
uw-game-feel-integratorif Rule of Three is not satisfied and "now" was chosen.