Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,31 @@ Each child must:
1. Inspect local guidance, the module layout, and the assigned surface before
editing.
2. Stay within the handoff; make adjacent work a new child task.
3. Open a draft PR early, push small commits, and include the required Copilot
3. Open a draft PR early. Push small commits. Include the required Copilot
co-author trailer in each commit.
4. Run the validation named in the handoff and record commands and outcomes.
5. Report the draft PR URL and target, changed and excluded files, validation,
decisions or risks, blockers, and follow-up work before requesting
integration.
4. Run the validation named in the handoff. Record commands and outcomes.
5. Before requesting integration, report the draft PR URL and target, changed and
excluded files, validation, decisions or risks, blockers, and follow-up work.

The parent reviews each child diff and acceptance criterion, integrates through
the normal PR flow, and reruns affected checks after each dependent merge. Do
not bypass review with a direct default-branch push or modify another session's
PR or issue without explicit ownership.
The parent reviews each child diff and acceptance criterion. The parent
integrates through the normal PR flow and reruns affected checks after each
dependent merge. Do not bypass review with a direct default-branch push or
modify another session's PR or issue without explicit ownership.

Use the PSModule
[validation before review](../../../../../docs/content/guides/validating-before-review.md)
guidance and [versioning and releases](../../../../../docs/content/guides/versioning-and-releases.md)
for the common validation and release-readiness gates. Keep the coordinated PR
in draft when the integrated result is not ready.
for the common validation and release-readiness gates. When the integrated
result is not ready, keep the coordinated PR in draft.

## Stop conditions

Stop and report to the parent instead of guessing when scope, ownership,
acceptance evidence, branch target, release intent, or a required dependency is
ambiguous; when validation fails without a known owner; or when integration
would modify unrelated work. Do not silently expand scope, merge unreviewed
changes, or claim release readiness.
If scope, ownership, acceptance evidence, or the branch target is ambiguous,
stop and report to the parent. If release intent or a required dependency is
ambiguous, stop and report to the parent. If validation fails without a known
owner, stop and report to the parent. If integration would modify unrelated
work, stop and report to the parent. Do not guess, silently expand scope, merge
unreviewed changes, or claim release readiness.

## References

Expand Down
42 changes: 21 additions & 21 deletions .github/plugin/psmodule/skills/psmodule-pester-migration/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,16 @@ Required compatibility work:
blocks in the same scope.
- Replace removed `Assert-MockCalled` and `Assert-VerifiableMock`.
- Add a default mock when a parameter-filtered mock must handle other calls.
- Review `<...>` name templates because their contents are now expressions.
- Review `<...>` name templates because Pester v6 evaluates their contents as
PowerShell expressions.
- Replace `Set-ItResult -Pending` with `-Inconclusive`, `-Skipped`, or
`It -Skip`.
- Review coverage tracer and output format settings.
- Replace removed v4-style `Invoke-Pester` parameters with
`New-PesterConfiguration`.
- Rename a real `None` tag; in v6 it is reserved for untagged tests.

Optional v6 adoption after compatibility is green:
Optional v6 adoption after the required compatibility checks pass:

- Convert classic `Should -Be` assertions to `Should-Be` commands
incrementally. Classic syntax remains supported.
Expand Down Expand Up @@ -84,7 +85,7 @@ For each test set, add an inventory row to the migration report:
| Baseline | Run command, result counts, known failures |

Use the inventory to find test sets that are not reachable from the default
workflow. A green workflow is not evidence that every test set was migrated.
workflow. A workflow that passes is not evidence that every test set was migrated.

## Test-state and data contract

Expand Down Expand Up @@ -146,7 +147,7 @@ Record fixture ownership and availability in the inventory:
| Shared service | `tests/BeforeAll.ps1` | Before module-local matrix | Deterministic run-scoped name |
| Cleanup state | `tests/AfterAll.ps1` | Always-run teardown | Same `TestData` and run identity |

Fail loudly when required data or state is absent. Do not use a broad
If required data or state is absent, fail the test. Do not use a broad
`try/catch`, an empty default, or an implicit import to turn a missing fixture
into a passing or skipped test.

Expand All @@ -168,16 +169,15 @@ For every consumer repository, trace and record these surfaces before editing:
| `Invoke-ScriptAnalyzer` integration | Publishes `PSModuleLint-*` results alongside test results | Treat lint suites as required result artifacts, not Pester test files |
| Repository linter | Checks repository/workflow/Markdown files independently of Pester | Include skill and documentation paths in the repository lint inventory |

The current Process-PSModule flow specifically downloads the built module and
imports it before module-local tests, while `Test-PSModule` resolves source or
module paths for framework suites. The framework's own importability and
manifest tests may import/remove the module because import is their subject;
ordinary consumer tests must not copy that pattern as setup.
Process-PSModule downloads the built module and imports it before module-local
tests. `Test-PSModule` resolves source or module paths for framework suites. The
framework's own importability and manifest tests may import or remove the module
because import is their subject. Ordinary consumer tests must not copy that
pattern as setup.

Record the `PSModule/Invoke-Pester` action revision separately from the Pester
module version. The current Process-PSModule workflows reference that action at
`v5.1.0`; its revision and its Pester installation policy must both be checked
when adopting Pester 6.1.0. Updating one does not prove that the other changed.
module version. When adopting Pester 6.1.0, check both the action revision and its
Pester installation policy. Updating one does not prove that the other changed.

Use this per-repository checklist:

Expand Down Expand Up @@ -322,8 +322,8 @@ Should -Invoke Get-Thing -Times 1 -Exactly
Should -InvokeVerifiable
```

In v6, a call that matches no `-ParameterFilter` no longer falls through to
the real command. Add an unfiltered default mock when other calls are valid:
In v6, a call that matches no `-ParameterFilter` does not run the real command.
Add an unfiltered default mock when other calls are valid:

```powershell
Mock Get-Thing { 'default' }
Expand All @@ -348,8 +348,8 @@ should be reported for follow-up.

### Name templates

In v6, every `<...>` token in a `Describe`, `Context`, or `It` name is
evaluated as a PowerShell expression in the test scope. Review arithmetic,
In v6, Pester evaluates every `<...>` token in a `Describe`, `Context`, or `It`
name as a PowerShell expression in the test scope. Review arithmetic,
method calls, and expressions that were literal in v5. Escape a leading `<`
when literal text is intended:

Expand All @@ -368,15 +368,15 @@ filters and reports.
### Coverage

Pester 6 uses the Profiler tracer by default and `CodeCoverage.UseBreakpoints`
defaults to `$false`. Keep the new default unless compatibility with historical
coverage numbers requires:
defaults to `$false`. Keep this default. If compatibility with earlier coverage
numbers requires breakpoints, use:

```powershell
$config.CodeCoverage.UseBreakpoints = $true
```

`CoverageGutters` is removed. Use `JaCoCo` or `Cobertura`; coverage paths are
already relative to `Run.RepoRoot`.
relative to `Run.RepoRoot`.

## Step 5: Standardize Invoke-Pester configuration

Expand All @@ -403,7 +403,7 @@ Invoke-Pester -Configuration $config

Set `Run.ExcludePath` for intentional exclusions, and keep paths relative to
the repository root where CI and local runs share the same layout. Do not
disable failures globally to make a migration green.
disable failures globally to make migration checks pass.

## Step 6: Optional v6 features

Expand All @@ -430,7 +430,7 @@ $value | Should -Be 1 # compatible and may remain
$value | Should-Be 1 # optional v6 style
```

If converting, review behavior rather than applying a blind rename:
If converting, review each assertion's behavior before changing its name:

- `Should -Not -Be` becomes `Should-NotBe`.
- Truthy/falsy expectations may need `Should-BeTruthy` or `Should-BeFalsy`;
Expand Down
10 changes: 5 additions & 5 deletions .github/plugin/psmodule/skills/psmodule-skill-authoring/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ description: Author and maintain thin PSModule plugin skills that keep shared pr

Use this skill when creating or updating a skill in the PSModule plugin. First
read the shared
[writing plugin skills guide](../../../../../docs/content/guides/writing-plugin-skills.md);
it is the source of common authoring, structure, validation, and maintenance
[writing plugin skills guide](../../../../../docs/content/guides/writing-plugin-skills.md).
The guide is the source of common authoring, structure, validation, and maintenance
guidance.

## Agent-specific contract
Expand All @@ -19,7 +19,7 @@ guidance.
only the skill's trigger, agent operating sequence, handoff/report contract,
and stop conditions in `SKILL.md`.
- Preserve the plugin's scope and make adjacent work a separate change.
- Open a draft PR early, use small commits, and report the PR URL, files,
- Open a draft PR early. Use small commits. Report the PR URL, files,
validation, decisions, and blockers to the owning session.
- Stop and report instead of guessing when the skill boundary, source-of-truth
document, plugin ownership, or validation requirement is unclear.
- If the skill boundary, source-of-truth document, plugin ownership, or
validation requirement is unclear, stop and report. Do not guess.
Loading