11---
22name : psmodule-v8-upgrade
3- description : Upgrade a Process-PSModule consumer repository to framework version 8 while preserving repository intent, enforcing the caller workflow contract, migrating Pester tests to v6 , and retaining the repository's Zensical documentation design .
3+ description : Upgrade a Process-PSModule consumer repository to framework version 8, audit it against Template-PSModule, migrate every test set to Pester 6.1.0 , and align its Zensical profile without changing repository-owned intent .
44---
55
66# Upgrade a Process-PSModule consumer to v8
@@ -15,12 +15,18 @@ consumer repositories while developing or validating this skill.
15151 . Inspect the consumer repository before editing. Read its local guidance,
1616 workflow, documentation configuration and content, tests, settings,
1717 dependencies, and existing validation commands.
18- 2 . Work on a dedicated branch, open a draft pull request early, and use small
18+ 2 . Invoke
19+ [ ` psmodule-repository-audit ` ] ( ../psmodule-repository-audit/SKILL.md ) in Audit
20+ mode and record the resolved ` Template-PSModule ` commit.
21+ 3 . Invoke
22+ [ ` psmodule-pester-migration ` ] ( ../psmodule-pester-migration/SKILL.md ) for
23+ every test set that does not already meet the Pester 6.1.0 contract.
24+ 4 . Work on a dedicated branch, open a draft pull request early, and use small
1925 commits. Include the required Copilot co-author trailer in every commit.
20- 3 . Preserve test intent, fixtures, secrets, variables, documentation content,
26+ 5 . Preserve test intent, fixtures, secrets, variables, documentation content,
2127 custom theme assets, and repository-owned automation unless the upgrade
2228 requires a direct change.
23- 4 . Report preserved TestData, Pester migration details, Zensical/theme changes,
29+ 6 . Report preserved TestData, Pester migration details, Zensical/theme changes,
2430 validation results, and blockers in the pull request.
2531
2632Use the repository's applicable MSX workflow and PR format guidance. Do not
@@ -50,90 +56,19 @@ the obsolete configuration only after the generated site validates.
5056Use [ ` PSModule/Template-PSModule ` ] ( https://github.com/PSModule/Template-PSModule )
5157and the [ PSModule Repository Standard] ( https://github.com/PSModule/Process-PSModule/blob/main/docs/content/reference/repository-standard.md )
5258as the structural baseline for module repositories. Compare the consumer with
53- the template's default files before adding, removing, or relocating anything.
54- The template is a starting point, not a reason to overwrite module-specific
55- content.
56-
57- The current template's default repository anatomy is:
58-
59- ``` text
60- <ModuleName>/
61- ├── .github/
62- │ ├── CODEOWNERS
63- │ ├── dependabot.yml
64- │ ├── linters/
65- │ │ ├── .codespellrc
66- │ │ ├── .markdown-lint.yml
67- │ │ ├── .powershell-psscriptanalyzer.psd1
68- │ │ └── .textlintrc
69- │ ├── PSModule.yml
70- │ ├── pull_request_template.md
71- │ ├── release.yml
72- │ ├── workflows/
73- │ └── Process-PSModule.yml
74- │ └── zensical.toml
75- ├── examples/
76- ├── icon/
77- ├── src/
78- │ ├── classes/
79- │ ├── data/
80- │ ├── formats/
81- │ ├── functions/
82- │ │ ├── private/
83- │ │ └── public/
84- │ ├── init/
85- │ ├── modules/
86- │ ├── scripts/
87- │ ├── types/
88- │ └── variables/
89- ├── tests/
90- │ ├── AfterAll.ps1
91- │ ├── BeforeAll.ps1
92- │ └── <ModuleName>.Tests.ps1
93- ├── .gitattributes
94- ├── .gitignore
95- ├── AGENTS.md
96- ├── CONTRIBUTING.md
97- ├── LICENSE
98- └── README.md
99- ```
59+ the template's default files at one resolved commit before adding, removing, or
60+ relocating anything. Do not duplicate the template tree or file contents in
61+ this skill; the template default branch is the executable source.
62+
63+ Use the audit's classifications. Template-owned and parameterized files follow
64+ the template. Established ` src/ ` , tests, examples, documentation content,
65+ settings overrides, and local automation remain repository-owned. Do not copy
66+ starter source or starter tests over working module code.
10067
101- Treat files and directories as follows:
102-
103- - Required baseline files should be present in the consumer and remain
104- repository-local; do not rely on organization-level fallback files.
105- - ` src/ ` , especially ` src/functions/public/ ` and ` src/functions/private/ ` ,
106- along with ` tests/ ` , ` examples/ ` , and ` icon/ ` , is module-owned content.
107- Preserve its intent and only migrate paths when the framework contract
108- requires it.
109- - ` .github/PSModule.yml ` , linters, Dependabot, CODEOWNERS, release metadata,
110- pull-request templates, and repository guidance are configuration surfaces.
111- Inspect and preserve them independently of the caller workflow.
112- - ` tests/BeforeAll.ps1 ` and ` tests/AfterAll.ps1 ` are optional root-level
113- module-local phases, not recursively discovered test files.
114- - Optional source folders such as ` assemblies ` , ` formats ` , ` types ` , ` variables ` ,
115- ` data ` , ` modules ` , and ` scripts ` are added when the module needs them; do not
116- create empty placeholders solely to match the tree.
117- - The template's starter test declares Pester 6 with ` #Requires ` and uses the
118- native ` Describe ` , ` It ` , and ` Should-Be ` syntax. Preserve that requirement
119- when the consumer already has the Pester 6 baseline.
120- - The template's ` .github/PSModule.yml ` sets a zero code-coverage target and
121- carries explicit linter environment defaults; compare these settings before
122- replacing or deleting a consumer settings file.
123- - The template's ` AGENTS.md ` points to Template-PSModule quickstart, repository
124- defaults, module anatomy, build/test/pack/publish, and standards guidance.
125- Preserve the consumer's local onboarding contract while updating stale links.
126-
127- If the template revision and the consumer's existing layout disagree, record
128- the difference and migrate only the requested integration surface. In
129- particular, the current template uses ` .github/zensical.toml ` , while this v8
130- upgrade request uses ` docs/zensical.toml ` , ` docs/content/ ` , and
131- ` docs/overrides/ ` (including ` docs/overrides/assets/ ` ) as its documentation
132- contract; a separate ` docs/assets/ ` directory is optional. When that requested
133- documentation migration is in scope, move the template's Zensical settings
134- and custom assets into the ` docs/ ` contract rather than maintaining both
135- configurations. When it is not in scope, preserve the consumer's existing
136- working configuration and report the difference.
68+ If the template conflicts with the MSX or PSModule Repository Standard, block
69+ consumer alignment and report the upstream gap. The Process-PSModule change
70+ that introduced a new framework default is responsible for evaluating and
71+ coordinating the corresponding template update.
13772
13873For a documentation-only MkDocs migration, use the dedicated
13974[ ` psmodule-zensical-migration ` ] ( ../psmodule-zensical-migration/SKILL.md ) skill
@@ -142,49 +77,11 @@ the caller workflow upgrade.
14277
14378## Caller workflow contract
14479
145- Replace ` .github/workflows/Process-PSModule.yml ` with exactly this template:
146-
147- ``` yaml
148- name : Process-PSModule
149-
150- on :
151- workflow_dispatch :
152- schedule :
153- - cron : ' 0 0 * * *'
154- push :
155- branches :
156- - main
157- pull_request :
158- branches :
159- - main
160- types :
161- - closed
162- - opened
163- - reopened
164- - synchronize
165- - labeled
166- - unlabeled
167-
168- concurrency :
169- group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
170- cancel-in-progress : ${{ github.event_name == 'pull_request' }}
171-
172- permissions : {}
173-
174- jobs :
175- Process-PSModule :
176- permissions :
177- contents : read
178- pages : write
179- id-token : write
180- uses : PSModule/Process-PSModule/.github/workflows/workflow.yml@v8
181- secrets :
182- PSGALLERY_API_KEY : ${{ secrets.PSGALLERY_API_KEY }}
183- GitHubAppClientId : ${{ secrets.SHELLY_CLIENT_ID }}
184- GitHubAppPrivateKey : ${{ secrets.SHELLY_PRIVATE_KEY }}
185- ` ` `
80+ Copy ` .github/workflows/Process-PSModule.yml ` from the recorded
81+ ` Template-PSModule ` commit. Confirm that its reusable-workflow reference targets
82+ ` PSModule/Process-PSModule/.github/workflows/workflow.yml@v8 ` .
18683
187- The only permitted variation is an optional ` TestData` entry under
84+ The only permitted consumer variation is an optional ` TestData ` entry under
18885` jobs.Process-PSModule.secrets ` . Do not add ` with: ` inputs, extra jobs,
18986conditions, schedule changes, ` run-name ` , permission changes, trigger changes,
19087concurrency changes, debug options, or version overrides. Repository-owned
@@ -226,49 +123,33 @@ uses.
226123
227124# # Documentation integration
228125
229- Treat `docs/zensical.toml` as authoritative. Do not create or maintain
230- ` mkdocs.yml` , introduce MkDocs configuration, or replace the consumer's
231- documentation design with a parallel theme.
126+ For a standard module repository,
127+ ` Template-PSModule/.github/zensical.toml` is authoritative. Keep that path
128+ because Process-PSModule resolves it before `docs/zensical.toml` and root
129+ ` zensical.toml` . Do not leave multiple active configurations.
232130
233- Compare the consumer's configuration with the Process-PSModule template and
234- preserve or migrate these surfaces deliberately :
131+ The standard module profile omits `nav`. Zensical derives navigation from the
132+ staged folder structure, places index pages first, and sorts remaining pages
133+ alphabetically. Preserve repository-owned content and supported assets, but do
134+ not retain a manual navigation array merely because the legacy site had one.
235135
236- - ` docs/zensical.toml` , including `docs_dir` and navigation.
237- - ` docs/content/` as the documentation source directory.
238- - ` docs/overrides/` and custom templates.
239- - ` docs/overrides/assets/stylesheets/navigation.css` .
240- - ` docs/overrides/assets/` , any optional `docs/assets/`, logo, favicon, palette,
241- fonts, and custom JavaScript/CSS.
242- - Existing navigation labels, page paths, and custom theme behavior.
243-
244- Do not delete existing custom CSS/assets merely because the default theme also
245- provides an equivalent feature. Resolve duplicate configuration in favor of
246- the existing consumer source of truth, then validate the generated site.
136+ Invoke `psmodule-zensical-migration` when the repository has MkDocs, multiple
137+ documentation configurations, or a layout that must be migrated.
247138
248139# # Pester v6 migration
249140
250141The framework upgrade does not permit leaving tests on an undeclared or
251- unsupported Pester version. Inspect module requirements, dependency manifests,
252- local setup, CI installation, and every test entry point. Declare and run the
253- repository's supported Pester 6 dependency. If Pester 6 is already declared,
254- retain the declaration and focus on configuration, discovery, assertions,
255- setup/teardown, and output compatibility.
256-
257- Rewrite tests using native Pester v6 terminology and APIs :
258-
259- - Prefer `New-PesterConfiguration` and
260- ` Invoke-Pester -Configuration` .
261- - Update discovery, run configuration, output, result, and coverage handling
262- without changing test intent.
263- - Make each test file safe under Pester v6 per-file discovery and execution.
264- - Preserve explicit fixture ownership and loading; do not silently import the
265- target module as a fallback for a broken framework setup.
266- - Keep setup and teardown deterministic and scoped.
267- - Preserve data-driven cases, mocks, pending behavior, names, tags, coverage,
268- and result reporting while applying the v6 compatibility rules.
269-
270- Do not merely rename commands. Run the migrated tests with the declared Pester
271- 6 dependency and investigate failures as migration or repository issues.
142+ unsupported Pester version. The dedicated `psmodule-pester-migration` skill is
143+ a required subprocedure, not an optional reference.
144+
145+ Inventory and execute every test entry point, including hidden and nested test
146+ sets. Migrate discovery, configuration, setup and teardown, data-driven cases,
147+ mocks, pending behavior, tags, results, and coverage as that skill requires.
148+ Classic `Should -Be` syntax remains compatible and does not need a cosmetic
149+ rewrite; Pester 6 breaking changes and deterministic per-file execution do.
150+
151+ Run every migrated test set with Pester 6.1.0. A declared dependency or one
152+ green default workflow is not evidence that every test set was migrated.
272153
273154# # Repository integration inventory
274155
@@ -281,7 +162,7 @@ Before editing, record the current state and the intended v8 result for:
281162| Pester dependency | `#Requires`, manifests, install steps, lockfiles | Pester 6 is declared and installed consistently |
282163| Pester configuration | `Invoke-Pester`, output, result, coverage | Native configuration object and v6-compatible output |
283164| Test setup | Before/After blocks, module load, fixtures, services | Explicit ownership and deterministic per-file behavior |
284- | Documentation | Zensical config, content, overrides, assets | Existing Zensical design remains authoritative |
165+ | Documentation | Active config, content, supported overrides and assets | Template module profile with native navigation, or a documented exception |
285166| Repository automation | Other workflows and scripts | Unrelated automation remains separate and unchanged |
286167| Validation | Existing tests, lint, site build, workflow checks | Existing repository-native validation is rerun |
287168
@@ -295,13 +176,9 @@ when a targeted check reveals a broader dependency:
295176 equivalent when available.
2961773. Run the Pester v6 test suites with the repository's declared configuration.
2971784. Run the repository's existing lint and test commands.
298- 5. When documentation exists, run :
299-
300- ` ` ` powershell
301- Push-Location docs
302- zensical build --clean
303- Pop-Location
304- ` ` `
179+ 5. When documentation exists, run the repository's Process-PSModule site
180+ staging and build path. Do not substitute a direct `docs/` build when the
181+ module profile is stored in `.github/zensical.toml`.
305182
3061836. Review the diff for accidental workflow permissions, trigger changes,
307184 secret exposure, fixture removal, generated files, or unrelated refactoring.
@@ -313,6 +190,7 @@ workflow validation.
313190# # References
314191
315192- [PSModule repository standard](https://github.com/PSModule/Process-PSModule/blob/main/docs/content/reference/repository-standard.md)
193+ - [Template-PSModule](https://github.com/PSModule/Template-PSModule)
316194- [PSModule workflow inputs](https://github.com/PSModule/Process-PSModule/blob/main/docs/content/reference/workflow-inputs.md)
317195- [PSModule pipeline stages](https://github.com/PSModule/Process-PSModule/blob/main/docs/content/reference/pipeline-stages.md)
318196- [PSModule module test guidance](https://github.com/PSModule/Process-PSModule/blob/main/docs/content/guides/writing-module-tests.md)
0 commit comments