Repository navigation
🚀 [Feature]: Module repositories share one auditable baseline #525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Marius Storhaug (MariusStorhaug)
wants to merge
31
commits into
main
Choose a base branch
from
template-standardization
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+678
−545
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
cfb6558
Add module template reconciliation skill
MariusStorhaug d5d2ec0
Scope template checks to consumer repositories
MariusStorhaug 02ca898
Define the template impact evaluation
MariusStorhaug 77fc77d
Use the shared native Zensical design
MariusStorhaug 1515a15
Preserve the managed-file documentation anchor
MariusStorhaug b424217
Match the MSX tablesort source exactly
MariusStorhaug 8dc595e
Keep repository audits read-only
MariusStorhaug ed2a4e8
Expose the native documentation tree
MariusStorhaug 0bcf506
Keep audit handoffs non-mutating
MariusStorhaug 65c69e8
Require Pester validation for every test set
MariusStorhaug eb35572
Exclude vendored assets from JavaScript lint
MariusStorhaug cae4960
Clarify template files are copied at creation
MariusStorhaug 1388fff
Use consistent MSXOrg naming
MariusStorhaug e72914c
Exclude cookie consent from module templates
MariusStorhaug 083ce78
Standardize community files under .github
MariusStorhaug de80673
Document the community file path override
MariusStorhaug 4fd4b87
Point guidance at the published documentation
MariusStorhaug 3ea02d2
Add repository-local community guidance
MariusStorhaug 0922daf
Reference canonical repository files without duplication
MariusStorhaug 2eb17ed
Inherit organization community policies
MariusStorhaug f8d8941
Trim inherited files from module layout
MariusStorhaug 9c41fb1
Use centralized community policy defaults
MariusStorhaug d2786d5
Keep PR authoring guidance free of template files
MariusStorhaug a95a3ba
Reconcile main with the module baseline guidance
MariusStorhaug 03e24f3
Make table sorting reachable by keyboard
MariusStorhaug c352e7d
Reconcile current main prose with the module baseline
MariusStorhaug 00aaa3d
Align audit guidance with canonical repository policy
MariusStorhaug 1fd267c
Reconcile explicit migration conditions with main
MariusStorhaug 56b168b
Reconcile reserved interface prose with the module baseline
MariusStorhaug 7d9d6e8
Describe the repository audit handoff as read-only
MariusStorhaug 8076ffb
Clarify the canonical contribution guide path
MariusStorhaug File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <!-- markdownlint-disable MD041 --> | ||
| @../AGENTS.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Contributing | ||
|
|
||
| Thank you for investing your time in contributing to this repository. | ||
| Read the [PSModule Code of Conduct](https://github.com/PSModule/.github/blob/main/.github/CODE_OF_CONDUCT.md) | ||
| before participating, and read | ||
| [`AGENTS.md`](../AGENTS.md) for the full guidance chain and documentation | ||
| references. | ||
|
|
||
| ## Before you start | ||
|
|
||
| 1. Read [`README.md`](../README.md) to understand what Process-PSModule does. | ||
| 2. Familiarize yourself with the | ||
| [repository standard](https://psmodule.io/Process-PSModule/reference/repository-standard/). | ||
| 3. Check the open issues and pull requests to avoid duplicate work. | ||
|
|
||
| ## Workflow | ||
|
|
||
| This project follows the | ||
| [MSX contribution workflow](https://msx.no/docs/Ways-of-Working/Contribution-Workflow/): | ||
|
|
||
| 1. Open or pick up an issue that describes the change. | ||
| 2. Create a branch from `main` following the | ||
| `<type>/<issue>-<short-slug>` convention. | ||
| 3. Make small, focused commits and push often. | ||
| 4. Open a **draft pull request** as soon as the change has a basic shape. | ||
| 5. Run the **Copilot review loop** until it reports a clean round. File an issue | ||
| for out-of-scope findings. | ||
| 6. Mark the pull request ready for review and enable auto-merge. | ||
|
|
||
| For branching details, see | ||
| [Branching and Merging](https://msx.no/docs/Ways-of-Working/Branching-and-Merging/). | ||
|
|
||
| ## Pull requests | ||
|
|
||
| - Keep pull requests small and focused on a single deliverable. | ||
| - Follow the | ||
| [commit conventions](https://msx.no/docs/Ways-of-Working/Commit-Conventions/). | ||
| - Follow the | ||
| [pull request format](https://msx.no/docs/Ways-of-Working/PR-Format/). | ||
|
|
||
| ## Issues | ||
|
|
||
| Use GitHub Issues to report bugs, request features, or propose improvements. | ||
| Follow the | ||
| [issue format](https://msx.no/docs/Ways-of-Working/Issues/Process/Format/). | ||
|
|
||
| ## Code standards | ||
|
|
||
| PowerShell and GitHub Actions in this repository follow the | ||
| [PSModule framework guidance](https://psmodule.io/Process-PSModule/) and the | ||
| [MSX coding standards](https://msx.no/docs/Coding-Standards/). | ||
|
|
||
| ## Questions | ||
|
|
||
| Follow the [PSModule support guidance](https://github.com/PSModule/.github/blob/main/.github/SUPPORT.md). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| <!-- markdownlint-disable MD041 --> | ||
| Follow the instructions in [AGENTS.md](../AGENTS.md). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
148 changes: 148 additions & 0 deletions
148
.github/plugin/psmodule/skills/psmodule-repository-audit/SKILL.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,148 @@ | ||
| --- | ||
| name: psmodule-repository-audit | ||
| description: Audit a PSModule repository against the current Template-PSModule baseline while distinguishing template drift from repository-owned code, tests, settings, and content. | ||
| --- | ||
|
|
||
| # Audit a PSModule repository against Template-PSModule | ||
|
|
||
| Use this read-only skill when checking an established PowerShell module | ||
| repository against the standard files in | ||
| [`PSModule/Template-PSModule`](https://github.com/PSModule/Template-PSModule). | ||
| Use the same procedure for one repository or as the repository-level audit | ||
| inside a fleet campaign. Report changes for a separate migration or delivery | ||
| task; do not edit either repository while running this audit. | ||
|
|
||
| Read the [PSModule Repository Standard](https://psmodule.io/Process-PSModule/reference/repository-standard/) | ||
| and its [source ownership and file classes](https://psmodule.io/Process-PSModule/reference/repository-standard/#managed-file-distribution) | ||
| before comparing. Those pages own shared policy; this skill defines the audit | ||
| sequence, handoffs, report, and stop conditions. | ||
|
|
||
| This skill does not maintain or reconcile `Template-PSModule`. Changes to | ||
| Process-PSModule include an impact evaluation that determines whether the | ||
| template also needs a coordinated update. Template changes are made and | ||
| validated in the template repository before consumer alignment begins. | ||
|
|
||
| ## Source and stop conditions | ||
|
|
||
| Resolve and record the template default-branch commit before comparing files. | ||
| Use that one commit throughout the run. Do not embed a snapshot of template | ||
| file contents in this skill. | ||
|
|
||
| When either governing standard and the template disagree, do not propagate the | ||
| discrepancy and do not repair the template from this skill. Report the upstream | ||
| gap and block consumer alignment until the policy owner and template agree. | ||
| When prose and template implementation express the same requirement | ||
| differently, apply the linked source-ownership rules. Do not resolve policy | ||
| differences independently in a consumer. | ||
|
|
||
| ## Audit boundary | ||
|
|
||
| The audit records aligned paths, drift, accepted differences, and blocked | ||
| comparisons. It does not edit the template or consumer. A fleet run invokes the | ||
| audit once per repository and creates a separate delivery task for each | ||
| consumer that needs alignment. | ||
|
|
||
| ## Inventory | ||
|
|
||
| Before comparing: | ||
|
|
||
| 1. Read the target repository's local guidance, README, workflow, settings, | ||
| documentation configuration, tests, and validation commands. | ||
| 2. Confirm that the target is a PowerShell module repository. Do not force the | ||
| module template onto framework, documentation, action, archive, or other | ||
| repository types. | ||
| 3. Resolve the current default branch and commit of `Template-PSModule`. | ||
| 4. Inventory every template path, including hidden files. | ||
| 5. Inventory every target path and any explicit local ownership or exception. | ||
| 6. Record the Process-PSModule caller version, Pester requirement, and | ||
| documentation configuration. | ||
|
|
||
| ## Classify before comparing | ||
|
|
||
| Classify every template path with the shared file classes. Never infer that | ||
| every template file can safely overwrite an established repository. Preserve | ||
| repository-owned source, tests, examples, content, and assets. | ||
|
|
||
| Compare community and automation paths against the | ||
| [required common files](https://psmodule.io/Process-PSModule/reference/repository-standard/#required-common-files). | ||
| Record documented exceptions as accepted differences and stale local | ||
| configurations or root duplicates as drift. | ||
|
|
||
| Configuration is not automatically consumer-owned. For example, | ||
| `.github/PSModule.yml` may contain valid module-specific overrides while its | ||
| schema and unaffected defaults still come from the template. Compare fields, | ||
| not only whole-file hashes, when the standard permits overrides. | ||
|
|
||
| ## Pull request authoring | ||
|
|
||
| Apply the [no-file authoring rule](https://psmodule.io/Process-PSModule/reference/repository-standard/#pull-request-authoring) | ||
| when classifying PR-template paths. Use the | ||
| [canonical MSX PR Format](https://msx.no/docs/Ways-of-Working/PR-Format/) for the | ||
| actual record, not a repository or organization PR-template file. | ||
|
|
||
| Do not classify PR-template files as template-owned standards or creation | ||
| scaffolds. Their absence is intentional, not missing baseline drift. Report | ||
| existing files as stale drift for a separate removal task. Do not recommend | ||
| adding, recreating, copying, or generating them, and do not rely on a central | ||
| fallback. | ||
|
|
||
| If the recorded template contains a PR-template file, report the upstream | ||
| policy gap and block consumer alignment rather than propagating it. | ||
|
|
||
| ## Zensical contract | ||
|
|
||
| Compare the recorded template profile against the shared | ||
| [generated-module documentation contract](https://psmodule.io/Process-PSModule/reference/repository-standard/#generated-module-documentation). | ||
| Record documented visual or functional exceptions as accepted differences. | ||
|
|
||
| When the target still uses MkDocs or requires a documentation layout | ||
| migration, report | ||
| [`psmodule-zensical-migration`](../psmodule-zensical-migration/SKILL.md) as | ||
| required follow-up. Do not invoke a migration skill from this read-only audit. | ||
|
|
||
| ## Pester and workflow contracts | ||
|
|
||
| Template comparison does not prove that an established test suite is compatible | ||
| with the template's Pester version. If the target does not already meet the | ||
| template's Pester baseline, report | ||
| [`psmodule-pester-migration`](../psmodule-pester-migration/SKILL.md) as required | ||
| follow-up. If the Process-PSModule caller needs a major-version migration, | ||
| report [`psmodule-v8-upgrade`](../psmodule-v8-upgrade/SKILL.md) as required | ||
| follow-up. | ||
|
|
||
| ## Audit output | ||
|
|
||
| Report each compared path with: | ||
|
|
||
| | Field | Meaning | | ||
| | --- | --- | | ||
| | Path | Repository-relative path. | | ||
| | Class | One of the comparison classes above. | | ||
| | Status | Aligned, missing, drifted, extra, accepted difference, or blocked. | | ||
| | Action | None, add, update, preserve, remove, or report upstream. | | ||
| | Evidence | Template commit and governing standard or documented exception. | | ||
|
|
||
| Do not count an extra repository-owned file as drift. Do not call a repository | ||
| aligned when a required template-owned file is absent, a Pester migration is | ||
| incomplete, or validation did not execute. | ||
|
|
||
| ## Fleet operation | ||
|
|
||
| Follow the [MSX Fleet Orchestration standard](https://msx.no/docs/Ways-of-Working/Fleet-Orchestration/). | ||
| Run this audit once per target. Record the template commit in every report so | ||
| a later run can distinguish new template changes from unfinished work. | ||
|
|
||
| ## Validation | ||
|
|
||
| 1. Repeat the comparison against the same recorded template commit. | ||
| 2. Confirm the audit did not change either repository. | ||
| 3. Run the target's smallest repository-native checks for every changed | ||
| surface. | ||
| 4. Run Pester with the declared version when tests changed. | ||
| 5. Build the Zensical site when documentation settings or assets changed. | ||
| 6. Review the diff for unresolved placeholders, generated output, and unrelated | ||
| changes. | ||
|
|
||
| Report blocked checks and their causes. A clean file comparison is not a | ||
| substitute for repository tests, and a green build is not a substitute for | ||
| checking template drift. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.