Skip to content

Add GitHub Copilot instructions#827

Open
Copilot wants to merge 13 commits intomainfrom
copilot/setup-copilot-instructions
Open

Add GitHub Copilot instructions#827
Copilot wants to merge 13 commits intomainfrom
copilot/setup-copilot-instructions

Conversation

Copy link
Contributor

Copilot AI commented Feb 17, 2026

  • Understand the repository structure and codebase
  • Create .github/copilot-instructions.md with comprehensive instructions
  • Include information about:
    • Project overview and purpose
    • Build and test commands
    • Development workflow
    • Coding conventions and patterns
    • Architecture and key directories
    • Testing approach
    • Common tasks and how to accomplish them
  • Address code review feedback
    • Clarify Node.js version requirements (18.0.0 minimum, some packages require 20)
    • Clarify that pnpm is Rush's underlying package manager
    • Fix resolveRef example to use Workspace.resolveRef(enhancedSchema, inventory) matching actual API
    • Clarify null safety pattern explanation (return type is EnhancedSchema | undefined)
    • Update rule testing workflow to use test-<RuleName> labels for staging-lint check
    • Clarify that stagingOnly is legacy and staging-lint check is the current approach
    • Simplify deployment process - rules are auto-deployed after PR merge
  • Disable formatting on instructions files by adding **/*instructions.md to .github/.prettierignore
  • Review and validate the instructions file
Original prompt

This section details on the original issue you should resolve

<issue_title>✨ Set up Copilot instructions</issue_title>
<issue_description>Configure instructions for this repository as documented in Best practices for Copilot coding agent in your repository.

</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 17, 2026 18:44
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Copilot AI changed the title [WIP] Set up Copilot instructions for the repository Add GitHub Copilot instructions Feb 17, 2026
Copilot AI requested a review from mikeharder February 17, 2026 18:47
Copy link
Member

@mikeharder mikeharder left a comment

Choose a reason for hiding this comment

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

These auto-gen instructions look good enough to me as a starting point, future updates can be made manually, or by asking copilot to update its own instructions.

@mikeharder mikeharder marked this pull request as ready for review February 17, 2026 18:51
@mikeharder
Copy link
Member

@copilot: disable formatting on agent instructions, by adding **/*instructions.md to .github/.gitignore

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 17, 2026

@copilot: disable formatting on agent instructions, by adding **/*instructions.md to .github/.gitignore

Added **/*instructions.md to .github/.gitignore to disable formatting on agent instructions. (f91bc1b)

@mikeharder
Copy link
Member

@copilot: disable formatting on agent instructions, by adding **/*instructions.md to .github/.gitignore

Added **/*instructions.md to .github/.gitignore to disable formatting on agent instructions. (f91bc1b)

@copilot: sorry, not .gitignore, i mean .prettierignore

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 17, 2026

@copilot: disable formatting on agent instructions, by adding **/*instructions.md to .github/.gitignore

Added **/*instructions.md to .github/.gitignore to disable formatting on agen...

Moved **/*instructions.md to .github/.prettierignore instead of .gitignore. (709940a)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds repository-specific GitHub Copilot guidance and updates formatting ignores so instruction files aren’t auto-formatted.

Changes:

  • Added .github/copilot-instructions.md documenting repo architecture, build/test commands, and key conventions.
  • Updated .github/.prettierignore to exclude *instructions.md files from Prettier formatting.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/copilot-instructions.md Introduces Copilot agent instructions for working effectively in this Rush monorepo.
.github/.prettierignore Excludes instruction markdown files from Prettier formatting runs under .github/.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

mikeharder and others added 2 commits February 17, 2026 11:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI and others added 2 commits February 17, 2026 19:06
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>

### Adding New Linter Rules
1. Add rule to staging pipeline first (set to run only in staging)
2. Wait for at least 10 PRs to verify no false positives
Copy link
Contributor

@AkhilaIlla AkhilaIlla Feb 24, 2026

Choose a reason for hiding this comment

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

isnt this an iterative development? How will it know to analyze production PR's and move to prod?

Also, I dont think the stagingOnly has any significance now as there isnt a staging pipeline.
Instead we can ask it to add the label to trigger the staging-lint check pipeline. Wish it can also validate the errors generated.

5. For significant changes, manually update `changelog.md`

### Adding New Linter Rules
1. Add rule to staging pipeline first (set to run only in staging)
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot
There is no staging pipeline and hence the stagingOnly option doesnt really have any significance.
Instead update this to have the rule name added as a label which will trigger the staging-lint check pipeline.

Also, is there a way you can validate if the errors generated are accurate

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the instructions to reflect the current workflow using test-<RuleName> labels to trigger the staging-lint check pipeline. Added a new section explaining how to test rules with the staging-lint check workflow, and clarified that stagingOnly is now legacy. (7f931c7)

Regarding validation of errors: The staging-lint check workflow generates a linter-findings.txt artifact that you can download to review the violations found. Manual review is currently needed to validate accuracy.

Co-authored-by: AkhilaIlla <36493984+AkhilaIlla@users.noreply.github.com>
1. Add the new rule with appropriate severity and documentation
2. Add a label to your PR in the format `test-<RuleName>` to trigger the staging-lint check pipeline
3. Verify the rule works correctly by checking the staging-lint check results
4. Wait for at least 10 PRs in azure-rest-api-specs to validate no false positives
Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot how are you planning to implement these 2 instructions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These instructions are written for human developers, not for automated implementation. Steps 4-5 describe a validation and release process:

Step 4 (Wait for 10 PRs): This is a manual monitoring step where developers review staging-lint results across multiple PRs to ensure the rule doesn't produce false positives. This requires human judgment and cannot be automated.

Step 5 (Create release PR): This follows the release process in CONTRIBUTING.md, which involves running rush change, updating changelogs, and coordinating deployment. While I can help create the PR, the deployment coordination requires human oversight.

If you'd like to clarify that these are manual steps, I can update the wording to make it more explicit.

Copy link
Contributor

Choose a reason for hiding this comment

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

There is no release PR process.
the author validates the rule using the staging lint check and then the rule is released.

@copilot update based on this context

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the instructions to reflect the actual workflow. Removed references to waiting for 10 PRs and creating a separate release PR. The new steps show that after validation with the staging-lint check, the rule is automatically deployed when the PR is merged. (a25e910)

Co-authored-by: AkhilaIlla <36493984+AkhilaIlla@users.noreply.github.com>
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.

✨ Set up Copilot instructions

4 participants