Shattered Vales Studio Inc.

Conducting Effective Code Reviews

Every change at the studio reaches a protected branch through a reviewed pull request. Review is how we catch defects early, share knowledge across the team, and keep our codebases consistent. This guide is for both developers and business analysts: Steps 1 to 6 cover the technical review, and Step 7 covers how BAs verify business logic.

Step 1: Know the Expectations

A reviewer who approves a pull request shares ownership of it. If it breaks production, "I only skimmed it" is not an excuse. At the same time, review should never become a bottleneck. These are the studio norms:

Step 2: As the Author, Make the PR Reviewable

The quality of a review depends heavily on the pull request. Before requesting review, check each of these:

  1. The branch is rebased on the latest Dev and CI is green (see the Daily Git Terminal Workflow).
  2. You've read your own diff on GitHub, line by line, and removed debug logging, commented-out code, and unrelated changes.
  3. The description explains what changed, why, and exactly how to test it, and links the issue.
  4. UI or gameplay changes include screenshots or a short screen recording.
  5. Work that isn't ready is opened as a draft pull request, so nobody reviews it early.

Pull request description template:

## Summary
<!-- What does this change, in one or two sentences? -->

Resolves #<issue-number>

## Why
<!-- The problem or requirement behind it. -->

## How to test
1.
2.

## Acceptance criteria
- [ ] <criterion copied from the issue>
- [ ] <criterion copied from the issue>

## Screenshots / notes for reviewers
<!-- Anything risky, anything you're unsure about, anything out of scope. -->

Save this as .github/pull_request_template.md in a repository and GitHub pre-fills it on every new pull request.

Step 3: Review in Passes, Big Picture First

Don't start at the first line of the first file. Read in passes, from the outside in, so you don't spend twenty minutes on variable names in code that should not exist at all.

  1. Context: read the linked issue and the PR description. What problem is this solving?
  2. Shape: skim the list of changed files. Is the change in the right places? Is anything missing, such as tests, migrations, or docs?
  3. Run it: for anything non-trivial, check the branch out and try it.
  4. Details: now read the code line by line, using the checklist in Step 4.
gh pr list --search "review-requested:@me"   # PRs waiting on you
gh pr view 123 --web                        # open PR #123 in the browser
gh pr checkout 123                          # check out its branch locally to run it
gh pr diff 123                              # read the diff in the terminal
gh pr checks 123                            # CI status

These use the GitHub CLI. See Claude Code & GitHub CLI Setup to install it. Run git switch Dev afterwards to leave the PR's branch.

Step 4: Know What to Look For

Work through these areas roughly in order of importance. A pull request with a design problem needs that conversation before anyone discusses style.

Correctness

Architecture and design

Security

Performance

Readability and style

Step 5: Leave Constructive, Actionable Feedback

A good review comment is about the code, not the person; explains why; and makes clear what the author should do next. Start each comment with a label so the author knows how much weight to give it. The studio uses Conventional Comments (opens in a new tab):

LabelMeaningBlocks merge?
issue:Something is wrong and must change.Yes
suggestion:A proposed improvement, with the reason.Say so: add (blocking) or (non-blocking)
question:You don't understand something. Not an accusation.Until answered
nitpick:Trivial preference. The author may ignore it.No
thought:An idea for later, outside this PR's scope.No
praise:Something done well. Use it sincerely and specifically.No

Unhelpful:

This is wrong.
Why would you do it this way??
Use a dictionary.

Actionable:

issue: This query isn't filtered by tenantId, so an admin in one
tenant could see invoices from every tenant. Can we go through
InvoiceRepository.ForTenant() like the other endpoints do?

suggestion (non-blocking): FindItem() scans the whole list on each
call, and it's called once per inventory slot. A Dictionary keyed by
itemId would make this O(1). Fine to leave for a follow-up issue.

question: Why does the retry stop after 3 attempts? If it's a
platform limit, a comment saying so would help the next reader.

Finish with one of three verdicts. Approve: ready to merge, possibly with non-blocking comments. Request changes: at least one blocking issue. Comment: questions only, no verdict yet. From the terminal:

gh pr review 123 --approve --body "Looks good. Two non-blocking suggestions inline."
gh pr review 123 --request-changes --body "Tenant filter missing on the invoice query; see inline."
gh pr review 123 --comment --body "A couple of questions before I approve."

Step 6: As the Author, Respond to Feedback

  1. Reply to every comment, even if only "Done" or "Fixed in a1b2c3d". Silence leaves reviewers guessing.
  2. Push fixes as new commits during review, so reviewers can use "Changes since last review". Avoid rebasing mid-review unless you need to; if you do, say so in a comment.
  3. Disagreeing is fine. Explain your reasoning once. If a thread goes back and forth more than twice, talk it through on a call, then write the outcome in the thread.
  4. Turn out-of-scope suggestions into new issues rather than growing the pull request.
  5. Re-request review when you're ready, using the circular-arrow icon next to the reviewer's name.

Step 7: For Business Analysts: Verify Business Logic and Acceptance Criteria

A developer reviewer asks "is this code correct?"; a BA reviewer asks "is this the right behavior?". You don't need to read every line of code to do that well. Your job is to confirm that each acceptance criterion in the issue is met, that the business rules are implemented as agreed, and that nothing was added that nobody asked for.

  1. Start from the issue, not the code. Open the linked issue and list every acceptance criterion. If a criterion is ambiguous, resolve it in the issue first; a pull request isn't the place to change requirements.
  2. Map each criterion to evidence. For each one, find proof in the PR: a test whose name describes the rule, a screenshot, or a step you can run yourself in the preview or QA environment.
  3. Read the tests, not the implementation. Well-named tests read like business rules, for example Invoice_IsOverdue_WhenUnpaid30DaysAfterDueDate. Check the numbers in them match the agreed rule: 30 days, not 31.
  4. Scan for rule changes. In the Files changed tab, look for constants, configuration, feature flags, prices, rates, limits, and status names. Each change should trace back to a requirement.
  5. Probe the edge cases you know from the domain. A tenant on a trial plan; a customer in a different time zone; a refund larger than the original charge; a month-end or leap-day date; a player with a full inventory. Ask whether each one is handled.
  6. Check for scope creep. Behavior that wasn't in the issue may be welcome, but it needs to be agreed and documented rather than slipped in.
  7. Record your verification as a review comment, so the evidence lives with the change.

Acceptance criteria verification comment:

## BA verification for #<issue-number>

- [x] AC1: Unpaid invoices show "Overdue" 30 days after the due date.
      Verified in QA with invoice INV-TEST-0042; test InvoiceTests.cs line 88.
- [x] AC2: Overdue invoices are excluded from the "Due soon" email.
      Verified with the email preview in QA.
- [ ] AC3: Tenant admins can change the overdue threshold.
      Not found in this PR. Is it planned for a follow-up issue?

Edge cases checked: due date on Feb 29; tenant in UTC+13.
Scope: no unrequested behavior found.

Use real test data from the QA environment, never production customer data, when recording evidence.