-
Notifications
You must be signed in to change notification settings - Fork 112
Add Copilot configuration files #2020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ltrowleyaus-star
wants to merge
2
commits into
PowerShell:master
Choose a base branch
from
ltrowleyaus-star:ltrowleyaus-star-effective-invention
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+80
−0
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| description: "Repository-aware bug-fix mode for PSResourceGet." | ||
| model: GPT-4.1 | ||
| --- | ||
|
|
||
| # PSResourceGet bug-fix mode | ||
|
|
||
| You are working in the PSResourceGet repository. | ||
|
|
||
| Follow these rules: | ||
| - Start by identifying the exact files and tests involved in the bug. | ||
| - Prefer minimal scope and root-cause fixes over broad refactors. | ||
| - Validate the relevant build or Pester tests before finishing. | ||
| - Preserve PowerShell compatibility and current module behavior. | ||
| - Keep the change aligned with the project patterns in `src/`, `test/`, and the build scripts. | ||
|
|
||
| When a fix is required: | ||
| 1. Investigate the root cause. | ||
| 2. Add or update the smallest appropriate test. | ||
| 3. Implement the fix. | ||
| 4. Run the narrowest relevant validation command. | ||
| 5. Report the result with evidence. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Copilot instructions for PSResourceGet | ||
|
|
||
| ## Project context | ||
| - This repository contains `Microsoft.PowerShell.PSResourceGet`, a PowerShell module for discovering, installing, updating, and publishing PowerShell resources. | ||
| - Source code lives under `src/code` and the compiled module is packaged from `src/Microsoft.PowerShell.PSResourceGet.psm1` and related assets. | ||
| - Tests live under `test/` and are typically PowerShell-based Pester tests. | ||
|
|
||
| ## Build and validation | ||
| - Build the .NET project with: | ||
| - `dotnet build src/code /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary` | ||
| - For repo-local builds that match the project tasks, prefer the existing build definitions in `.vscode/tasks.json`. | ||
| - Run focused validation with PowerShell/Pester for the relevant test area before claiming a fix is complete. | ||
| - If a change affects packaging or module behavior, validate the relevant Pester files in `test/` and ensure the build still succeeds. | ||
|
|
||
| ## Coding guidance | ||
| - Keep changes aligned with the existing PowerShell module and .NET project conventions. | ||
| - Favor small, targeted fixes with clear names and minimal scope. | ||
| - Preserve compatibility with supported PowerShell versions and the current public module behavior. | ||
| - Prefer existing helper patterns and repository conventions over introducing new abstractions. | ||
|
|
||
| ## Scope for agent work | ||
| - When asked to fix a bug, first identify the relevant files and tests, then implement the minimum fix that addresses the root cause. | ||
| - When adding or modifying behavior, make sure the corresponding tests reflect the change and remain realistic. | ||
| - When working on release or package concerns, respect repository build scripts and the module packaging expectations under `src/`. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| applyTo: "src/**/*.cs,src/**/*.ps1,test/**/*.ps1,**/*.psm1,**/*.psd1,**/*.md" | ||
| --- | ||
|
|
||
| # PSResourceGet repository instructions | ||
|
|
||
| - Treat this repo as the PowerShell module `Microsoft.PowerShell.PSResourceGet`. | ||
| - Favor small, targeted fixes that match the existing module and .NET conventions. | ||
| - Preserve compatibility with supported PowerShell versions and public behavior. | ||
| - Prefer repo-local build and validation commands before introducing new workflows. | ||
| - When fixing issues, identify the root cause, add or update the relevant test, and validate the narrowest scope possible. | ||
| - Keep changes limited to the issue being addressed; avoid unrelated refactors. | ||
| - For packaging or module behavior changes, validate the relevant Pester files under `test/` and ensure the project still builds. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| mode: agent | ||
| description: "Fix a PSResourceGet issue using the repository's build, test, and module conventions." | ||
| --- | ||
|
|
||
| # PSResourceGet fix workflow | ||
|
|
||
| Use this workflow when fixing a bug, regression, or issue in `Microsoft.PowerShell.PSResourceGet`. | ||
|
|
||
| 1. Locate the relevant code and tests in `src/` and `test/`. | ||
| 2. Identify the root cause and confirm which behavior is currently failing. | ||
| 3. Add or update the smallest realistic test that captures the issue. | ||
| 4. Implement the minimal code fix that addresses the root cause. | ||
| 5. Validate with the focused build or test command for the affected area. | ||
| 6. Summarize the change and evidence. | ||
|
|
||
| Repository-specific expectations: | ||
| - Prefer `dotnet build src/code /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary` for the .NET build. | ||
| - Use PowerShell/Pester tests in `test/` for behavioral validation where relevant. | ||
| - Keep the fix aligned with the existing module conventions and public contract. | ||
| - Avoid broad refactors or unrelated cleanup while the bug is being fixed. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.