# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json language: "en-US" early_access: false reviews: path_filters: - "!projects/**" auto_review: base_branches: - ".*" path_instructions: - path: "**/*.{md,mdc}" instructions: | Review documentation as a reader who has none of the author's context, and check its facts against the code in this repository. Read the whole file to judge the change, but comment only on text this pull request adds or changes. Do not comment on wording that is merely different from how you would write it. In any changed text, flag: - a statement about what the code, a command or a check does that the code contradicts; - a code sample or command that would not work as written; - a package, file, function, flag, script or error code that the text presents as this repository's and that does not exist; - a rule or fact that the change removes or alters with nothing in the pull request explaining why; - a rule the changed text states that another file, changed or not, states differently; - a relative link or heading anchor that does not resolve. In text that explains or teaches (a decision record, a guide, a policy page, the prose of a README), but not in reference tables, indexes, checklists or changelogs, also flag: - a term used before it is explained (a link to its definition counts as an explanation); - a mechanism explained before the problem it solves; - a rule stated with no example that shows it; - a long paragraph that packs in several rules and would read better as a list or a table. In guidance for agents (a rule under .agents/rules/, a SKILL.md), also flag an instruction that gives no reason: such guidance says what went wrong and why before it says what to do. In a decision record under docs/architecture docs/adrs/, also flag a ticket number, a pull request number, a project milestone, and narration of how the work went, such as "before this refactor" or "we used to". History that explains something permanent, such as versions that remain published, is fine. - path: "**/*.{ts,tsx,mts,cts,js,mjs,cjs}" instructions: >- Decimal, bigint and 64-bit integer types exist to hold values a JavaScript number would round, so flag a change that routes such a value through a number for convenience: Number() or parseFloat() on it without a check that proves the conversion is exact (a safe-integer range check is enough for a bigint or 64-bit integer, but not for a Decimal, since 1.0000000000000001 passes a range check and becomes 1), or an override of valueOf or Symbol.toPrimitive on a value class meant to make <, >, == or arithmetic work. A string-returning override is wrong too, because < then compares "10" and "2" as text. Native bigint comparison, addition, subtraction and multiplication are already exact (division drops the fraction). Decimal has no exact operators, since JavaScript has no operator overloading, so ask for its own methods instead, such as a.lt(b) or a.cmp(b). Also flag a subclass or patch that changes a third-party library's documented behaviour; that belongs upstream. - path: "packages/9-public/@prisma/*/api.txt" instructions: >- This generated file lists everything users can import from a published package: one line for each export of each import path, and one for each of its members. Once a release exports an API, users can depend on it, and removing or breaking it later needs a recorded reason, so review each added and removed line as a promise to users. Follow the review criteria in packages/9-public/AGENTS.md: is each addition meant to be supported until the next major, at the right maturity (a name starting with ea_, preview_ or rc_, capitalised on a type or class as in Ea_Search, may still change); is a new member on an interface that users implement optional; is each removal or change either to a name that carries a level, or recorded as a deliberate break with a reason. Lines that changed only because a non-exported type was renumbered (such as Options_2) or an outside type gained its package prefix are not API changes; say so. Check that the pull request description's "API changes" section names each changed export with a reason that matches the change. - path: "packages/9-public/@prisma/*/api-breaks.json" instructions: >- These files record changes that would otherwise fail CI, because they break code written against the last release. A new record lets one through, so follow the criteria in packages/9-public/AGENTS.md ("A change to a record"): a record of kind break needs a reason a user would accept and a mention in the release notes; a record of kind allowed claims the change is permitted (it is safe for users, or it breaks only an API whose name carries a level), so check that claim, because calling a real break allowed hides it from users. A record replaced with a new fingerprint covers whatever the export's test reports now, not only the break it first covered: check the current break the job reports, not only the reason. - path: "packages/9-public/removed-packages.json" instructions: >- This file records published packages that were removed, which would otherwise fail CI, because that breaks code written against the last release. Every record is a break: follow the criteria in packages/9-public/AGENTS.md ("A change to a record"). It needs a reason a user would accept and a mention in the release notes. - path: "examples/last-release-errors.json" instructions: >- This file records errors that the last release's example apps get against the current build, which CI would otherwise fail on. A new record lets one through, so follow the criteria in packages/9-public/AGENTS.md ("A change to a record"): a record of kind break needs a reason a user would accept and a mention in the release notes; a record of kind allowed claims the change is permitted (it is safe for users, or it breaks only an API whose name carries a level), so check that claim, because calling a real break allowed hides it from users. A record replaced with a new message covers the error the job reports now: compare the new message with the old one, and check that the reason still fits it.