README.md

March 18, 2026 · View on GitHub

This directory contains PowerShell scripts for preparing, packaging, and publishing the HVE Core VS Code extension.

Architecture

The extension packaging pipeline follows a three-stage process:

  1. Find-CollectionManifests.ps1 discovers collection manifests and builds a packaging matrix
  2. Prepare-Extension.ps1 gathers agents, prompts, instructions, and skills, filtering by maturity and channel
  3. Package-Extension.ps1 produces one .vsix per collection using vsce

All three scripts import CIHelpers.psm1 and CollectionHelpers.psm1 for CI platform detection and YAML manifest parsing.

Scripts

Prepare-Extension.ps1

Prepares extension contents by auto-discovering agents, prompts, instructions, and skills from the repository.

Purpose: Gather and filter artifacts for inclusion in the extension package.

Features

  • Auto-discovers .agent.md, .prompt.md, .instructions.md, and SKILL.md files
  • Filters artifacts by maturity level and release channel
  • Supports collection-scoped preparation
  • Dry-run mode for previewing changes

Parameters

  • -ChangelogPath - Path to the changelog file
  • -Channel - Release channel: Stable or PreRelease
  • -DryRun (switch) - Preview changes without modifying files
  • -Collection - Collection name for scoped preparation

Usage

# Prepare stable channel
./scripts/extension/Prepare-Extension.ps1

# Prepare pre-release channel
./scripts/extension/Prepare-Extension.ps1 -Channel PreRelease

# Dry run to preview
./scripts/extension/Prepare-Extension.ps1 -DryRun

Package-Extension.ps1

Packages the VS Code extension into a .vsix file using vsce.

Purpose: Produce a distributable extension package from prepared contents.

Features

  • Sets version from parameters or changelog
  • Supports pre-release and dev patch builds
  • Collection-scoped packaging
  • Dry-run mode for validation

Parameters

  • -Version - Explicit version string
  • -DevPatchNumber - Development patch number for dev builds
  • -ChangelogPath - Path to the changelog file
  • -PreRelease (switch) - Mark as pre-release build
  • -Collection - Collection name for scoped packaging
  • -DryRun (switch) - Preview changes without producing a package

Usage

# Package the extension
./scripts/extension/Package-Extension.ps1

# Package a pre-release build
./scripts/extension/Package-Extension.ps1 -PreRelease

# Package a specific collection
./scripts/extension/Package-Extension.ps1 -Collection hve-core

Find-CollectionManifests.ps1

Discovers collection manifests for the packaging matrix.

Purpose: Build a list of collections to package based on channel and maturity rules.

Features

  • Scans collections/ for .collection.yml files
  • Filters collections by maturity and channel
  • Outputs a matrix for CI workflow consumption

Parameters

  • -Channel - Release channel filter: Stable or PreRelease
  • -CollectionsDir - Path to the collections directory

Usage

# Discover stable collections
./scripts/extension/Find-CollectionManifests.ps1 -Channel Stable

# Discover all collections for pre-release
./scripts/extension/Find-CollectionManifests.ps1 -Channel PreRelease

npm Scripts

npm ScriptDescription
extension:preparePrepare stable channel
extension:prepare:prereleasePrepare pre-release channel
extension:packagePackage extension
extension:package:prereleasePackage pre-release extension
package:extensionAlias for extension:package

GitHub Actions Integration

The extension packaging workflow (extension-package.yml) orchestrates all three scripts:

  1. Find-CollectionManifests.ps1 produces the collection matrix
  2. Prepare-Extension.ps1 runs per collection to gather artifacts
  3. Package-Extension.ps1 runs per collection to produce .vsix files

See Build Workflows for pipeline details.

🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.