Learning center

What happens when two AI code review rules conflict?

Find the files that supply both instructions and write down a change on which they give opposite advice. Resolve the underlying team convention so neither a human nor an AI reviewer has to guess.

Give the exception a boundary#

Imagine a general rule asks services to retry failed network requests. A billing rule says to retry a charge only when the same idempotency key is reused. On a charge timeout, “retry every request” is ambiguous. Revise the shared rule to cover operations whose retries are known to be repeatable, and put the key-reuse requirement alongside billing code.

GitHub's customization guide discusses ambiguous and conflicting review instructions. Once the text agrees, compare a read-only lookup with a charge request that lacks a stable key. The reviewer should be able to explain why retries have different consequences in those two cases. GitHub’s guide to custom review instructions

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading