docs: add .github/copilot-instructions.md and require mirroring into it - #1878
Closed
cliffhall wants to merge 1 commit into
Closed
docs: add .github/copilot-instructions.md and require mirroring into it#1878cliffhall wants to merge 1 commit into
cliffhall wants to merge 1 commit into
Conversation
GitHub Copilot reads .github/copilot-instructions.md when reviewing a PR. The repo had no such file, so Copilot reviewed without any of the conventions that actually govern this codebase — the ban on `any` and on unjustified double casts, the Mantine-first styling rules, the `.withProps()` extraction rule, the lib/utils split, test placement, and the per-file >=90% four-dimension gate. The new file is a review-focused distillation of AGENTS.md: the rules a reviewer would cite against a diff, plus a short "what to prioritize" list that puts correctness and security first (this backend spawns processes and proxies outbound requests). Deliberately omitted: board recipes and IDs, milestone and branch mechanics, release procedure, and the project tree — no reviewer cites those, and copying them would double the maintenance surface. AGENTS.md's "Keep documentation files up to date" section now requires mirroring review-relevant changes into it in the same PR, states that AGENTS.md stays the source of truth, and spells out what counts as review-relevant. There is no generation step and nothing detects drift, so the rule is the only thing keeping the two in sync. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YAt8rqxysNbhYWLhoRm3fU
Member
Author
|
Folded into #1866 — same commit, cherry-picked cleanly. Consolidating so there's one modification to Nothing is lost: the commit |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1877
GitHub Copilot reads
.github/copilot-instructions.mdwhen it reviews a PR. We didn't have one, so Copilot has been reviewing against generic defaults rather than this codebase's actual (and unusually specific) conventions.The file
A review-focused distillation of
AGENTS.md— the rules a reviewer would cite against a diff:any, no suppressing error types in config, no@ts-nocheck/@ts-ignore, and the double-cast rule including when anas unknown asis acceptable (documented third-party type gap or structurally-identical shapes) and that it must carry a justifying comment.App.cssat all..withProps()rule in full, including the part most often missed — single-use elements are not exempt — the static-vs-dynamic distinction (content/accessibility literals don't count toward the two), and all five legitimate exceptions (Box,Accordion, headless components,data-*, non-factory components).libvsutils, the one-way import direction, and the warning that the coverageincludeis a whitelist, so a module outside the named directories silently escapes the gate.v8 ignorepolicy that forbids lowering it, test placement (web side-by-side vs.__tests__/for the Node clients), and the mandatoryrenderWithMantine.npm run cibefore pushing and whyvalidateisn't a substitute,Closes #N, exactly one version label.Deliberately excluded: board recipes and IDs, milestone and branch-naming mechanics, release and publishing procedure, and the project-structure tree. No reviewer cites those against a diff, and copying them would double the maintenance surface.
The AGENTS.md amendment
"Keep documentation files up to date" now requires mirroring review-relevant changes into
copilot-instructions.mdin the same PR, and:AGENTS.mdremains the source of truth — never edit the mirror alone to change a rule;Known weakness, stated rather than hidden
Nothing detects drift between the two files — there's no generation step and no CI check. The mirroring rule is the only thing keeping them in sync, and a stale mirror is worse than no mirror, because Copilot would then review confidently against rules we no longer hold. The file's own header says
AGENTS.mdwins on any disagreement and that drift is itself worth flagging in review. If it drifts in practice, the follow-up is a CI check that fails whenAGENTS.md's review-relevant sections change without a corresponding mirror change — which is why the rule reads "same PR" and not "eventually."Testing
Docs only — no gate reads either file (
format:checkglobs cover{ts,tsx,mts,cts,js,jsx,mjs,cjs}, not.md).npx prettier --check .github/copilot-instructions.mdpasses anyway, since it's a new file.Not verified from here: whether Copilot actually picks the file up on the next review — worth eyeballing on the first PR after this merges.
🤖 Generated with Claude Code
https://claude.ai/code/session_01YAt8rqxysNbhYWLhoRm3fU