Skip to content

Commit 7b1c8e8

Browse files
authored
feat(scripts): add collection-level maturity field with validation, gating, and notices (#697)
Added support for an optional collection-level `maturity` field in collection manifests, enabling release channel gating, validation enforcement, and user-facing experimental notices in generated READMEs. Deprecated collections are now skipped during plugin generation, and experimental collections display a warning banner in both CLI plugin and VS Code extension READMEs. - feat(schemas): Added optional `maturity` property (enum: `stable`, `preview`, `experimental`, `deprecated`) to root level in `collection-manifest.schema.json`, fixing the existing `additionalProperties: false` violation where `experimental.collection.yml` already used the field. - feat(validation): Added collection-level maturity validation to `Invoke-CollectionValidation` in `Validate-Collections.ps1` — rejects invalid values and allows omitted (defaults to `stable`). - feat(plugins): Updated `New-PluginReadmeContent` and `Write-PluginDirectory` in `PluginHelpers.psm1` to accept and forward collection maturity, injecting an experimental notice when maturity is `experimental`. - feat(plugins): Updated `Invoke-PluginGeneration` in `Generate-Plugins.ps1` to skip deprecated collections and pass maturity through to `Write-PluginDirectory`. - feat(extension): Added `{{MATURITY_NOTICE}}` token to `extension/templates/README.template.md` and updated `New-CollectionReadme` in `Prepare-Extension.ps1` to resolve the token with an experimental notice for experimental collections. - feat(collections): Added `maturity: experimental` to `github.collection.yml` (all items already marked experimental) and `design-thinking.collection.yml`. - refactor(scripts): Extracted main execution block in `Generate-Plugins.ps1` into a testable `Start-PluginGeneration` function. - test(scripts): Added 15+ Pester tests covering collection-level maturity validation (valid/invalid/omitted values), experimental notice in plugin and extension READMEs, deprecated collection skip, `Start-PluginGeneration` entry point, artifact frontmatter parsing, and DryRun mode paths. - chore(collections): remove experimental maturity tags from GitHub backlog items and collection, and add experimental to all Design thinking collection and artifacts ## Related Issue(s) Closes #696 ## Type of Change Select all that apply: **Code & Documentation:** - [ ] Bug fix (non-breaking change fixing an issue) - [x] New feature (non-breaking change adding functionality) - [ ] Breaking change (fix or feature causing existing functionality to change) - [ ] Documentation update **Infrastructure & Configuration:** - [ ] GitHub Actions workflow - [ ] Linting configuration (markdown, PowerShell, etc.) - [ ] Security configuration - [ ] DevContainer configuration - [ ] Dependency update **AI Artifacts:** - [ ] Reviewed contribution with `prompt-builder` agent and addressed all feedback - [ ] Copilot instructions (`.github/instructions/*.instructions.md`) - [ ] Copilot prompt (`.github/prompts/*.prompt.md`) - [ ] Copilot agent (`.github/agents/*.agent.md`) - [ ] Copilot skill (`.github/skills/*/SKILL.md`) **Other:** - [x] Script/automation (`.ps1`, `.sh`, `.py`) - [ ] Other (please describe): ## Sample Prompts (for AI Artifact Contributions) <!-- Delete this section if not applicable --> N/A — No AI artifacts were added or modified in this PR. ## Testing - Added Pester tests for all new code paths across four test files: - `Validate-Collections.Tests.ps1` — collection-level maturity validation for all enum values, invalid values, omitted field, plus error-path coverage for missing fields, duplicate IDs, path mismatches, and maturity conflicts. - `PluginHelpers.Tests.ps1` — experimental notice rendering (experimental, stable, omitted, null maturity), artifact frontmatter YAML parse failure, `Write-PluginDirectory` DryRun mode with agents, skills, missing sources, and missing shared directories. - `Generate-Plugins.Tests.ps1` — deprecated collection skipped, experimental collection generated on PreRelease channel, plus `Start-PluginGeneration` function tests for success, failure, missing module, and default refresh logic. - `Prepare-Extension.Tests.ps1` — maturity notice included for experimental collection, absent for stable and omitted maturity. - Ran `npm run plugin:generate` to verify generated plugin READMEs contain the experimental notice for experimental collections. ## Checklist ### Required Checks - [x] Documentation is updated (if applicable) - [x] Files follow existing naming conventions - [x] Changes are backwards compatible (if applicable) - [x] Tests added for new functionality (if applicable) ### AI Artifact Contributions <!-- If contributing an agent, prompt, instruction, or skill, complete these checks --> N/A — No AI artifacts were contributed. ### Required Automated Checks The following validation commands must pass before merging: - [x] Markdown linting: `npm run lint:md` - [x] Spell checking: `npm run spell-check` - [ ] Frontmatter validation: `npm run lint:frontmatter` - [ ] Skill structure validation: `npm run validate:skills` - [ ] Link validation: `npm run lint:md-links` - [x] PowerShell analysis: `npm run lint:ps` ## Security Considerations - [x] This PR does not contain any sensitive or NDA information - [ ] Any new dependencies have been reviewed for security issues - [x] Security-related scripts follow the principle of least privilege ## Additional Notes - The `hve-core-all.collection.yml` diff shows only a cosmetic reorder of the `display.featured` and `display.ordering` fields — no functional change. - Documentation in `extension/PACKAGING.md`, `docs/architecture/ai-artifacts.md`, and `docs/contributing/ai-artifacts-common.md` already covers the collection-level maturity field comprehensively; no additional doc updates were needed. - The `Start-PluginGeneration` refactor replaces `exit` calls with `return` values, making the main execution block testable without process termination side effects. 🚀 - Generated by Copilot
1 parent d7650a3 commit 7b1c8e8

15 files changed

Lines changed: 1041 additions & 36 deletions

collections/design-thinking.collection.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,77 +6,111 @@ tags:
66
- coaching
77
- methodology
88
- ux
9+
maturity: experimental
910
items:
1011
# Agents
1112
- path: .github/agents/design-thinking/dt-coach.agent.md
1213
kind: agent
14+
maturity: experimental
1315

1416
# Prompts
1517
- path: .github/prompts/design-thinking/dt-start-project.prompt.md
1618
kind: prompt
19+
maturity: experimental
1720
- path: .github/prompts/design-thinking/dt-resume-coaching.prompt.md
1821
kind: prompt
22+
maturity: experimental
1923
- path: .github/prompts/design-thinking/dt-handoff-problem-space.prompt.md
2024
kind: prompt
25+
maturity: experimental
2126

2227
# Instructions
2328
- path: .github/instructions/design-thinking/dt-coaching-identity.instructions.md
2429
kind: instruction
30+
maturity: experimental
2531
- path: .github/instructions/design-thinking/dt-method-07-hifi-prototypes.instructions.md
2632
kind: instruction
33+
maturity: experimental
2734
- path: .github/instructions/design-thinking/dt-method-07-deep.instructions.md
2835
kind: instruction
36+
maturity: experimental
2937
- path: .github/instructions/design-thinking/dt-method-08-testing.instructions.md
3038
kind: instruction
39+
maturity: experimental
3140
- path: .github/instructions/design-thinking/dt-method-sequencing.instructions.md
3241
kind: instruction
42+
maturity: experimental
3343
- path: .github/instructions/design-thinking/dt-quality-constraints.instructions.md
3444
kind: instruction
45+
maturity: experimental
3546
- path: .github/instructions/design-thinking/dt-coaching-state.instructions.md
3647
kind: instruction
48+
maturity: experimental
3749
- path: .github/instructions/design-thinking/dt-industry-healthcare.instructions.md
3850
kind: instruction
51+
maturity: experimental
3952
- path: .github/instructions/design-thinking/dt-rpi-handoff-contract.instructions.md
4053
kind: instruction
54+
maturity: experimental
4155
- path: .github/instructions/design-thinking/dt-rpi-research-context.instructions.md
4256
kind: instruction
57+
maturity: experimental
4358
- path: .github/instructions/design-thinking/dt-method-01-deep.instructions.md
4459
kind: instruction
60+
maturity: experimental
4561
- path: .github/instructions/design-thinking/dt-method-01-scope.instructions.md
4662
kind: instruction
63+
maturity: experimental
4764
- path: .github/instructions/design-thinking/dt-method-03-deep.instructions.md
4865
kind: instruction
66+
maturity: experimental
4967
- path: .github/instructions/design-thinking/dt-method-02-research.instructions.md
5068
kind: instruction
69+
maturity: experimental
5170
- path: .github/instructions/design-thinking/dt-method-03-synthesis.instructions.md
5271
kind: instruction
72+
maturity: experimental
5373
- path: .github/instructions/design-thinking/dt-method-08-deep.instructions.md
5474
kind: instruction
75+
maturity: experimental
5576
- path: .github/instructions/design-thinking/dt-method-09-iteration.instructions.md
5677
kind: instruction
78+
maturity: experimental
5779
- path: .github/instructions/design-thinking/dt-industry-manufacturing.instructions.md
5880
kind: instruction
81+
maturity: experimental
5982
- path: .github/instructions/design-thinking/dt-industry-energy.instructions.md
6083
kind: instruction
84+
maturity: experimental
6185
- path: .github/instructions/design-thinking/dt-curriculum-01-scoping.instructions.md
6286
kind: instruction
87+
maturity: experimental
6388
- path: .github/instructions/design-thinking/dt-curriculum-02-research.instructions.md
6489
kind: instruction
90+
maturity: experimental
6591
- path: .github/instructions/design-thinking/dt-curriculum-03-synthesis.instructions.md
6692
kind: instruction
93+
maturity: experimental
6794
- path: .github/instructions/design-thinking/dt-curriculum-04-brainstorming.instructions.md
6895
kind: instruction
96+
maturity: experimental
6997
- path: .github/instructions/design-thinking/dt-curriculum-05-concepts.instructions.md
7098
kind: instruction
99+
maturity: experimental
71100
- path: .github/instructions/design-thinking/dt-curriculum-06-prototypes.instructions.md
72101
kind: instruction
102+
maturity: experimental
73103
- path: .github/instructions/design-thinking/dt-curriculum-07-testing.instructions.md
74104
kind: instruction
105+
maturity: experimental
75106
- path: .github/instructions/design-thinking/dt-curriculum-08-iteration.instructions.md
76107
kind: instruction
108+
maturity: experimental
77109
- path: .github/instructions/design-thinking/dt-curriculum-09-handoff.instructions.md
78110
kind: instruction
111+
maturity: experimental
79112
- path: .github/instructions/design-thinking/dt-curriculum-scenario-manufacturing.instructions.md
80113
kind: instruction
114+
maturity: experimental
81115
display:
82116
ordering: alpha

collections/github.collection.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,39 +11,28 @@ items:
1111
# Agents
1212
- path: .github/agents/github/github-backlog-manager.agent.md
1313
kind: agent
14-
maturity: experimental
1514
# Prompts
1615
- path: .github/prompts/github/github-add-issue.prompt.md
1716
kind: prompt
18-
maturity: experimental
1917
- path: .github/prompts/github/github-discover-issues.prompt.md
2018
kind: prompt
21-
maturity: experimental
2219
- path: .github/prompts/github/github-triage-issues.prompt.md
2320
kind: prompt
24-
maturity: experimental
2521
- path: .github/prompts/github/github-execute-backlog.prompt.md
2622
kind: prompt
27-
maturity: experimental
2823
- path: .github/prompts/github/github-sprint-plan.prompt.md
2924
kind: prompt
30-
maturity: experimental
3125
# Instructions
3226
- path: .github/instructions/github/github-backlog-discovery.instructions.md
3327
kind: instruction
34-
maturity: experimental
3528
- path: .github/instructions/github/github-backlog-planning.instructions.md
3629
kind: instruction
37-
maturity: experimental
3830
- path: .github/instructions/github/github-backlog-triage.instructions.md
3931
kind: instruction
40-
maturity: experimental
4132
- path: .github/instructions/github/github-backlog-update.instructions.md
4233
kind: instruction
43-
maturity: experimental
4434
- path: .github/instructions/github/community-interaction.instructions.md
4535
kind: instruction
46-
maturity: experimental
4736
- path: .github/instructions/shared/hve-core-location.instructions.md
4837
kind: instruction
4938
display:

collections/hve-core-all.collection.yml

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ items:
1818
kind: agent
1919
- path: .github/agents/design-thinking/dt-coach.agent.md
2020
kind: agent
21+
maturity: experimental
2122
- path: .github/agents/github/github-backlog-manager.agent.md
2223
kind: agent
23-
maturity: experimental
2424
- path: .github/agents/hve-core/doc-ops.agent.md
2525
kind: agent
2626
- path: .github/agents/hve-core/memory.agent.md
@@ -87,25 +87,23 @@ items:
8787
kind: prompt
8888
- path: .github/prompts/design-thinking/dt-handoff-problem-space.prompt.md
8989
kind: prompt
90+
maturity: experimental
9091
- path: .github/prompts/design-thinking/dt-resume-coaching.prompt.md
9192
kind: prompt
93+
maturity: experimental
9294
- path: .github/prompts/design-thinking/dt-start-project.prompt.md
9395
kind: prompt
96+
maturity: experimental
9497
- path: .github/prompts/github/github-add-issue.prompt.md
9598
kind: prompt
96-
maturity: experimental
9799
- path: .github/prompts/github/github-discover-issues.prompt.md
98100
kind: prompt
99-
maturity: experimental
100101
- path: .github/prompts/github/github-execute-backlog.prompt.md
101102
kind: prompt
102-
maturity: experimental
103103
- path: .github/prompts/github/github-sprint-plan.prompt.md
104104
kind: prompt
105-
maturity: experimental
106105
- path: .github/prompts/github/github-triage-issues.prompt.md
107106
kind: prompt
108-
maturity: experimental
109107
- path: .github/prompts/hve-core/checkpoint.prompt.md
110108
kind: prompt
111109
- path: .github/prompts/hve-core/doc-ops-update.prompt.md
@@ -166,83 +164,110 @@ items:
166164
kind: instruction
167165
- path: .github/instructions/design-thinking/dt-coaching-identity.instructions.md
168166
kind: instruction
167+
maturity: experimental
169168
- path: .github/instructions/design-thinking/dt-coaching-state.instructions.md
170169
kind: instruction
170+
maturity: experimental
171171
- path: .github/instructions/design-thinking/dt-curriculum-01-scoping.instructions.md
172172
kind: instruction
173+
maturity: experimental
173174
- path: .github/instructions/design-thinking/dt-curriculum-02-research.instructions.md
174175
kind: instruction
176+
maturity: experimental
175177
- path: .github/instructions/design-thinking/dt-curriculum-03-synthesis.instructions.md
176178
kind: instruction
179+
maturity: experimental
177180
- path: .github/instructions/design-thinking/dt-curriculum-04-brainstorming.instructions.md
178181
kind: instruction
182+
maturity: experimental
179183
- path: .github/instructions/design-thinking/dt-curriculum-05-concepts.instructions.md
180184
kind: instruction
185+
maturity: experimental
181186
- path: .github/instructions/design-thinking/dt-curriculum-06-prototypes.instructions.md
182187
kind: instruction
188+
maturity: experimental
183189
- path: .github/instructions/design-thinking/dt-curriculum-07-testing.instructions.md
184190
kind: instruction
191+
maturity: experimental
185192
- path: .github/instructions/design-thinking/dt-curriculum-08-iteration.instructions.md
186193
kind: instruction
194+
maturity: experimental
187195
- path: .github/instructions/design-thinking/dt-curriculum-09-handoff.instructions.md
188196
kind: instruction
197+
maturity: experimental
189198
- path: .github/instructions/design-thinking/dt-curriculum-scenario-manufacturing.instructions.md
190199
kind: instruction
200+
maturity: experimental
191201
- path: .github/instructions/design-thinking/dt-industry-energy.instructions.md
192202
kind: instruction
203+
maturity: experimental
193204
- path: .github/instructions/design-thinking/dt-industry-healthcare.instructions.md
194205
kind: instruction
206+
maturity: experimental
195207
- path: .github/instructions/design-thinking/dt-industry-manufacturing.instructions.md
196208
kind: instruction
209+
maturity: experimental
197210
- path: .github/instructions/design-thinking/dt-method-01-deep.instructions.md
198211
kind: instruction
212+
maturity: experimental
199213
- path: .github/instructions/design-thinking/dt-method-01-scope.instructions.md
200214
kind: instruction
215+
maturity: experimental
201216
- path: .github/instructions/design-thinking/dt-method-02-research.instructions.md
202217
kind: instruction
218+
maturity: experimental
203219
- path: .github/instructions/design-thinking/dt-method-03-deep.instructions.md
204220
kind: instruction
221+
maturity: experimental
205222
- path: .github/instructions/design-thinking/dt-method-03-synthesis.instructions.md
206223
kind: instruction
224+
maturity: experimental
207225
- path: .github/instructions/design-thinking/dt-method-04-brainstorming.instructions.md
208226
kind: instruction
227+
maturity: experimental
209228
- path: .github/instructions/design-thinking/dt-method-05-concepts.instructions.md
210229
kind: instruction
230+
maturity: experimental
211231
- path: .github/instructions/design-thinking/dt-method-06-lofi-prototypes.instructions.md
212232
kind: instruction
233+
maturity: experimental
213234
- path: .github/instructions/design-thinking/dt-method-07-deep.instructions.md
214235
kind: instruction
236+
maturity: experimental
215237
- path: .github/instructions/design-thinking/dt-method-07-hifi-prototypes.instructions.md
216238
kind: instruction
239+
maturity: experimental
217240
- path: .github/instructions/design-thinking/dt-method-08-deep.instructions.md
218241
kind: instruction
242+
maturity: experimental
219243
- path: .github/instructions/design-thinking/dt-method-08-testing.instructions.md
220244
kind: instruction
245+
maturity: experimental
221246
- path: .github/instructions/design-thinking/dt-method-09-iteration.instructions.md
222247
kind: instruction
248+
maturity: experimental
223249
- path: .github/instructions/design-thinking/dt-method-sequencing.instructions.md
224250
kind: instruction
251+
maturity: experimental
225252
- path: .github/instructions/design-thinking/dt-quality-constraints.instructions.md
226253
kind: instruction
254+
maturity: experimental
227255
- path: .github/instructions/design-thinking/dt-rpi-handoff-contract.instructions.md
228256
kind: instruction
257+
maturity: experimental
229258
- path: .github/instructions/design-thinking/dt-rpi-research-context.instructions.md
230259
kind: instruction
260+
maturity: experimental
231261
- path: .github/instructions/github/community-interaction.instructions.md
232262
kind: instruction
233-
maturity: experimental
234263
- path: .github/instructions/github/github-backlog-discovery.instructions.md
235264
kind: instruction
236-
maturity: experimental
237265
- path: .github/instructions/github/github-backlog-planning.instructions.md
238266
kind: instruction
239-
maturity: experimental
240267
- path: .github/instructions/github/github-backlog-triage.instructions.md
241268
kind: instruction
242-
maturity: experimental
243269
- path: .github/instructions/github/github-backlog-update.instructions.md
244270
kind: instruction
245-
maturity: experimental
246271
- path: .github/instructions/hve-core/commit-message.instructions.md
247272
kind: instruction
248273
- path: .github/instructions/hve-core/git-merge.instructions.md
@@ -260,5 +285,4 @@ items:
260285
- path: .github/skills/shared/pr-reference
261286
kind: skill
262287
display:
263-
featured: true
264288
ordering: alpha

extension/templates/README.template.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
> {{DESCRIPTION}}
44
5+
{{MATURITY_NOTICE}}
6+
57
{{BODY}}
68

79
## Included Artifacts

plugins/design-thinking/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
Design Thinking coaching identity, quality constraints, and methodology instructions for AI-enhanced design thinking across nine methods
55

6+
> **⚠️ Experimental** — This collection is experimental. Contents and behavior may change or be removed without notice.
7+
68
## Install
79

810
```bash

plugins/experimental/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
Experimental and preview artifacts not yet promoted to stable collections
55

6+
> **⚠️ Experimental** — This collection is experimental. Contents and behavior may change or be removed without notice.
7+
68
## Install
79

810
```bash

scripts/extension/Prepare-Extension.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,14 @@ function New-CollectionReadme {
415415
}
416416
$description = if ($Collection.ContainsKey('description')) { [string]$Collection.description } else { '' }
417417

418+
$collectionMaturity = if ($Collection.ContainsKey('maturity') -and -not [string]::IsNullOrWhiteSpace([string]$Collection.maturity)) {
419+
[string]$Collection.maturity
420+
} else { 'stable' }
421+
422+
$maturityNotice = if ($collectionMaturity -eq 'experimental') {
423+
'> **⚠️ Experimental** — This collection is experimental and available only in the Pre-Release channel. Contents may change or be removed without notice.'
424+
} else { '' }
425+
418426
$bodyContent = (Get-Content -Path $CollectionMdPath -Raw).Trim()
419427

420428
# Collect artifacts with descriptions grouped by kind
@@ -482,6 +490,7 @@ function New-CollectionReadme {
482490
$readmeContent = $template `
483491
-replace '\{\{DISPLAY_NAME\}\}', $displayName `
484492
-replace '\{\{DESCRIPTION\}\}', $description `
493+
-replace '\{\{MATURITY_NOTICE\}\}', $maturityNotice `
485494
-replace '\{\{BODY\}\}', $bodyContent `
486495
-replace '\{\{ARTIFACTS\}\}', $artifactSections.ToString().TrimEnd() `
487496
-replace '\{\{FULL_EDITION\}\}', $fullEdition

0 commit comments

Comments
 (0)