revive icon indicating copy to clipboard operation
revive copied to clipboard

Add `copilot-instructions.md` for better copilot code-reviews

Open vbvictor opened this issue 5 months ago • 5 comments

Is your feature request related to a problem? Please describe.

When Copilot perform code review, he can do a better job by following custom instructions in .github/copilot-instructions.md. Potential contents of the file could be the following (up to debate):

When prefroming a code review, check for these particular problems:

- Does new functionality is covered with comprehensive tests. Does tests cover all edge-cases?
- Does the code adhere "Effective Go" guidelines? Is the code simple and readable?
- If this is a new rule or a new option of a rule, does the PR add according documentation in RULES_DESCRIPTIONS.md and README.md for this rule or rule option?

Additional context Docs about the feature. And how to enable it.

vbvictor avatar Jul 21 '25 13:07 vbvictor

I'd propose to ask github copilot to propose good instructions for itself ;)

denisvmedia avatar Jul 24 '25 09:07 denisvmedia

Hi @vbvictor, thanks for the contribution.

It seems that using "IA" for PR reviews has become "natural". Personally I'm not comfortable with using "IA" in general. It's a personal choice, thus I'll let the other maintainers continue this thread.

Thanks again.

chavacava avatar Jul 24 '25 09:07 chavacava

I'm personally +- on AI review, but I've seen it is used here. So it could be a good idea to give some knowledge and guidelines for AI to follow.

vbvictor avatar Jul 24 '25 12:07 vbvictor

Based on the feedback comments from #1437, I reopened this issue.

Tasks to complete

  1. Rename .github/instructions/go.instructions to .github/copilot-instructions.md.
  2. Extend .github/copilot-instructions.md with project-specific instructions. See this example for inspiration.
  3. Create a PR that closes both #1433 and #1439.

alexandear avatar Jul 31 '25 12:07 alexandear

🚀 Looking forward to review it @alexandear

denisvmedia avatar Aug 01 '25 16:08 denisvmedia