Skip to content

Commit 02ca898

Browse files
Define the template impact evaluation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent d5d2ec0 commit 02ca898

7 files changed

Lines changed: 102 additions & 16 deletions

File tree

AGENTS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ works. For PSModule-specific build, layout, and process guidance:
2424
- [PSModule/memory](https://github.com/PSModule/memory) — durable cross-session agent
2525
working memory for the PSModule organization.
2626

27+
## Template impact
28+
29+
For every Process-PSModule change, evaluate whether the framework contract,
30+
repository defaults, or generated output changes what a new module repository
31+
should contain. When it does, update `PSModule/Template-PSModule` in a
32+
coordinated pull request. Do not add template-maintenance behavior to consumer
33+
audit or migration skills.
34+
2735
## Org-wide guidance
2836

2937
For cross-cutting ways of working and standards:

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
Process-PSModule is the corner-stone of the PSModule framework — an end-to-end GitHub Actions workflow that builds, tests, versions, documents, and publishes PowerShell modules to the PowerShell Gallery.
44

5-
Documentation site generation is powered by Zensical. Repositories define site configuration in `zensical.toml`.
5+
Documentation site generation is powered by Zensical. Module repositories
6+
inherit the canonical `.github/zensical.toml` from `Template-PSModule`.
67

78
## Documentation
89

docs/content/get-started/repository-setup.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ See [Settings](../reference/settings.md) for the full contract and
8888

8989
## 5. Configure the documentation site
9090

91-
Process-PSModule builds documentation with [Zensical](https://zensical.org/) from `.github/zensical.toml`. The template
92-
ships a working file; update the site name and repository links to match the module.
91+
Process-PSModule builds documentation with [Zensical](https://zensical.org/)
92+
from `.github/zensical.toml`. Keep the file from `Template-PSModule`;
93+
Process-PSModule resolves its repository placeholders while staging the site.
94+
The standard configuration omits `nav`, so Zensical follows the generated
95+
folder structure and sorts pages alphabetically.
9396

9497
## Next
9598

docs/content/guides/calling-the-workflow.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ description: How to call the Process-PSModule reusable workflow — the caller w
66
# Calling the workflow
77

88
To use the workflow, create a new file in the `.github/workflows` directory of the module repository and add the following content.
9-
For documentation site generation, use `zensical.toml` as the active site contract.
9+
For documentation site generation, keep the canonical
10+
`Template-PSModule/.github/zensical.toml`; Process-PSModule resolves it into the
11+
staged site's `zensical.toml`.
1012

1113
For the exact inputs, secrets, and permissions the reusable workflow declares, see
1214
[Workflow inputs](../reference/workflow-inputs.md).

docs/content/guides/structuring-your-module.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ These names describe repository conventions, not settings. `.github/PSModule.yml
6161
Key expectations:
6262

6363
- Keep at least one exported function under `src/functions/public/` and corresponding tests in `tests/` using a [documented test profile](https://msx.no/docs/Coding-Standards/PowerShell/Testing/#module-test-profiles).
64-
- Keep documentation site configuration in `.github/zensical.toml`.
64+
- Keep documentation site configuration aligned with
65+
`Template-PSModule/.github/zensical.toml`. Omit `nav`; Zensical follows the
66+
generated folder structure and sorts pages alphabetically.
6567
- Optional folders (`assemblies`, `formats`, `types`, `variables`, and others) are processed automatically when present.
6668
- Markdown files in `src/functions/public` subfolders become documentation pages alongside generated help.
6769
- A group's overview page (`<Category>/<Category>.md` named after the folder, or `<Category>/index.md`) becomes that group's section landing page in the docs navigation.

docs/content/reference/pipeline-stages.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ How to write these tests, including the Pester version requirement and shared-in
156156

157157
- Generates a static site using:
158158
- [Zensical](https://zensical.org/).
159-
- Uses `zensical.toml` as the site configuration contract.
159+
- Resolves the module's canonical `.github/zensical.toml` into the staged
160+
site's `zensical.toml`.
161+
- Uses Zensical's native folder-derived, alphabetical navigation when `nav` is
162+
omitted.
160163

161164
## Publish Docs
162165

docs/content/reference/repository-standard.md

Lines changed: 77 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,18 @@ It does not apply directly to:
1919

2020
Two baseline expectations still apply to every PSModule repository, including the types listed above. Each repository stands on its own: it carries its own governance and community files instead of relying on the organization `.github` fallback, and each repository ships the [agent onboarding files](#agent-onboarding-files) so an agent can work in it without prior context. What differs by type is the concrete file set and layout: the required files, README shape, and framework wiring on the rest of this page are the module standard, and non-module repositories keep only the equivalent baseline appropriate to their own type. This documentation project, maintained in `PSModule/Process-PSModule`, follows those two baseline expectations itself.
2121

22-
Each initiative should keep its own repository standards in its central documentation repository. For the PSModule organization, this repository is the source of truth.
22+
Each initiative should keep its own repository standards in its central
23+
documentation repository. For the PSModule organization, this repository owns
24+
the requirements and `Template-PSModule` owns their executable file
25+
implementations.
2326

2427
## Repository creation
2528

26-
Create new module repositories from [`PSModule/Template-PSModule`](https://github.com/PSModule/Template-PSModule). The template provides the framework wiring, starter layout, and CI/CD expectations.
29+
Create new module repositories from
30+
[`PSModule/Template-PSModule`](https://github.com/PSModule/Template-PSModule).
31+
The template is the executable baseline for standard files, framework wiring,
32+
starter layout, and CI/CD expectations. Do not recreate those files from
33+
examples in this documentation.
2734

2835
After creating the repository:
2936

@@ -88,6 +95,7 @@ Module repositories use the PSModule framework layout:
8895
| `CLAUDE.md` | Claude Code entry point. Imports `AGENTS.md` so Claude reads the same instructions. |
8996
| `.github/PSModule.yml` | Module workflow configuration overrides. |
9097
| `.github/workflows/Process-PSModule.yml` | Caller workflow that runs the module's CI/CD by calling the shared Process-PSModule workflow. |
98+
| `.github/zensical.toml` | Canonical generated-site configuration copied from `Template-PSModule`. |
9199
| `.github/release.yml` | Release-note and changelog categorization for GitHub releases. |
92100
| `.github/linters/` | Linter configuration used by the framework's linting stage, including `.markdown-lint.yml` and `.powershell-psscriptanalyzer.psd1`. |
93101
| `.github/dependabot.yml` | Configures ecosystem-appropriate dependency-update pull requests. For PowerShell module repositories the `github-actions` ecosystem is expected; add any other ecosystems the module actually develops in. |
@@ -179,15 +187,50 @@ Runtime-specific adapter files such as `.github/copilot-instructions.md` and `.g
179187

180188
These files are the agent equivalent of the README: pointers, not copies. Keep them short so the linked documentation stays the single source of truth. Like the other governance files, they live in the repository itself so it can stand on its own.
181189

182-
## Managed file distribution
190+
## Template ownership and reconciliation
183191

184-
**Policy ownership and distribution runtime are separate concerns.** This page — and this documentation project in [`PSModule/Process-PSModule`](https://github.com/PSModule/Process-PSModule) — defines *what* files must exist in module repositories and *what standards they must meet*. The distribution runtime is handled by [`MSXOrg/Custo`](https://github.com/MSXOrg/Custo).
192+
Policy ownership, executable templates, and distribution are separate
193+
concerns:
185194

186-
For PSModule module repositories, the requirements are:
187-
188-
- Repositories must contain the required baseline files defined on this page.
189-
- Managed copies of those files are treated as generated distribution artifacts, not repository-specific source.
190-
- Standard changes to managed-file content are made in the distribution engine, not by patching generated copies in receiving repositories.
195+
| Concern | Source of truth |
196+
| --- | --- |
197+
| Enterprise requirements | [MSX Repository Standard](https://msx.no/docs/Ways-of-Working/Repository-Standard/) |
198+
| PowerShell module requirements | This PSModule Repository Standard |
199+
| Exact standard-file implementation | The default branch of [`PSModule/Template-PSModule`](https://github.com/PSModule/Template-PSModule) |
200+
| Repository-specific code and content | The consumer repository |
201+
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
207+
skills.
208+
209+
Every standard file for a new module repository must exist in
210+
`Template-PSModule`. Template files have one of these relationships to an
211+
established repository:
212+
213+
| Relationship | Reconciliation behavior |
214+
| --- | --- |
215+
| Template-owned standard | Match the template unless a documented exception applies. |
216+
| Parameterized standard | Match after applying only declared repository identity substitutions. |
217+
| Configurable standard | Preserve supported repository-specific values and compare the remaining defaults. |
218+
| Creation scaffold | Use when creating a repository; do not overwrite established source, tests, examples, or content. |
219+
| Repository-owned addition | Preserve unless it violates a governing standard or framework contract. |
220+
221+
Use the
222+
[`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.
226+
227+
Automated managed-file distribution is not operating across the PSModule fleet.
228+
Setting `SubscribeTo` does not currently synchronize files. Until a distribution
229+
runtime is implemented, maintainers apply template changes through
230+
repository-specific pull requests and use the repository audit skill to detect
231+
drift. A future runtime must consume `Template-PSModule` rather than maintain a
232+
second copy of standard files. Process-PSModule maintainers own detecting when
233+
template reconciliation or distribution stops operating.
191234

192235
## Supply-chain defaults
193236

@@ -370,6 +413,25 @@ Use these defaults:
370413

371414
This keeps the repository landing page readable and prevents drift between README content, PowerShell help, and generated documentation.
372415

416+
### Zensical configuration
417+
418+
The canonical module-site configuration is
419+
[`Template-PSModule/.github/zensical.toml`](https://github.com/PSModule/Template-PSModule/blob/main/.github/zensical.toml).
420+
Keep its repository placeholders: Process-PSModule resolves them while staging
421+
the generated site. The template carries the portable subset of the MSXorg and
422+
Process-PSModule documentation design, with the MSXorg design taking precedence
423+
when they differ.
424+
425+
Do not declare `nav` in a standard module repository. Zensical derives
426+
navigation from the staged folder structure, places index pages first, and
427+
sorts the remaining pages alphabetically. Organize generated function
428+
references through their source folders instead of maintaining a second
429+
navigation tree in TOML.
430+
431+
Repository-specific documentation content remains repository-owned. A module
432+
may depart from the template's site configuration only for a documented
433+
requirement that the shared generated-site profile cannot satisfy.
434+
373435
## Release and PR defaults
374436

375437
Module repositories use the Process-PSModule workflow. Version and release behavior is driven by PR labels and workflow settings.
@@ -385,6 +447,11 @@ See [Versioning](versioning.md) for semantic version rules and [PowerShell modul
385447

386448
## Template maintenance
387449

388-
`Template-PSModule` defines the default README shape and starter repository contract. When this page changes a default, update `Template-PSModule` in the same work item when practical.
450+
`Template-PSModule` contains the concrete files for the complete starter
451+
repository contract. Every Process-PSModule change includes an impact
452+
evaluation that determines whether the template must change. When a framework
453+
contract or this page changes a default, update the template in the same work
454+
item before aligning consumer repositories. A standard is not complete while
455+
its required implementation is absent from the template.
389456

390457
The template README may contain tokens, but generated module repositories should not keep them after the initial setup commit.

0 commit comments

Comments
 (0)