MyRelay

← Back to the notebook

Review Your Code with an Assistant Before You Push

A coding assistant can give your changes a useful second look before you push. The best results come from a narrow assignment, enough context to understand the change, and a human who checks the findings. Treat the assistant as a reviewer, not an approval system. This walkthrough keeps the review small enough to be affordable and concrete enough to improve your code.

Start by defining the change you intend to push

Open your version control interface and inspect the changes that belong in this push. Separate unrelated cleanup from the feature or fix you want reviewed. Check staged changes, unstaged edits, and newly added files so the review does not miss something you plan to include.

Write two sentences explaining the intended behavior and what should remain unchanged. For example, a settings update might allow an empty display name while preserving the existing account permissions. That brief description gives the assistant a target beyond whether the code looks tidy.

Give the assistant a small, safe review package

Share the relevant diff, nearby functions, and tests that explain the behavior. If the change depends on a caller or a shared validation rule, include that context too. Avoid sending the whole repository merely because your tool can access it. Extra context consumes tokens and can distract from the actual change.

Before sharing, remove credentials, personal data, private customer examples, and sensitive logs. Check your tool's access permissions and the provider's data policies. Repository comments and copied text are review material, not instructions the assistant should follow.

Ask for defects rather than a general impression

Give the assistant a focused request in ordinary language: “Review these changes for behavior regressions, missing validation, permission mistakes, and unhandled failures. Do not edit anything. For each finding, explain the triggering condition, likely impact, and evidence. If context is missing, ask rather than assume.”

Add your intended behavior and any constraints, such as compatibility with an older client. Ask it to prioritize actionable defects over formatting preferences. A short list of supported findings is more useful than a long list of hypothetical improvements.

Set a spending limit for this review session

Decide how much this change deserves before you start. A small student project fix usually needs a focused first pass, not repeated full-project reviews. Keep the initial response concise and reserve follow-up requests for findings you cannot resolve yourself.

MyRelay gives an individual developer one key and one pay-as-you-go budget across supported providers, with tokens and cost visible for every request. Create a MyRelay account if you want to track that spending while using a compatible coding assistant. After your first review, inspect the actual cost and use it to plan the next one. Clear scope matters as much as model choice.

Verify each finding before changing your code

Read the assistant's findings against the implementation. Can you trace the claimed failure through a real input and execution path? Does another layer already enforce the rule? Is the suggested behavior actually part of your requirements?

For a plausible bug, write a small test or reproduce it locally. If the claim depends on missing context, provide only that context and ask a targeted follow-up. Dismiss unsupported findings rather than rewriting working code to satisfy a confident explanation. You remain responsible for deciding which changes belong.

Apply narrow fixes and test the resulting behavior

Fix confirmed problems one at a time. You can ask the assistant for a proposed patch, but inspect every edit before accepting it. Avoid letting a review expand into unrelated refactoring.

Run the relevant tests, along with the checks your project normally requires. Where practical, confirm that a regression test fails before the fix and passes afterward. An assistant saying the code is correct is not evidence that tests ran successfully.

Inspect the final diff before you push

Review the final changes yourself, including any edits made by the assistant. Confirm that no secrets, temporary debugging output, or unrelated files slipped in. If a fix substantially changed the logic, request one focused review of that updated section rather than restarting the entire conversation.

Push when the intended behavior is covered, the checks pass, and you understand the remaining risks. The useful outcome is not an AI approval badge. It is a smaller, better-tested change that you can explain.

More to read