Skip to content

Commit 8dc595e

Browse files
Keep repository audits read-only
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent b424217 commit 8dc595e

3 files changed

Lines changed: 39 additions & 41 deletions

File tree

.github/plugin/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ It also provides
3131
[`psmodule-zensical-migration`](./psmodule/skills/psmodule-zensical-migration/SKILL.md)
3232
for migrating legacy MkDocs sites to the standard Zensical design, and
3333
[`psmodule-repository-audit`](./psmodule/skills/psmodule-repository-audit/SKILL.md)
34-
for auditing or aligning module repositories with the current
35-
Template-PSModule baseline.
34+
for auditing module repositories against the current Template-PSModule
35+
baseline.
3636
Verify the installation with:
3737

3838
```console

.github/plugin/psmodule/skills/psmodule-repository-audit/SKILL.md

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
name: psmodule-repository-audit
3-
description: Audit a PSModule repository against the current Template-PSModule baseline and align the consumer when requested while preserving repository-owned code, tests, settings, and content.
3+
description: Audit a PSModule repository against the current Template-PSModule baseline while distinguishing template drift from repository-owned code, tests, settings, and content.
44
---
55

66
# Audit a PSModule repository against Template-PSModule
77

8-
Use this skill when checking an established PowerShell module repository
9-
against the standard files in
8+
Use this read-only skill when checking an established PowerShell module
9+
repository against the standard files in
1010
[`PSModule/Template-PSModule`](https://github.com/PSModule/Template-PSModule).
11-
Apply confirmed consumer updates only when the requested scope includes them.
1211
Use the same procedure for one repository or as the repository-level audit
13-
inside a fleet campaign.
12+
inside a fleet campaign. Report changes for a separate migration or delivery
13+
task; do not edit either repository while running this audit.
1414

1515
This skill does not maintain or reconcile `Template-PSModule`. Changes to
1616
Process-PSModule include an impact evaluation that determines whether the
@@ -19,12 +19,12 @@ validated in the template repository before consumer alignment begins.
1919

2020
## Authority and precedence
2121

22-
Apply sources in this order:
22+
Use these sources together:
2323

2424
1. The [MSX Repository Standard](https://msx.no/docs/Ways-of-Working/Repository-Standard/)
25-
owns enterprise policy.
25+
owns inherited enterprise policy.
2626
2. The [PSModule Repository Standard](https://psmodule.io/docs/reference/repository-standard/)
27-
adds or overrides requirements for PowerShell module repositories.
27+
owns PSModule additions and explicit initiative overrides.
2828
3. The default branch of `PSModule/Template-PSModule` owns the executable
2929
implementation of those requirements.
3030
4. The target repository owns its module code, tests, documentation content,
@@ -34,20 +34,20 @@ Resolve and record the template default-branch commit before comparing files.
3434
Use that one commit throughout the run. Do not embed a snapshot of template
3535
file contents in this skill.
3636

37-
When a higher-precedence standard and the template disagree, do not propagate
38-
the discrepancy and do not repair the template from this skill. Report the
39-
upstream gap and block consumer alignment until the template is corrected.
40-
When prose and template implementation merely express the same requirement
41-
differently, use the template as the byte-level source.
37+
When either governing standard and the template disagree, do not propagate the
38+
discrepancy and do not repair the template from this skill. Report the upstream
39+
gap and block consumer alignment until the policy owner and template agree.
40+
When prose and template implementation express the same requirement
41+
differently, use the template as the byte-level source. For shared Zensical
42+
presentation settings, the MSXOrg documentation design takes precedence over
43+
the Process-PSModule documentation-site implementation.
4244

43-
## Modes
45+
## Audit boundary
4446

45-
- **Audit** reports drift without changing the target.
46-
- **Align** applies confirmed template-owned changes to one consumer repository.
47-
48-
State the selected mode before editing. A fleet run invokes Audit or Align
49-
once per repository; it does not combine many repositories into one branch or
50-
pull request.
47+
The audit records aligned paths, drift, accepted differences, and blocked
48+
comparisons. It does not edit the template or consumer. A fleet run invokes the
49+
audit once per repository and creates a separate delivery task for each
50+
consumer that needs alignment.
5151

5252
## Inventory
5353

@@ -71,7 +71,7 @@ overwrite an established repository.
7171

7272
| Class | Treatment |
7373
| --- | --- |
74-
| Template-owned standard | Compare with the template and replace drift unless a documented target exception applies. |
74+
| Template-owned standard | Compare with the template and report drift unless a documented target exception applies. |
7575
| Parameterized standard | Compare after applying only the substitutions declared by the template or framework. |
7676
| Configurable standard | Keep supported repository-specific values; compare the remaining structure and defaults. |
7777
| Creation scaffold | Use for new repositories. Do not overwrite established module source, tests, examples, or content. |
@@ -116,14 +116,11 @@ the target still uses MkDocs or requires a documentation layout migration.
116116

117117
Template comparison does not prove that an established test suite is compatible
118118
with the template's Pester version. If the target does not already meet the
119-
template's Pester baseline, invoke
120-
[`psmodule-pester-migration`](../psmodule-pester-migration/SKILL.md) and migrate
121-
every test set before declaring alignment complete.
122-
123-
When the Process-PSModule caller requires a major-version migration, invoke
124-
[`psmodule-v8-upgrade`](../psmodule-v8-upgrade/SKILL.md). Preserve supported
125-
`TestData` and repository-owned automation instead of replacing them with
126-
template examples.
119+
template's Pester baseline, report
120+
[`psmodule-pester-migration`](../psmodule-pester-migration/SKILL.md) as required
121+
follow-up. If the Process-PSModule caller needs a major-version migration,
122+
report [`psmodule-v8-upgrade`](../psmodule-v8-upgrade/SKILL.md) as required
123+
follow-up. Do not invoke either migration from this read-only audit.
127124

128125
## Audit output
129126

@@ -159,7 +156,7 @@ Follow the MSX Fleet Orchestration standard:
159156
## Validation
160157

161158
1. Repeat the comparison against the same recorded template commit.
162-
2. Confirm no repository-owned content or secrets changed unintentionally.
159+
2. Confirm the audit did not change either repository.
163160
3. Run the target's smallest repository-native checks for every changed
164161
surface.
165162
4. Run Pester with the declared version when tests changed.

docs/content/reference/repository-standard.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,12 @@ concerns:
199199
| Exact standard-file implementation | The default branch of [`PSModule/Template-PSModule`](https://github.com/PSModule/Template-PSModule) |
200200
| Repository-specific code and content | The consumer repository |
201201

202-
MSX requirements take precedence when these sources differ. Correct the
203-
PSModule standard when its policy differs from MSX, then correct the template
204-
before updating consumer repositories. Once the policy sources agree, the
205-
template is the byte-level source for standard files. This keeps exact file
206-
content in one place instead of duplicating templates in documentation or
202+
The PSModule standard inherits MSX defaults and may explicitly adjust them for
203+
PowerShell module repositories. For the shared Zensical presentation profile,
204+
the MSXOrg documentation design takes precedence when it differs from the
205+
Process-PSModule documentation site. Once the governing policy is clear, the
206+
template is the byte-level source for standard module files. This keeps exact
207+
file content in one place instead of duplicating templates in documentation or
207208
skills.
208209

209210
Every standard file for a new module repository must exist in
@@ -220,17 +221,17 @@ established repository:
220221

221222
Use the
222223
[`psmodule-repository-audit`](https://github.com/PSModule/Process-PSModule/blob/main/.github/plugin/psmodule/skills/psmodule-repository-audit/SKILL.md)
223-
skill to audit a consumer repository and align it when requested. The skill
224-
never changes the template. Each run records the resolved template commit so
225-
its result remains reproducible after the template changes.
224+
skill to audit a consumer repository. The skill never changes the template or
225+
consumer; alignment is a separate delivery task. Each run records the resolved
226+
template commit so its result remains reproducible after the template changes.
226227

227228
Automated managed-file distribution is not operating across the PSModule fleet.
228229
Setting `SubscribeTo` does not currently synchronize files. Until a distribution
229230
runtime is implemented, maintainers apply template changes through
230231
repository-specific pull requests and use the repository audit skill to detect
231232
drift. A future runtime must consume `Template-PSModule` rather than maintain a
232233
second copy of standard files. Process-PSModule maintainers own detecting when
233-
template reconciliation or distribution stops operating.
234+
repository audits or distribution stop operating.
234235

235236
## Supply-chain defaults
236237

0 commit comments

Comments
 (0)