Skip to content

Conversation

@nirav-raval
Copy link
Contributor

🎯 Aim

Improve copilot-instructions.md to give GitHub Copilot Agent clearer operational rules regarding branching, PR targets, dependency restrictions, and required use of contributing.md.

📷 Result

N/A

✅ What was done

  • Added rules enforcing dev branch as source and PR target
  • Added rule to always consult contributing.md
  • Added restriction preventing Copilot Agent from introducing new npm packages
  • Added restriction preventing updates to npm-shrinkwrap.json unless explicitly required
  • Updated context guidance for Copilot Agent

🔗 Related issue

Closes: #564

@nirav-raval nirav-raval marked this pull request as ready for review November 24, 2025 01:27
@Saurabh7019 Saurabh7019 self-assigned this Nov 24, 2025
@Saurabh7019
Copy link
Collaborator

Thank you, @nirav-raval ! We will review it soon.

Copy link
Contributor

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

This PR extends the .github/copilot-instructions.md file to provide clearer operational rules for GitHub Copilot Agent, including branching conventions, dependency management restrictions, and testing requirements. The changes aim to enforce the dev branch workflow, prevent unauthorized dependency additions, and ensure Copilot Agent consults contributing.md for workflow guidance.

Key changes:

  • Added "Contribution & Branching Rules" section enforcing dev branch as source and PR target
  • Added dependency management restrictions preventing unauthorized npm package additions
  • Added "Testing & Validation" and "Security and privacy" sections with operational guidelines

Issues identified:

  • Filename references use incorrect casing (contribution.md instead of contributing.md, CONTRIBUTING.md instead of contributing.md)
  • Tool names were incorrectly changed from correct add_spo_list pattern to incorrect spo_list_add pattern
  • Dependency management rules are placed within "Extension Dependencies" subsection, mixing listing with rules

@Saurabh7019
Copy link
Collaborator

Hi @nirav-raval, could you please address the issues identified in the Copilot review before we test the flow? Also, 'Contribution & Branching Rules' section seems to be out of place. Could you add a new main section (right after 'Architecture Overview') called 'Key Considerations' and consolidate all of the do's and don'ts under it? including all your changes in - Contribution & Branching Rules, Extension Dependencies, File Changes & Documentation, Testing, and Security and privacy

@nirav-raval nirav-raval marked this pull request as draft November 25, 2025 00:17
@nirav-raval nirav-raval marked this pull request as ready for review November 25, 2025 00:44
nirav-raval and others added 2 commits November 26, 2025 15:27
Update .github/copilot-instructions.md

Co-authored-by: Copilot <[email protected]>

Update .github/copilot-instructions.md

Co-authored-by: Copilot <[email protected]>

Update .github/copilot-instructions.md

Co-authored-by: Copilot <[email protected]>

Update .github/copilot-instructions.md

Co-authored-by: Copilot <[email protected]>

Repositioned content under separate section
@Saurabh7019 Saurabh7019 force-pushed the update/copilot-instructions-guidelines branch from c595407 to c0f289a Compare November 26, 2025 14:29
Copy link
Collaborator

@Saurabh7019 Saurabh7019 left a comment

Choose a reason for hiding this comment

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

I modified some of the instructions so they apply correctly to the GitHub Copilot autonomous agent. Removed items that were targeted at human contributors, like, anything referring to 'running locally', 'manual testing', or 'consult a maintainer' without a clear alternative (e.g., creating a draft PR or adding a note).

Also, for future PRs, let's keep the number of commits limited.. ideally one per PR, two at most if review changes are needed. I have cleaned this PR already, just noting it for future runs.

@Saurabh7019 Saurabh7019 merged commit 1eefde7 into pnp:dev Nov 26, 2025
1 check 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.

Update copilot-instructions.md to be more helpful for GitHub Copilot Agent

2 participants