Skip to content

Add new instruction on commenting for self-explanatory code with less comments#93

Merged
aaronpowell merged 1 commit into
github:mainfrom
yukidukie:self-explanatory-code-commenting-instruction
Jul 13, 2025
Merged

Add new instruction on commenting for self-explanatory code with less comments#93
aaronpowell merged 1 commit into
github:mainfrom
yukidukie:self-explanatory-code-commenting-instruction

Conversation

@yukidukie

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • My contribution adds a new instruction, prompt, or chat mode file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, or chat mode with GitHub Copilot.
  • I have run node update-readme.js and verified that README.md is up to date.

Description

Added a new instruction on commenting for projects that prefer less comments with self-explanatory code. With this instruction, Copilot writes less comments avoiding redundant ones but still comments important and meaningful ones.
Although the contributing guideline says Keep it focused with technology or framework which I definitely agree to, since this instruction is about commenting, I did not really specify any language or framework except examples in the instruction are written in JavaScript but I believe it could be used for lots of different languages.


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New chat mode file.
  • Other (please specify):

Additional Notes


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Copilot AI review requested due to automatic review settings July 13, 2025 18:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a new Copilot instruction file to guide self-explanatory code commenting and updates the README to include it.

  • Introduces self-explanatory-code-commenting.instructions.md with guidelines on writing minimal yet meaningful comments.
  • Updates README.md to list and link the new instruction file.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
instructions/self-explanatory-code-commenting.instructions.md New instruction file defining commenting guidelines
README.md Added entry for the self-explanatory code commenting instructions

@@ -0,0 +1,162 @@
---
description: 'Guidelines for GitHub Copilot to write comments to achieve self-explanatory code with less comments. Examples are in JavaScript but it should work on any language that has comments.'
applyTo: "**"

Copilot AI Jul 13, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrap the applyTo value in single quotes (e.g., applyTo: '**') to comply with front matter quoting guidelines.

Copilot generated this review using guidance from repository custom instructions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the code to use single quotes.

@yukidukie yukidukie force-pushed the self-explanatory-code-commenting-instruction branch from 406f762 to f2db3cb Compare July 13, 2025 18:20
@aaronpowell aaronpowell merged commit 11a0820 into github:main Jul 13, 2025
2 checks passed
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.

3 participants