chore: add Copilot custom instructions for code review#105
Merged
Conversation
Repository-wide instructions (.github/copilot-instructions.md) cover architecture overview, lock scope rules, glob anchoring, channel semantics, and deny.toml license gaps. Path-specific instruction files cover: - bridge/lsp: TOCTOU, version overflow, notification_pump deadlock, file watcher - config/deps: license allow list, serde round-trip tests, TOML defaults - mcp: 1-based positions, JsonSchema derive, tool dispatch completeness - tests: #[ignore] hygiene, resync coverage, glob pattern correctness - ci: feature flag parity, RUSTDOCFLAGS, MSRV guards - CHANGELOG: breaking change format, PR references Instructions are derived from findings in PR #101 and #103 reviews.
b9a939e to
2248814
Compare
Remove project-specific file references, line numbers, and PR mentions. Instructions now describe general principles with examples only where needed to illustrate correct behaviour.
…and MSRV guidance Add sections on: - Newtype patterns and typestate for domain values - Idiomatic error handling (let-else, ?, avoid unwrap in production) - Lock scope rules and async concurrency patterns (join!, try_send) - API currency: suggest MSRV bumps when newer std APIs cover existing deps - Examples of stable APIs worth adopting (let-else 1.65, OnceLock 1.70, etc.)
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.
Summary
.github/copilot-instructions.mdwith repository-wide review guidance: architecture overview, lock scope rules, glob anchoring requirement, channel drop-vs-block semantics, anddeny.tomllicense gap detection..github/instructions/*.instructions.mdfiles targetingbridge/lsp,config,mcp,tests,ci, andCHANGELOG.Motivation
Derived from review findings in #101 and #103. Copilot caught local style issues in those PRs but missed the systemic problems:
notification_pumplock starvation, bare glob patterns not matching absolute paths, TOCTOU between stat and read,deny.tomlCC0-1.0 gap. These instructions encode those patterns so they are caught automatically in future reviews.Files
copilot-instructions.mdrust-bridge.instructions.mdbridge/**,lsp/**,lib.rsrust-config.instructions.mdconfig/**,deny.toml,Cargo.tomlmcp-tools.instructions.mdmcp/**tests.instructions.mdtests/**ci.instructions.mdworkflows/**,deny.tomlchangelog.instructions.mdCHANGELOG.md