Skip to content

chore: add Copilot custom instructions for code review#105

Merged
bug-ops merged 3 commits into
mainfrom
feat/copilot-instructions
Apr 29, 2026
Merged

chore: add Copilot custom instructions for code review#105
bug-ops merged 3 commits into
mainfrom
feat/copilot-instructions

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 29, 2026

Summary

  • Adds .github/copilot-instructions.md with repository-wide review guidance: architecture overview, lock scope rules, glob anchoring requirement, channel drop-vs-block semantics, and deny.toml license gap detection.
  • Adds six path-specific .github/instructions/*.instructions.md files targeting bridge/lsp, config, mcp, tests, ci, and CHANGELOG.

Motivation

Derived from review findings in #101 and #103. Copilot caught local style issues in those PRs but missed the systemic problems: notification_pump lock starvation, bare glob patterns not matching absolute paths, TOCTOU between stat and read, deny.toml CC0-1.0 gap. These instructions encode those patterns so they are caught automatically in future reviews.

Files

File Scope
copilot-instructions.md whole repo
rust-bridge.instructions.md bridge/**, lsp/**, lib.rs
rust-config.instructions.md config/**, deny.toml, Cargo.toml
mcp-tools.instructions.md mcp/**
tests.instructions.md tests/**
ci.instructions.md workflows/**, deny.toml
changelog.instructions.md CHANGELOG.md

@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Dependency updates rust Rust code changes testing Test-related changes configuration Configuration changes mcpls-core mcpls-core crate changes labels Apr 29, 2026
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.
@bug-ops bug-ops force-pushed the feat/copilot-instructions branch from b9a939e to 2248814 Compare April 29, 2026 11:37
@github-actions github-actions Bot removed documentation Improvements or additions to documentation dependencies Dependency updates rust Rust code changes testing Test-related changes configuration Configuration changes mcpls-core mcpls-core crate changes labels Apr 29, 2026
@bug-ops bug-ops enabled auto-merge (squash) April 29, 2026 11:38
bug-ops added 2 commits April 29, 2026 13:41
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.)
@bug-ops bug-ops merged commit d527242 into main Apr 29, 2026
16 checks passed
@bug-ops bug-ops deleted the feat/copilot-instructions branch April 29, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant