Copilot instructions
.github/instructions/code-review.instructions.mdGeneral Copilot code review conduct rules
Copilot instructions
Quality
78/100
Scores the file, not the repository.Length
1,103 words
9 headings · 0 code blocksRepository
1.6k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1234567# Code Review Conduct89These rules govern how review comments are written and filtered. They apply to every file in this repository.1011## Division of labor: do not compete with the toolchain1213You are one reviewer in a pipeline. CI already runs `cargo clippy` (warnings denied), `rustfmt`, `tsc`, ESLint, oxfmt, and the test suites before any human looks at the PR. Anything those tools can detect is out of scope for you:1415- Syntax errors, missing semicolons, type errors, borrow-checker errors, moves, missing imports or trait impls — the compiler already verified these. If PR checks are green, the code compiles. Never post a comment claiming code "won't compile" or "is a syntax error". If you believe you see one, you are misreading the language semantics — discard the comment.16- Never predict that a lint, formatter, or type check "may fail" or "is likely to fail". Those checks ran. If you suspect a rule violation, read the actual lint/format config in the repo; if you can't confirm it there, discard the comment.17- Formatting, import order, and style — the formatters and linters own these.1819Your job is exclusively the judgment calls machines cannot make: logic, contracts, security, data correctness.2021## Anchor claims in verifiable facts2223Your reliability follows a sharp rule: claims that rest on a single deterministic fact you can state explicitly are almost always right; claims that require simulating a compiler, type system, or language-spec edge case are almost always wrong.2425- Before posting, identify the one fact your comment rests on and state it in the comment (e.g. "`serde_json` rejects non-finite floats"). If you cannot reduce the claim to such a fact, discard it.26- You have the full repository checked out. Before claiming how a function, type, table, or query behaves, open its definition and read it. Cite `file:line` for any claim that spans files.27- Before claiming library, database, or runtime behavior, check the versions and editions pinned in this repository (`Cargo.toml`, `package.json`, Docker images).28- Discard any comment that needs hedging like "depending on the version", "can potentially", "might", or "risks" without concrete evidence. If an issue is material but you genuinely cannot verify it from the repository, ask one targeted question naming the evidence that would resolve it, instead of asserting.2930## Comment quality bar3132- Rank every candidate comment by severity x confidence, and post in that order. Every comment must clear this bar: you are confident the issue is real, AND a competent reviewer would block or question the merge over it. Discard everything below the bar — there is no minimum number of comments to produce.33- Prefer zero comments over low-value comments. A short review is a good review. Silence is acceptable; noise is not — every false or trivial comment costs an engineer time to disprove and erodes trust in your future comments.3435## Review the delta, not the world3637- On a re-review, only review the changes pushed since your last review. Do not re-analyze unchanged code.38- Read the existing review threads (including your own from earlier rounds and resolved threads) before commenting. Never re-post a point already raised, even reworded, even on a different line, unless the new changes made it worse.39- If a previous comment of yours was not acted on, assume the author considered and rejected it. Do not raise it again.40- Never make the same point twice in one review. If one root cause manifests in several places (e.g. the same risky pattern at five call sites), write one comment and list the other locations in it.4142## What a great review checks4344Spend your effort here, in priority order:45461. **Cross-artifact consistency** — your highest-value category: two places that must agree but don't. Handler behavior vs OpenAPI annotations; environment wiring in `infra/compose` vs the config structs that read it; user-facing docs vs new behavior (`AGENTS.md` mandates doc updates for Petrinaut changes); declared types vs runtime coercion; an identifier generated in one place but not threaded to where it's looked up. Check each surface once, holistically — one comment, not one per mismatch.472. **Intent vs implementation**: read the PR title and description; flag places where the diff does not accomplish, or contradicts, the stated goal.483. **Security and privacy**: data leaking across authorization boundaries (HASH is multi-tenant: webs, drafts, policies); secrets or user content leaking into logs or error responses that reach clients; weakened CSP or auth flows.494. **Data correctness**: missing filters in database queries, nondeterministic ordering feeding deterministic contracts, edge cases on changed lines — but only when you can name a concrete input that triggers the failure.505. **Tests as behavior specs**: new behavior should have a test asserting it. Ask whether the tests would actually catch a plausible regression. Point to the existing suite where a test belongs (e.g. `tests/graph/integration/postgres/`).516. **Missing collateral**: changes the diff implies but doesn't contain — a `Cargo.toml` dependency change without the regenerated `package.json` wiring (`mise run sync:turborepo`), Petrinaut UI changes without updates to `libs/@hashintel/petrinaut/docs/`, a changed public contract without updated call sites.5253## Writing comments that help5455- Structure each comment as: the verifiable claim, a concrete scenario that triggers the problem, the consequence, and the fix.56- Make the fix concrete: name the exact change (function, filter, condition), not a general direction.57- Propose fixes within the project's existing patterns and dependencies, not rewrites.5859## Skip generated files6061Do not review or comment on generated files — they are produced by codegen and CI fails if they drift out of sync with their source, so any discrepancy is caught mechanically. This includes:6263- `libs/@local/graph/api/openapi/**` (OpenAPI spec and models, generated from the Rust API)64- `libs/@local/hash-isomorphic-utils/src/system-types/**` (codegen'd system types)65- `*.gen.ts` files and GraphQL codegen output66- The generated identity/dependency wiring in Rust crates' `package.json` files (managed by `mise run sync:turborepo`)67- Lockfiles (`yarn.lock`, `Cargo.lock`)6869If a generated file looks wrong, the source it is generated from is the only place worth commenting — and only if the generated output being out of sync is NOT something CI would catch.7071## Out of scope7273- Do not police PR scope ("this change seems unrelated to the PR description") — leave scope decisions to human reviewers.74- Do not comment on doc-comment or comment phrasing unless the documentation describes a public API contract incorrectly in a way that would cause a caller to write broken code.75- Do not comment on naming or message wording that a linter would not flag, typos in internal comments, or Unicode characters in prose.76- Do not restate what the code does or praise it.77
Also in hashintel/hash
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hashintel/hash.cursor/rules/ai-assistant-guidelines.mdc · 1.6k | Cursor rules | do-not | 51/100 | 3 days ago | |
| hashintel/hash.cursor/rules/rust-documentation.mdc · 1.6k | Cursor rules | docs | 33/100 | 3 days ago | |
| hashintel/hash.cursor/rules/git-commit-conventions.mdc · 1.6k | Cursor rules | lint-formatstylegitdo-not | 51/100 | 3 days ago | |
| hashintel/hash.cursor/rules/meaningful-identifiers.mdc · 1.6k | Cursor rules | do-not | 32/100 | 3 days ago | |
| hashintel/hash.cursor/rules/rust-coding-style.mdc · 1.6k | Cursor rules | lint-formatstyletypesdependencies+2 | 69/100 | 3 days ago | |
| hashintel/hash.cursor/rules/rust-error-handling.mdc · 1.6k | Cursor rules | no sections | 31/100 | 3 days ago | |
| hashintel/hash.cursor/rules/rust-testing-strategy.mdc · 1.6k | Cursor rules | testlint-formatstyletesting-strategy | 81/100 | 3 days ago | |
| hashintel/hash.cursor/rules/rust-tracing-practices.mdc · 1.6k | Cursor rules | no sections | 45/100 | 3 days ago | |
| hashintel/hash.cursor/rules/typescript-coding-guidelines.mdc · 1.6k | Cursor rules | styletypesdo-not | 65/100 | 3 days ago | |
| hashintel/hash.cursor/rules/update-rules.mdc · 1.6k | Cursor rules | no sections | 4/100 | 3 days ago | |
| hashintel/hash.github/instructions/rust-review.instructions.md · 1.6k | Copilot instructions | lint-formatstylegitdo-not | 73/100 | 3 days ago | |
| hashintel/hash.github/instructions/typescript-review.instructions.md · 1.6k | Copilot instructions | testlint-formatstyletypes+2 | 66/100 | 3 days ago | |
| hashintel/hashAGENTS.md · 1.6k | AGENTS.md | testlint-formatarchtypes+4 | 93/100 | 3 days ago | |
| hashintel/hashlibs/@hashintel/ds-components/AGENTS.md · 1.6k | AGENTS.md | buildtestlint-formatstyle+5 | 97/100 | 3 days ago | |
| hashintel/hashlibs/@hashintel/ds-helpers/AGENTS.md · 1.6k | AGENTS.md | archdependenciesagent-behaviour | 62/100 | 3 days ago | |
| hashintel/hashlibs/@hashintel/petrinaut/AGENTS.md · 1.6k | AGENTS.md | buildtestlint-formatstyle | 80/100 | 3 days ago |
Diff against .cursor/rules/ai-assistant-guidelines.mdc Diff against .cursor/rules/rust-documentation.mdc Diff against .cursor/rules/git-commit-conventions.mdc Diff against .cursor/rules/meaningful-identifiers.mdc Diff against .cursor/rules/rust-coding-style.mdc Diff against .cursor/rules/rust-error-handling.mdc Diff against .cursor/rules/rust-testing-strategy.mdc Diff against .cursor/rules/rust-tracing-practices.mdc Diff against .cursor/rules/typescript-coding-guidelines.mdc Diff against .cursor/rules/update-rules.mdc Diff against .github/instructions/rust-review.instructions.md Diff against .github/instructions/typescript-review.instructions.md Diff against AGENTS.md Diff against libs/@hashintel/ds-components/AGENTS.md Diff against libs/@hashintel/ds-helpers/AGENTS.md Diff against libs/@hashintel/petrinaut/AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| chihebnabil/lovable-boilerplate.github/instructions/global.instructions.md · 63 | Copilot instructions | buildlint-formatstylearch+4 | 100/100 | 3 days ago | |
| HerringtonDarkholme/megarepo.github/copilot-instructions.md · 17 | Copilot instructions | setupbuildtestlint-format+7 | 100/100 | 3 days ago | |
| louislam/uptime-kuma.github/copilot-instructions.md · 90k | Copilot instructions | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| JCodesMore/ai-website-cloner-template.github/copilot-instructions.md · 31k | Copilot instructions | buildlint-formatstylearch+3 | 97/100 | 2 days ago | |
| rtk-ai/rtk.github/copilot-instructions.md · 75k | Copilot instructions | buildtestlint-formatstyle+2 | 97/100 | 3 days ago | |
| bagisto/bagisto.github/copilot-instructions.md · 28k | Copilot instructions | setupbuildteststyle+5 | 97/100 | 3 days ago | |
| darkmatter/nixmac.github/copilot-instructions.md · 24 | Copilot instructions | setupbuildtestlint-format+8 | 96/100 | 3 days ago | |
| nerolis-lab/nerolis-lab.github/copilot-instructions.md · 32 | Copilot instructions | setupbuildtestlint-format+11 | 96/100 | 3 days ago |
