chore: add copilot instructions files for PR review - #7470
chore: add copilot instructions files for PR review#7470cylewitruk-stacks wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds repository-level and path-scoped GitHub Copilot PR review instruction files, tailoring review focus for stacks-core’s main languages and CI automation with an emphasis on consensus safety, correctness, and compatibility.
Changes:
- Introduces repo-wide Copilot PR review guidance in
.github/copilot-instructions.md. - Adds language/subsystem-specific instruction files under
.github/instructions/for Rust, Clarity, TypeScript tests, Markdown docs, and GitHub automation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/copilot-instructions.md | Establishes global PR review priorities and comment threshold for stacks-core. |
| .github/instructions/rust.instructions.md | Adds Rust/core-node and consensus/chainstate-focused review checklist. |
| .github/instructions/clarity.instructions.md | Adds Clarity smart-contract semantics and compatibility review checklist. |
| .github/instructions/typescript.instructions.md | Adds guidance for reviewing TypeScript-based contract integration/property tests. |
| .github/instructions/markdown.instructions.md | Adds correctness-sensitive documentation review checklist. |
| .github/instructions/github-automation.instructions.md | Adds GitHub Actions/CI review checklist for workflows, actions, and scripts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Coverage Report for CI Build 30619669443Coverage decreased (-0.01%) to 86.546%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions148 previously-covered lines in 27 files lost coverage.
Coverage Stats
💛 - Coveralls |
dhaney-stacks
left a comment
There was a problem hiding this comment.
I'm not exactly sure how these will perform, but of course we can merge them and find out!
There was a problem hiding this comment.
I think this is a good starting point.
I've added a few minor comments, and I also wanted to share a couple of thoughts:
- I wonder whether these Copilot instructions could somehow be picked up directly from the workspace, so developers using Copilot (or potentially any coding agent) would inadvertently use this "lightest" form of code review. You may have already tested this locally, but I just wanted to double-check.
- Could we also add an instruction about inserting or updating the license header for
.rsfiles?
| - Check descriptions of RPC responses, configuration defaults, events, contract return values, fees, and credited amounts against the changed implementation. | ||
| - Verify changed commands, filenames, workflow names, flags, code examples, links, anchors, and sample output. | ||
| - Treat operator, upgrade, release, mining, signing, and security documentation as correctness-sensitive. | ||
| - Verify changelog entries describe the user-visible impact and use the repository's expected category and component. |
There was a problem hiding this comment.
actually our PR changelog fragments have not .md but we have chagenlog.d/* path and stacks-signer/changelog.d/*
There was a problem hiding this comment.
This was more referring to the final rendered CHANGELOG.md, but we could add a separate instructions file for changelog.d/** if we want to add some specific instructions for files there?
There was a problem hiding this comment.
maybe we could refer to chagenlog.d/README.md guidelines and probably the same entry Verify changelog entries describe the user-visible impact and use the repository's expected category and component. could apply also in this case?
The idea could be to tackle issue before composing the final CHANGELOG.md.
However, feel free to resolve this, if we want to evaluate improvements for later
|
|
||
| # Markdown and repository-documentation review guidance | ||
|
|
||
| - Check descriptions of RPC responses, configuration defaults, events, contract return values, fees, and credited amounts against the changed implementation. |
There was a problem hiding this comment.
Should we extend this to cover RPC yaml files in docs/rpc/**/*.yaml?
There was a problem hiding this comment.
I'd probably write a separate "RPC docs" instructions file for this that is scoped specifically to the related files and describing explicitly everything that needs to be checked tbh
Likely not; these file locations are pretty GH/Copilot-specific. What we'd likely need to make that work is having a root
Good idea 👍 |
This PR adds specific instruction files to be used by Copilot PR reviews.
These were largely generated by Copilot's own "generate instructions files" tooling, but I had Codex look through a few pages of recent PR's and analyze what reviewers react on (both positive and negative), what Copilot comments on and how "humans" react to its various comments, etc.
So, this is intended to be a first version to be iterated upon.