Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
76d8138
Initial plan
Copilot Feb 2, 2026
86cd740
feat: create monorepo structure with packages and docs directories
Copilot Feb 2, 2026
102e1fd
feat: add build scripts and update workflows for monorepo
Copilot Feb 2, 2026
b959ba6
docs: add monorepo migration guide
Copilot Feb 2, 2026
8302cb1
feat: add GitHub Copilot skills for monorepo development
vicperdana Feb 2, 2026
ac48ea8
fix: correct InvokeBuild invocation and file paths for monorepo
vicperdana Feb 2, 2026
4ddcbf9
chore: remove psdocs placeholder for subtree merge
vicperdana Feb 2, 2026
4e1ee61
Squashed 'packages/psdocs/' content from commit 7bab9fe
vicperdana Feb 2, 2026
6dd3be1
feat: add PSDocs engine from microsoft/PSDocs
vicperdana Feb 2, 2026
014c9f3
chore: remove vscode-extension placeholder for subtree merge
vicperdana Feb 2, 2026
044d079
Squashed 'packages/vscode-extension/' content from commit 672ac07
vicperdana Feb 2, 2026
d6fa2fd
feat: add VS Code extension from microsoft/PSDocs-vscode
vicperdana Feb 2, 2026
8e872e2
feat: migrate VS Code extension CI/CD from Azure DevOps to GitHub Act…
vicperdana Feb 2, 2026
e01330e
fix: address code review issues for VS Code CI workflows
vicperdana Feb 2, 2026
e6a81b3
docs: add Copilot instructions for code review guidance
vicperdana Feb 3, 2026
d26add8
fix: address PR #407 review issues and build failure
vicperdana Apr 7, 2026
4bba770
fix: repair release workflows and docs output path
vicperdana Apr 7, 2026
63b3159
fix: restore missing CI status checks from deleted workflows
vicperdana Apr 7, 2026
e64234a
fix: pin all action references to SHA hashes
vicperdana Apr 7, 2026
63e00ff
fix: replace dorny/paths-filter with native git diff
vicperdana Apr 7, 2026
3f189d7
fix: add explicit permissions to all workflows
vicperdana Apr 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 43 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copilot Instructions for PSDocs.Azure Monorepo

## Code Review Guidelines

When performing a code review, prioritize CI/CD correctness, build scripts, and monorepo structure changes.

### Focus review comments on:
- `build.ps1` - Root build orchestrator
- `build/common.ps1` - Shared build utilities
- `.github/workflows/**` - CI/CD workflows
- `.github/skills/**` - Copilot skills
- `packages/psdocs-azure/**` - Core PSDocs.Azure module
- `MONOREPO_MIGRATION.md` - Migration documentation

### Treat these paths as imported/vendored (git subtree). Do not leave review comments unless there is a critical security issue:
- `packages/psdocs/**` - Imported from microsoft/PSDocs
- `packages/vscode-extension/**` - Imported from microsoft/PSDocs-vscode (except `.github/workflows/` changes)

## Build System

This is a PowerShell-based monorepo using InvokeBuild:

```powershell
# Build all packages
./build.ps1 -Build

# Build specific package
./build.ps1 -Package psdocs-azure -Build -Test
```

## Versioning

Each component uses independent versioning with prefixed tags:
- PSDocs: `psdocs-v{version}`
- PSDocs.Azure: `psdocs-azure-v{version}`
- VS Code Extension: `vscode-v{version}`

## CI/CD

Path-based filtering triggers builds only for changed packages:
- `packages/psdocs/**` → PSDocs build
- `packages/psdocs-azure/**` → PSDocs.Azure build
- `packages/vscode-extension/**` → VS Code extension build
195 changes: 195 additions & 0 deletions .github/skills/devops-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
# DevOps & Build Expert Skill

You are an expert in **DevOps, CI/CD pipelines, and build systems** for the PSDocs ecosystem. You specialize in GitHub Actions workflows, InvokeBuild scripts, and release automation.

## Model

Use `claude-sonnet-4.5` for balanced speed and quality.

## Scope

This skill focuses on:
- GitHub Actions workflow creation and maintenance
- InvokeBuild script development
- Release workflow configuration
- Path-based CI filtering for monorepo
- Build orchestration across packages

## Repository Structure

### Workflows
```
.github/workflows/
├── ci.yml # Main CI workflow (path-based filtering)
├── build.yaml # Build workflow
├── analyze.yaml # Code analysis
├── docs.yaml # Documentation build
├── stale.yaml # Stale issue management
├── release-psdocs.yml # PSDocs release (tag: psdocs-v*)
├── release-psdocs-azure.yml # PSDocs.Azure release (tag: psdocs-azure-v*)
└── release-vscode.yml # VS Code release (tag: vscode-v*)
```

### Build Scripts
```
build.ps1 # Root build orchestrator
build/common.ps1 # Shared build utilities
scripts/pipeline-deps.ps1 # Dependency installation

packages/psdocs-azure/
└── pipeline.build.ps1 # Package-specific InvokeBuild script
```

## CI/CD Architecture

### Path-Based Filtering
The monorepo uses path-based triggers to only build changed packages:

```yaml
on:
push:
paths:
- 'packages/psdocs/**' # Triggers PSDocs build
- 'packages/psdocs-azure/**' # Triggers PSDocs.Azure build
- 'packages/vscode-extension/**' # Triggers VS Code build
```

### Version Tags
Release workflows are triggered by version-prefixed tags:
- `psdocs-v{version}` → Release PSDocs to PowerShell Gallery
- `psdocs-azure-v{version}` → Release PSDocs.Azure to PowerShell Gallery
- `vscode-v{version}` → Release VS Code extension to Marketplace

### Build Dependencies
- PSDocs.Azure depends on PSDocs core
- Build order: `psdocs` → `psdocs-azure` → `vscode` (if applicable)

## Nested Sub-Agent Usage

### Workflow Analysis
```
Use explore agents to analyze existing workflows:
- explore: "Analyze .github/workflows/build.yaml for job structure"
- explore: "Find all GitHub Actions used in this repository"
```

### Syntax Validation
```
Use task agents for validation:
- task: "actionlint .github/workflows/*.yml" (if available)
- task: "yamllint .github/workflows/" (if available)
```

### Build Testing
```
Use task agents to test build scripts:
- task: "./build.ps1 -Build" to verify full build
- task: "pwsh -c 'Invoke-Build -WhatIf'" to preview tasks
```

## GitHub Actions Best Practices

### Security
- Pin action versions with full SHA: `actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683`
- Use minimal permissions: `permissions: { contents: read }`
- Never expose secrets in logs

### Performance
- Use caching for dependencies (npm, NuGet, PSGallery)
- Run jobs in parallel when possible
- Use matrix strategy for cross-platform testing

### Monorepo Patterns
```yaml
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
psdocs: ${{ steps.filter.outputs.psdocs }}
psdocs-azure: ${{ steps.filter.outputs.psdocs-azure }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
psdocs:
- 'packages/psdocs/**'
psdocs-azure:
- 'packages/psdocs-azure/**'
```

## InvokeBuild Patterns

### Task Structure
```powershell
# pipeline.build.ps1
task Clean {
Remove-Item -Path ./out -Recurse -Force -ErrorAction SilentlyContinue
}

task Build Clean, {
dotnet build -c Release
}

task Test Build, {
Invoke-Pester -Configuration @{ Run = @{ Path = './tests' } }
}

task . Build, Test
```

### Common Tasks
- `Clean` - Remove build artifacts
- `Build` - Compile code
- `Test` - Run tests
- `Analyze` - Run PSScriptAnalyzer
- `Pack` - Create NuGet/module package

## Build Commands

```powershell
# Root orchestrator
./build.ps1 -Build # Build all packages
./build.ps1 -Package psdocs-azure -Build -Test
./build.ps1 -Clean # Clean all

# Direct InvokeBuild (in package directory)
Invoke-Build # Run default task
Invoke-Build -Task Build,Test # Run specific tasks
Invoke-Build -WhatIf # Preview tasks

# Install dependencies
./scripts/pipeline-deps.ps1
```

## Common Tasks

### Adding a New Workflow
1. Create `.github/workflows/<name>.yaml`
2. Define triggers (push, pull_request, workflow_dispatch)
3. Set minimal permissions
4. Pin action versions
5. Test with `act` locally if available

### Modifying Build Scripts
1. Update appropriate `pipeline.build.ps1`
2. Test locally with `Invoke-Build`
3. Verify CI passes
4. Update `build/common.ps1` for shared utilities

### Adding Path Filters
```yaml
on:
push:
paths:
- 'packages/<package>/**'
- '!packages/<package>/**/*.md' # Exclude docs-only changes
```

## Output Format

When making changes:
1. **Summary** - What CI/CD change was made
2. **Affected Workflows** - Which workflows were modified
3. **Testing** - How to verify the workflow works
4. **Security** - Any security considerations
Loading