Skip to content

Commit a157acf

Browse files
Constrain documentation migration guidance to supported builds
Keep consumer documentation changes within the current site staging contract and surface unsupported authored-content migrations as framework gaps. Co-authored-by: Copilot <223556698+Copilot@users.noreply.github.com>
1 parent 0e34e22 commit a157acf

2 files changed

Lines changed: 56 additions & 184 deletions

File tree

  • .github/plugin/psmodule/skills

.github/plugin/psmodule/skills/psmodule-v8-upgrade/SKILL.md

Lines changed: 14 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ what is present before deciding what to migrate:
4040
workflow extensions. Keep them in separate files and validate them in place.
4141

4242
When documentation is absent, do not invent a site as part of the caller
43-
upgrade unless the requested scope explicitly includes documentation migration.
44-
When a legacy MkDocs configuration exists and documentation migration is in
45-
scope, migrate its content and design deliberately to Zensical, then remove
46-
the obsolete configuration only after the generated site validates.
43+
upgrade. When a legacy MkDocs configuration exists, preserve it during the
44+
caller upgrade. A documentation migration that needs consumer-authored content
45+
or theme assets requires framework staging support before it can be delivered.
4746

4847
## Template-PSModule baseline
4948

@@ -125,20 +124,10 @@ Treat files and directories as follows:
125124
Preserve the consumer's local onboarding contract while updating stale links.
126125

127126
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.
137-
138-
For a documentation-only MkDocs migration, use the dedicated
139-
[`psmodule-zensical-migration`](../psmodule-zensical-migration/SKILL.md) skill
140-
so content, theme, assets, and link validation are handled independently from
141-
the caller workflow upgrade.
127+
the difference and migrate only the requested integration surface. The
128+
template's `.github/zensical.toml` is the supported Process-PSModule consumer
129+
configuration. Do not move its site configuration, content, or theme assets
130+
into `docs/` as part of a v8 upgrade.
142131

143132
## Caller workflow contract
144133

@@ -165,8 +154,6 @@ on:
165154
- labeled
166155
- unlabeled
167156

168-
permissions: {}
169-
170157
jobs:
171158
Process-PSModule-Production:
172159
if: ${{ github.event_name != 'pull_request' }}
@@ -241,24 +228,12 @@ uses.
241228

242229
## Documentation integration
243230

244-
Treat `docs/zensical.toml` as authoritative. Do not create or maintain
245-
`mkdocs.yml`, introduce MkDocs configuration, or replace the consumer's
246-
documentation design with a parallel theme.
247-
248-
Compare the consumer's configuration with the Process-PSModule template and
249-
preserve or migrate these surfaces deliberately:
250-
251-
- `docs/zensical.toml`, including `docs_dir` and navigation.
252-
- `docs/content/` as the documentation source directory.
253-
- `docs/overrides/` and custom templates.
254-
- `docs/overrides/assets/stylesheets/navigation.css`.
255-
- `docs/overrides/assets/`, any optional `docs/assets/`, logo, favicon, palette,
256-
fonts, and custom JavaScript/CSS.
257-
- Existing navigation labels, page paths, and custom theme behavior.
258-
259-
Do not delete existing custom CSS/assets merely because the default theme also
260-
provides an equivalent feature. Resolve duplicate configuration in favor of
261-
the existing consumer source of truth, then validate the generated site.
231+
The v8 upgrade does not migrate documentation. Preserve the consumer's
232+
existing documentation source, custom assets, and active site configuration.
233+
For the Process-PSModule site build, keep the template's
234+
`.github/zensical.toml` configuration. Do not create `docs/zensical.toml` or
235+
move documentation content or theme assets into `docs/`; the module site build
236+
does not stage that contract.
262237

263238
## Pester v6 migration
264239

@@ -310,15 +285,7 @@ when a targeted check reveals a broader dependency:
310285
equivalent when available.
311286
3. Run the Pester v6 test suites with the repository's declared configuration.
312287
4. Run the repository's existing lint and test commands.
313-
5. When documentation exists, run:
314-
315-
```powershell
316-
Push-Location docs
317-
zensical build --clean
318-
Pop-Location
319-
```
320-
321-
6. Review the diff for accidental workflow permissions, trigger changes,
288+
5. Review the diff for accidental workflow permissions, trigger changes,
322289
secret exposure, fixture removal, generated files, or unrelated refactoring.
323290

324291
Report commands and outcomes, including blocked checks and why they were
Lines changed: 42 additions & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,159 +1,64 @@
11
---
22
name: psmodule-zensical-migration
3-
description: Migrate a PSModule repository from MkDocs to Zensical using the Process-PSModule documentation design as the default while preserving content, navigation, assets, and repository-specific behavior.
3+
description: Assess a PSModule repository's documentation migration to Zensical without introducing a site layout the Process-PSModule pipeline cannot publish.
44
---
55

6-
# Migrate PSModule documentation from MkDocs to Zensical
6+
# Assess a PSModule Zensical migration
77

8-
Use this skill when a PSModule repository has a legacy MkDocs configuration,
9-
usually `.github/mkdocs.yml`, or needs its documentation site aligned with the
10-
Process-PSModule Zensical design. Keep the migration limited to documentation
11-
integration. Do not rewrite module code or tests unless a documentation build
12-
requires a directly related fix.
8+
Use this skill when a PSModule repository has a legacy MkDocs configuration or
9+
needs its documentation site aligned with Zensical. Keep the assessment limited
10+
to documentation integration. Do not rewrite module code or tests unless a
11+
documentation build requires a directly related fix.
1312

14-
## Source-of-truth design
13+
## Current Process-PSModule boundary
1514

16-
Use the current
17-
[`Process-PSModule` `docs/zensical.toml`](https://github.com/PSModule/Process-PSModule/blob/main/docs/zensical.toml)
18-
as the default style and configuration baseline. Reuse its behavior rather than
19-
inventing a second theme:
15+
The module site pipeline stages generated function documentation, `README.md`,
16+
the module icon, and `.github/zensical.toml` into `outputs/site`. It does not
17+
stage consumer-authored `docs/content/`, `docs/overrides/`, or their assets.
18+
Consequently, a consumer configuration that sets `docs_dir = "content"` or
19+
`custom_dir = "overrides"` cannot be published through the current framework.
2020

21-
- `docs_dir = "content"` with content under `docs/content/`.
22-
- `docs/overrides/` as the custom theme directory.
23-
- `docs/overrides/assets/stylesheets/navigation.css` for navigation styling.
24-
- `docs/overrides/assets/` and any repository-owned `docs/assets/` directory
25-
when present as the asset source of truth.
26-
- Mona Sans text and Source Code Pro code fonts.
27-
- Material-style GitHub/link icons, light/dark/system palette toggles,
28-
black/slate/light-blue colors, and the established navigation features.
29-
- Instant navigation, prefetch/preview/progress, tabs, tracking, top navigation,
30-
search, code copy, tooltips, table of contents, and footer behavior.
31-
- TOC, attribute lists, abbreviations, admonitions, definition lists,
32-
footnotes, tables, HTML-in-Markdown, details, superfences, task lists, and
33-
snippets extensions.
34-
- Mermaid fenced blocks and the shared abbreviations snippet.
35-
- Existing social links, consent configuration, site metadata, edit URI, and
36-
custom tablesort JavaScript where those features apply.
21+
Do not move a module consumer from `.github/zensical.toml` to
22+
`docs/zensical.toml`, or prescribe the Process-PSModule repository's
23+
`docs/content/` design, until the framework stages those paths.
3724

38-
Customize only repository identity and content-specific values such as
39-
`site_name`, `site_url`, `repo_name`, `repo_url`, `edit_uri`, copyright, social
40-
links, and `nav`. Do not remove a default feature merely because the old
41-
MkDocs site did not use it.
25+
## Assess before changing
4226

43-
## Inspect before changing
27+
1. Read local guidance, the current documentation build command, and the
28+
Process-PSModule caller workflow.
29+
2. Inventory `.github/mkdocs.yml`, `mkdocs.yml`, `.github/zensical.toml`, and
30+
any existing documentation sources, templates, media, and assets.
31+
3. Identify whether documentation is published by Process-PSModule or by a
32+
separate repository-owned workflow.
33+
4. Preserve module source, generated help, custom assets, navigation, and
34+
repository-owned workflows unless the requested migration requires them.
4435

45-
Inventory the existing repository and record:
36+
## Supported consumer configuration
4637

47-
1. Local guidance, branch state, and documentation build commands.
48-
2. `.github/mkdocs.yml`, any `mkdocs.yml`, and any existing Zensical config.
49-
3. The Markdown content root, includes/snippets, templates, media, and assets.
50-
4. `theme`, `theme.custom_dir`, `extra_css`, `extra_javascript`, `plugins`,
51-
`markdown_extensions`, `nav`, `extra`, and `watch` settings.
52-
5. Links, anchors, generated API/help pages, redirects, and CI publishing steps.
53-
6. Existing custom CSS, JavaScript, templates, logos, favicons, and fonts.
38+
For a Process-PSModule consumer, retain the template's
39+
`.github/zensical.toml` configuration and the generated site layout. Do not
40+
add a second active site configuration.
5441

55-
Do not assume every consumer has a `docs/` tree. If documentation is absent,
56-
create it only when the requested scope includes documentation migration. If
57-
the repository already uses Zensical, compare it with the Process-PSModule
58-
baseline and make only the required alignment changes.
59-
60-
## Target layout
61-
62-
For the Process-PSModule documentation contract, use:
63-
64-
```text
65-
docs/
66-
├── content/
67-
├── overrides/
68-
│ └── assets/
69-
│ ├── javascripts/
70-
│ └── stylesheets/
71-
└── zensical.toml
72-
```
73-
74-
Keep existing content under `docs/content/`, custom templates under
75-
`docs/overrides/`, and theme assets under `docs/overrides/assets/`. A separate
76-
`docs/assets/` directory is optional for static content assets. Do not create a
77-
parallel MkDocs theme or leave two active site configurations.
78-
79-
The current `PSModule/Template-PSModule` repository historically stores a
80-
starter `.github/zensical.toml` and may not contain a `docs/` tree. When the
81-
consumer upgrade explicitly requires the Process-PSModule `docs/` contract,
82-
move the template settings and custom assets into `docs/` and remove the
83-
obsolete active configuration only after the site builds. When that contract
84-
is not in scope, preserve a working template layout and report the difference
85-
instead of moving files speculatively.
86-
87-
## MkDocs-to-Zensical mapping
88-
89-
Translate behavior, not just filenames:
90-
91-
| MkDocs | Zensical |
92-
| --- | --- |
93-
| `site_name`, `site_url` | `[project]` metadata |
94-
| `docs_dir` | `[project].docs_dir` |
95-
| `repo_name`, `repo_url`, `edit_uri` | `[project]` metadata |
96-
| `nav` | `nav = [...]` TOML entries |
97-
| `theme.name` | `[project.theme]` settings |
98-
| `theme.custom_dir` | `[project.theme].custom_dir` |
99-
| `theme.logo`, `theme.favicon` | `[project.theme]` paths |
100-
| `theme.features` | `[project.theme].features` |
101-
| `theme.palette` | `[[project.theme.palette]]` tables |
102-
| `extra_css`, `extra_javascript` | `[project]` arrays |
103-
| `markdown_extensions` | `[project.markdown_extensions.*]` tables |
104-
| `plugins: search` | `[project.plugins.search]` |
105-
| `extra.social` | `[[project.extra.social]]` |
106-
| `watch` | `[project].watch` |
107-
108-
Preserve Markdown semantics while checking extensions that affect formatting:
109-
admonitions, fenced code, tables, task lists, definition lists, attributes,
110-
snippets, Mermaid, and anchor/permalink behavior. Fix only documented
111-
Zensical incompatibilities; do not silently change headings or links to hide
112-
build failures.
113-
114-
## Content and link migration
115-
116-
- Preserve page paths and navigation labels where possible.
117-
- Keep explicit `nav` entries for important landing pages and references.
118-
- Resolve relative links from the new `docs/content/` root.
119-
- Recheck fragment anchors because heading and permalink behavior can differ.
120-
- Move includes/snippets to the configured Zensical location and update every
121-
reference.
122-
- Keep generated API/help inputs in their framework-owned locations.
123-
- Preserve images and downloads; update paths rather than deleting assets.
124-
- Keep custom templates only when they are still required by the migrated site.
42+
When a requested migration needs authored Markdown content or a custom theme,
43+
record that the framework must first stage those assets into `outputs/site`.
44+
Do not claim the migration is complete until the producer supports the target
45+
layout and a consumer build publishes it successfully.
12546

12647
## Validation
12748

128-
Run repository-native checks and the smallest targeted site checks first:
129-
130-
1. Parse the new `docs/zensical.toml` and verify all configured paths exist.
131-
2. Confirm no active `mkdocs.yml` or MkDocs workflow remains.
132-
3. Check every navigation target, image, download, include, and fragment link.
133-
4. Run the existing documentation lint and link checks.
134-
5. Build the site:
135-
136-
```powershell
137-
Push-Location docs
138-
zensical build --clean
139-
Pop-Location
140-
```
141-
142-
6. Review the generated site for navigation, search, palette toggles, fonts,
143-
logo/favicon, custom navigation behavior, code blocks, Mermaid, and social
144-
links.
145-
7. Run the repository's existing Process-PSModule workflow validation when the
146-
documentation is part of that pipeline.
49+
1. Confirm the caller references the intended Process-PSModule version and
50+
retains `.github/zensical.toml`.
51+
2. Run the consumer's existing documentation and Process-PSModule validation
52+
commands when available.
53+
3. Review the generated site to confirm generated function documentation,
54+
`README.md`, and module assets remain present.
14755

148-
Do not claim success if the site builds while links, assets, navigation, or
149-
publishing behavior are broken. Report intentionally deferred pages,
150-
unsupported extensions, and unrelated pre-existing failures.
56+
Report any unsupported authored-content or custom-theme requirement as a
57+
framework gap rather than working around it with a second active
58+
configuration.
15159

15260
## References
15361

154-
- [Process-PSModule Zensical configuration](https://github.com/PSModule/Process-PSModule/blob/main/docs/zensical.toml)
155-
- [Process-PSModule documentation overrides](https://github.com/PSModule/Process-PSModule/tree/main/docs/overrides)
156-
- [Process-PSModule override assets](https://github.com/PSModule/Process-PSModule/tree/main/docs/overrides/assets)
15762
- [PSModule repository standard](https://github.com/PSModule/Process-PSModule/blob/main/docs/content/reference/repository-standard.md)
158-
- [PSModule documentation model](https://github.com/PSModule/Process-PSModule/blob/main/docs/content/guides/structuring-your-module.md)
63+
- [PSModule workflow inputs](https://github.com/PSModule/Process-PSModule/blob/main/docs/content/reference/workflow-inputs.md)
15964
- [Zensical setup basics](https://zensical.org/docs/setup/basics/)

0 commit comments

Comments
 (0)