Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,35 @@ All tracking files use markdown format with frontmatter and follow patterns from
* Scripts follow instructions provided by the codebase for convention and standards.
* Scripts used by the codebase have an `npm run` script for ease of use.

PowerShell scripts follow PSScriptAnalyzer rules from `PSScriptAnalyzer.psd1` and include proper comment-based help. Validation runs via `npm run psscriptanalyzer` with results output to `logs/`.
PowerShell scripts follow PSScriptAnalyzer rules from `PSScriptAnalyzer.psd1` and include proper comment-based help. Validation runs via `npm run lint:ps` with results output to `logs/`.
<!-- </script-operations> -->

<!-- <coding-agent-environment> -->
## Coding Agent Environment

Copilot Coding Agent uses a cloud-based GitHub Actions environment, separate from the local devcontainer. The `.github/workflows/copilot-setup-steps.yml` workflow pre-installs tools to match devcontainer capabilities.

### Pre-installed Tools

* Node.js 20 with npm dependencies from `package.json`
* Python 3.11
* PowerShell 7 with Pester 5.7.1 and PowerShell-Yaml modules
Comment thread
katriendg marked this conversation as resolved.
* shellcheck for bash script validation (pre-installed on ubuntu-latest)

### Using npm Scripts

Agents should use npm scripts for all validation:

* `npm run lint:md` - Markdown linting
* `npm run lint:ps` - PowerShell analysis
* `npm run lint:yaml` - YAML validation
* `npm run lint:frontmatter` - Frontmatter validation
* `npm run lint:all` - Run all linters
* `npm run test:ps` - PowerShell tests

### Environment Synchronization

The `copilot-setup-steps.yml` mirrors tools from `.devcontainer/scripts/on-create.sh` and `.devcontainer/scripts/post-create.sh`. When adding tools to the devcontainer, update the setup workflow to maintain parity.
<!-- </coding-agent-environment> -->

🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.
65 changes: 65 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: MIT
#
# copilot-setup-steps.yml
# Pre-install tools and dependencies for GitHub Copilot Coding Agent
# Reference: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment

name: "Copilot Setup Steps"

# Auto-run on push/PR to validate the setup workflow
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml

jobs:
# Job MUST be named 'copilot-setup-steps' to be recognized by Copilot
copilot-setup-steps:
runs-on: ubuntu-latest

# Minimal permissions; Copilot receives its own token for operations
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.2.2
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238
with:
node-version: "20"
cache: "npm"

- name: Install JavaScript dependencies
run: npm ci

- name: Set up Python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: "3.11"

- name: Install PowerShell modules
shell: pwsh
run: |
Install-Module -Name PowerShell-Yaml -Force -Scope CurrentUser
Comment thread
katriendg marked this conversation as resolved.
Comment thread
katriendg marked this conversation as resolved.
Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser

- name: Verify tool availability
run: |
echo "=== Tool Versions ==="
node --version
npm --version
python3 --version
pwsh --version
shellcheck --version
echo ""
echo "=== npm Scripts Available ==="
npm run --list
Loading