Skip to content

Commit 0922daf

Browse files
Reference canonical repository files without duplication
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 3ea02d2 commit 0922daf

9 files changed

Lines changed: 65 additions & 120 deletions

File tree

.claude/CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<!-- markdownlint-disable MD041 -->
2+
@../AGENTS.md

.github/copilot-instructions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<!-- markdownlint-disable MD041 -->
2+
Follow the instructions in [AGENTS.md](../AGENTS.md).

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,4 @@ workflow validation.
200200
- [Pester v6 quick start](https://pester.dev/docs/v6/quick-start)
201201
- [Pester `New-PesterConfiguration` command](https://pester.dev/docs/commands/New-PesterConfiguration)
202202
- [Pester `Invoke-Pester` command](https://pester.dev/docs/commands/Invoke-Pester)
203-
- [MSX PR format](https://msxorg.github.io/docs/Ways-of-Working/PR-Format/)
203+
- [MSX PR format](https://msx.no/docs/Ways-of-Working/PR-Format/)

AGENTS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ works. For PSModule-specific build, layout, and process guidance:
1717

1818
- [Process-PSModule docs](https://psmodule.io/Process-PSModule/)
1919
repository structure, module anatomy, and the build/test/pack/publish pipeline.
20-
- [Repository defaults](https://psmodule.github.io/docs/Modules/Repository-Defaults/)
20+
- [Repository standard](https://psmodule.io/Process-PSModule/reference/repository-standard/)
2121
the expected repository layout and required files.
22-
- [Standards](https://psmodule.github.io/docs/Modules/Standards/) PowerShell module
23-
coding standards.
22+
- [PowerShell module standard](https://psmodule.io/Process-PSModule/reference/powershell-module-standard/)
23+
PowerShell module coding standards.
2424
- [PSModule/memory](https://github.com/PSModule/memory) — durable cross-session agent
2525
working memory for the PSModule organization.
2626

@@ -36,7 +36,7 @@ audit or migration skills.
3636

3737
For cross-cutting ways of working and standards:
3838

39-
- [Agentic Development](https://msx.no/docs/Ways-of-Working/Agentic-Development/)
39+
- [Agentic Development](https://msx.no/docs/Capabilities/agentic-development/)
4040
how agents and humans collaborate in this ecosystem.
4141
- [Ways of Working](https://msx.no/docs/Ways-of-Working/) — contribution
4242
workflow, branching, PRs, issues.

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

Lines changed: 9 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -29,51 +29,15 @@ If you plan to create many modules, use a glob pattern for the API key permissio
2929

3030
## 3. Add the caller workflow
3131

32-
Create `.github/workflows/Process-PSModule.yml` in the module repository:
33-
34-
```yaml
35-
name: Process-PSModule
36-
37-
on:
38-
workflow_dispatch:
39-
schedule:
40-
- cron: '0 0 * * *'
41-
push:
42-
branches:
43-
- main
44-
pull_request:
45-
branches:
46-
- main
47-
types:
48-
- closed
49-
- opened
50-
- reopened
51-
- synchronize
52-
- labeled
53-
- unlabeled
54-
55-
concurrency:
56-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
57-
cancel-in-progress: false
58-
59-
permissions:
60-
contents: read
61-
pages: write
62-
id-token: write
63-
64-
jobs:
65-
Process-PSModule:
66-
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v8
67-
secrets:
68-
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
69-
GitHubAppClientId: ${{ secrets.SHELLY_CLIENT_ID }}
70-
GitHubAppPrivateKey: ${{ secrets.SHELLY_PRIVATE_KEY }}
71-
```
72-
73-
Every permission in that block is required. GitHub App installation tokens perform repository writes. A push to `main` publishes a stable release after the full pipeline passes;
74-
the pull-request trigger handles CI, prereleases, and prerelease cleanup. See
75-
[Workflow inputs](../reference/workflow-inputs.md) for what each permission is used for, and
76-
[Calling the workflow](../guides/calling-the-workflow.md) for passing test secrets and variables.
32+
Keep the
33+
[canonical caller workflow](https://github.com/PSModule/Template-PSModule/blob/main/.github/workflows/Process-PSModule.yml)
34+
from `Template-PSModule`. Do not reconstruct it from a documentation example.
35+
The template owns its triggers, concurrency, permissions, secrets, and
36+
Process-PSModule major-version reference.
37+
38+
See [Workflow inputs](../reference/workflow-inputs.md) for the reusable
39+
workflow contract and [Calling the workflow](../guides/calling-the-workflow.md)
40+
for supported `TestData` customization.
7741

7842
## 4. Add the settings file
7943

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

Lines changed: 10 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -5,65 +5,27 @@ description: How to call the Process-PSModule reusable workflow — the caller w
55

66
# Calling the workflow
77

8-
To use the workflow, create a new file in the `.github/workflows` directory of the module repository and add the following content.
8+
Use
9+
[`Template-PSModule/.github/workflows/Process-PSModule.yml`](https://github.com/PSModule/Template-PSModule/blob/main/.github/workflows/Process-PSModule.yml)
10+
as the caller workflow. Copy the complete file instead of reconstructing it
11+
from documentation snippets. The template owns its triggers, concurrency,
12+
permissions, standard secrets, and controlled `@v8` reference.
13+
914
For documentation site generation, keep the canonical
1015
`Template-PSModule/.github/zensical.toml`; Process-PSModule resolves it into the
1116
staged site's `zensical.toml`.
1217

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

16-
<details>
17-
<summary>Workflow suggestion</summary>
18-
19-
```yaml
20-
name: Process-PSModule
21-
22-
on:
23-
workflow_dispatch:
24-
schedule:
25-
- cron: '0 0 * * *'
26-
push:
27-
branches:
28-
- main
29-
pull_request:
30-
branches:
31-
- main
32-
types:
33-
- closed
34-
- opened
35-
- reopened
36-
- synchronize
37-
- labeled
38-
- unlabeled
39-
40-
concurrency:
41-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
42-
cancel-in-progress: false
43-
44-
permissions:
45-
contents: read
46-
pages: write
47-
id-token: write
48-
49-
jobs:
50-
Process-PSModule:
51-
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v8
52-
secrets:
53-
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
54-
GitHubAppClientId: ${{ secrets.SHELLY_CLIENT_ID }}
55-
GitHubAppPrivateKey: ${{ secrets.SHELLY_PRIVATE_KEY }}
56-
```
57-
58-
</details>
59-
6021
Stable releases are evaluated from a push to the default branch. A merged pull request supplies its version label and
6122
release notes; a direct default-branch push or a manual dispatch uses the default `Patch` bump and commit-based notes.
6223
Keep the `pull_request` trigger for CI, prereleases, and prerelease cleanup.
6324

64-
The concurrency key keeps a pull request distinct from a default-branch push, so the close-event cleanup and the
65-
resulting stable release do not serialize as one run. Keep `cancel-in-progress: false`: a release-capable run mutates
66-
the PowerShell Gallery, GitHub Releases, and tags, so later runs must queue rather than interrupt it.
25+
The template's concurrency key keeps a pull request distinct from a
26+
default-branch push. It cancels superseded pull-request validation while
27+
allowing release-capable branch runs to finish because they can mutate the
28+
PowerShell Gallery, GitHub Releases, and tags.
6729
The reusable workflow uses its own prefixed concurrency group, so it cannot queue behind the caller while the caller
6830
waits for it to finish.
6931

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ The goal is a stable repository anatomy so both humans and automation know exact
2727

2828
```plaintext
2929
<ModuleName>/
30+
├── .claude/
31+
│ └── CLAUDE.md # Claude Code route to AGENTS.md
3032
├── .github/ # Workflow config, doc/site templates, automation policy
3133
│ ├── linters/ # Rule sets applied by shared lint steps
3234
│ │ ├── .markdown-lint.yml # Markdown rules enforced via super-linter
@@ -37,6 +39,7 @@ The goal is a stable repository anatomy so both humans and automation know exact
3739
│ ├── CODE_OF_CONDUCT.md # Community participation rules
3840
│ ├── CODEOWNERS # Default reviewers enforced by Process-PSModule checks
3941
│ ├── CONTRIBUTING.md # Repository-local contribution workflow
42+
│ ├── copilot-instructions.md # Copilot route to AGENTS.md
4043
│ ├── dependabot.yml # Dependency update cadence handled by GitHub
4144
│ ├── PSModule.yml # Settings parsed to drive matrices
4245
│ ├── release.yml # Release automation template invoked on publish
@@ -54,6 +57,7 @@ The goal is a stable repository anatomy so both humans and automation know exact
5457
│ └── <ModuleName>.Tests.ps1 # Simple: one root-level module suite
5558
├── .gitattributes # Normalizes line endings across platforms
5659
├── .gitignore # Excludes build artifacts from source control
60+
├── AGENTS.md # Cross-client agent guidance router
5761
├── LICENSE # License text surfaced in manifest metadata
5862
└── README.md # Repository overview rendered on GitHub and docs landing
5963
```

docs/content/guides/validating-before-review.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Do not repeat the shared workflow here. Follow the shared branch → draft PR
7878
Check:
7979

8080
- naming, documentation, error handling, testing expectations, and security posture align with the relevant pages under [MSX Coding Standards](https://msx.no/docs/Coding-Standards/)
81-
- the change follows the shared "written once, referenced everywhere" rule by linking canonical guidance instead of copying it into local docs or code comments, as described in [Agentic Development](https://msx.no/docs/Ways-of-Working/Agentic-Development/)
81+
- the change follows the shared "written once, referenced everywhere" rule by linking canonical guidance instead of copying it into local docs or code comments, as described in [Agentic Development](https://msx.no/docs/Capabilities/agentic-development/)
8282
- the draft PR description, issue progress, and any follow-up issues reflect what actually shipped and what still belongs out of scope
8383

8484
This is the last author-side gate before a PSModule draft PR is ready for independent review.

docs/content/reference/repository-standard.md

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ Module repositories use the PSModule framework layout:
9292
| `.github/SUPPORT.md` | Support expectations and where users ask for help. |
9393
| `.github/CODE_OF_CONDUCT.md` | Community conduct expectations. |
9494
| `AGENTS.md` | Agent onboarding entry point. Points agents to the canonical guidance at `https://psmodule.io/Process-PSModule/`. |
95-
| `CLAUDE.md` | Claude Code entry point. Imports `AGENTS.md` so Claude reads the same instructions. |
95+
| `.claude/CLAUDE.md` | Claude Code entry point. Imports the root `AGENTS.md`. |
96+
| `.github/copilot-instructions.md` | Route for Copilot surfaces that do not read `AGENTS.md` directly. |
9697
| `.github/PSModule.yml` | Module workflow configuration overrides. |
9798
| `.github/workflows/Process-PSModule.yml` | Caller workflow that runs the module's CI/CD by calling the shared Process-PSModule workflow. |
9899
| `.github/zensical.toml` | Canonical generated-site configuration copied from `Template-PSModule`. |
@@ -125,19 +126,16 @@ The module repository owns a caller workflow; the framework owns the reusable wo
125126
| Caller workflow | The module repository | `.github/workflows/Process-PSModule.yml` |
126127
| Reusable workflow | [`PSModule/Process-PSModule`](https://github.com/PSModule/Process-PSModule) | `.github/workflows/workflow.yml` |
127128

128-
The caller workflow declares the triggers, concurrency, and permissions for the module repository, and delegates the work:
129+
The caller workflow declares the triggers, concurrency, and permissions for the
130+
module repository, then delegates the work. Copy
131+
[`Template-PSModule/.github/workflows/Process-PSModule.yml`](https://github.com/PSModule/Template-PSModule/blob/main/.github/workflows/Process-PSModule.yml)
132+
instead of maintaining another example here.
129133

130-
```yaml
131-
jobs:
132-
Process-PSModule:
133-
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@<commit-sha> # <version tag>
134-
secrets:
135-
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
136-
GitHubAppClientId: ${{ secrets.SHELLY_CLIENT_ID }}
137-
GitHubAppPrivateKey: ${{ secrets.SHELLY_PRIVATE_KEY }}
138-
```
139-
140-
Name the caller file `Process-PSModule.yml`, matching [`PSModule/Template-PSModule`](https://github.com/PSModule/Template-PSModule) and every existing module repository. `workflow.yml` is the reusable workflow's own filename inside `PSModule/Process-PSModule` and belongs only in the `uses:` reference. Pin the reference to a commit SHA with the version tag in a trailing comment so Dependabot can update it.
134+
Name the caller file `Process-PSModule.yml`. `workflow.yml` is the reusable
135+
workflow's own filename inside `PSModule/Process-PSModule` and belongs only in
136+
the `uses:` reference. Process-PSModule is initiative-owned automation with a
137+
controlled release process, so the template uses the floating `@v8` major
138+
reference permitted by the MSX GitHub Actions standard.
141139

142140
## Required common files
143141

@@ -160,7 +158,8 @@ Required baseline files for module repositories:
160158
| `.github/SUPPORT.md` | Support channel and issue-routing expectations. |
161159
| `.github/CODE_OF_CONDUCT.md` | Community participation rules. |
162160
| `AGENTS.md` | Cross-tool agent instructions pointing to the canonical guidance at `https://psmodule.io/Process-PSModule/`. |
163-
| `CLAUDE.md` | Claude Code entry point that imports `AGENTS.md`. |
161+
| `.claude/CLAUDE.md` | Claude Code entry point that imports the root `AGENTS.md`. |
162+
| `.github/copilot-instructions.md` | Route to `AGENTS.md` for Copilot surfaces that need their own filename. |
164163
| `.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. |
165164
| `.github/CODEOWNERS` | Review routing for source, docs, and GitHub workflow files. |
166165
| `.github/pull_request_template.md` | Scaffolds pull requests in the MSX PR Format (PR Manager) style — an icon + change-type + user-facing-outcome title, user-facing description sections, an optional technical-details block, and a related-issues block. |
@@ -185,13 +184,25 @@ community health files.
185184
Every repository must be usable by an agent that has never seen it before, without special configuration. Each repository carries its own agent entry points that point to the authoritative documentation instead of restating it:
186185

187186
- `AGENTS.md`: the cross-tool entry point, read by the GitHub Copilot coding agent, VS Code, and other AGENTS.md-aware tools. It names what the repository is in a line or two and points to the canonical agent guidance at [psmodule.io/Process-PSModule](https://psmodule.io/Process-PSModule/).
188-
- `CLAUDE.md`: a thin file that imports `AGENTS.md` with `@AGENTS.md` so Claude Code reads the same instructions. Claude-specific notes, if any, go below the import.
189-
190-
See [PSModule/Template-PSModule](https://github.com/PSModule/Template-PSModule) for a concrete implementation example of `AGENTS.md` and `CLAUDE.md`.
191-
192-
`AGENTS.md` and `CLAUDE.md` are the required set. `AGENTS.md` is the entry point that AGENTS.md-aware runtimes read directly, so a repository is usable by an agent without a per-runtime copy of the same pointer.
193-
194-
Runtime-specific adapter files such as `.github/copilot-instructions.md` and `.github/instructions/*.instructions.md` are optional. MSX treats them as client adapters that *may* add runtime-specific loading or path rules, described in [Agentic Development](https://msx.no/docs/Ways-of-Working/Agentic-Development/) and its [capability specification](https://msx.no/docs/Capabilities/agentic-development/spec/). Add one when a runtime needs loading or path rules that `AGENTS.md` cannot express, and keep it pointing at `AGENTS.md` rather than restating it. `Template-PSModule` ships without one.
187+
- `.claude/CLAUDE.md`: a thin file that imports the root router with
188+
`@../AGENTS.md`.
189+
- `.github/copilot-instructions.md`: a thin link to `../AGENTS.md` for Copilot
190+
surfaces that do not read the root router directly.
191+
192+
See [PSModule/Template-PSModule](https://github.com/PSModule/Template-PSModule)
193+
for the concrete implementation.
194+
195+
`AGENTS.md`, `.claude/CLAUDE.md`, and
196+
`.github/copilot-instructions.md` are the required set. `AGENTS.md` is the
197+
entry point that AGENTS.md-aware runtimes read directly.
198+
199+
Additional runtime-specific adapters and
200+
`.github/instructions/*.instructions.md` are optional. MSX treats them as
201+
client routes or path-scoped caveats, described in
202+
[Agentic Development](https://msx.no/docs/Capabilities/agentic-development/)
203+
and its
204+
[capability specification](https://msx.no/docs/Capabilities/agentic-development/spec/).
205+
Keep routes pointing at `AGENTS.md` rather than restating it.
195206

196207
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.
197208

0 commit comments

Comments
 (0)