microsoft/hve-core
Publicmirrored fromhttps://github.com/microsoft/hve-coreAvailable
scripts/plugins/README.md
50lines · modecode
| 1 | --- |
| 2 | title: Plugin Engineering Scripts |
| 3 | description: PowerShell tooling for generating Copilot CLI plugins from collection manifests |
| 4 | --- |
| 5 | |
| 6 | PowerShell tooling for generating Copilot CLI plugins from collection |
| 7 | manifests. |
| 8 | |
| 9 | ## Scripts |
| 10 | |
| 11 | | Script | npm Command | Description | |
| 12 | |----------------------------|---------------------------|-----------------------------------------------| |
| 13 | | Generate-Plugins.ps1 | `npm run plugin:generate` | Generate plugin directories from collections | |
| 14 | | Validate-Collections.ps1 | `npm run plugin:validate` | Validate collection manifests | |
| 15 | | Modules/PluginHelpers.psm1 | (library) | Shared YAML parsing, symlink, and frontmatter | |
| 16 | |
| 17 | ## Prerequisites |
| 18 | |
| 19 | - PowerShell 7.0+ |
| 20 | - PowerShell-Yaml module (`Install-Module PowerShell-Yaml`) |
| 21 | |
| 22 | ## Collection to Plugin Pipeline |
| 23 | |
| 24 | 1. Author artifacts in `.github/` (agents, prompts, skills) |
| 25 | 2. Define collections in `collections/*.collection.yml` |
| 26 | 3. Run `npm run plugin:generate` to produce `plugins/` |
| 27 | 4. Commit generated `plugins/` to the repository |
| 28 | |
| 29 | ## Adding a New Collection |
| 30 | |
| 31 | 1. Create `collections/<id>.collection.yml` (see existing collections for |
| 32 | format) |
| 33 | 2. Run `npm run plugin:validate` to check the manifest |
| 34 | 3. Run `npm run plugin:generate` to generate the plugin |
| 35 | 4. Commit both the collection and generated plugin |
| 36 | |
| 37 | ## Refreshing Plugins After Artifact Changes |
| 38 | |
| 39 | ```bash |
| 40 | npm run plugin:generate |
| 41 | ``` |
| 42 | |
| 43 | This regenerates all plugins from their collection manifests. |
| 44 | |
| 45 | --- |
| 46 | |
| 47 | <!-- markdownlint-disable MD036 --> |
| 48 | *🤖 Crafted with precision by ✨Copilot following brilliant human instruction, |
| 49 | then carefully refined by our team of discerning human reviewers.* |
| 50 | <!-- markdownlint-enable MD036 --> |