Skip to content

Commit e4deef3

Browse files
Merge branch 'main' into docs/61-module-types-naming
2 parents cf15866 + 24fb680 commit e4deef3

9 files changed

Lines changed: 86 additions & 120 deletions

File tree

.github/actions/update-index/src/Helper.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ $moduleTableRows</table>
229229
230230
"@
231231

232-
Update-MDSection -Path '.\src\docs\PowerShell\Modules\index.md' -Name 'MODULE_LIST' -Content $moduleTable
232+
Update-MDSection -Path '.\src\docs\Modules\Catalog\index.md' -Name 'MODULE_CATALOG' -Content $moduleTable
233233
}
234234

235235
function Update-FunctionAppList {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Import-Module -Name (Join-Path $PSScriptRoot 'Helper.psm1')
22

33
Show-RepoList
4-
Update-ActionList
5-
Update-FunctionAppList
4+
# Update-ActionList
5+
# Update-FunctionAppList
66
Update-ModuleList

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Follow the instructions in [AGENTS.md](../AGENTS.md).

.github/linters/.markdown-lint.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@
88
###############
99
# Rules by id #
1010
###############
11-
MD004: false # Unordered list style
11+
MD004: false # Unordered list style
1212
MD007:
13-
indent: 2 # Unordered list indentation
13+
indent: 2 # Unordered list indentation
1414
MD013:
15-
line_length: 3000 # Line length
15+
line_length: 3000 # Line length
16+
MD025: false # Allow front-matter title + visible H1 on docs pages
1617
MD026:
17-
punctuation: ".,;:!。,;:" # List of not allowed
18-
MD029: false # Ordered list item prefix
19-
MD033: false # Allow inline HTML
20-
MD036: false # Emphasis used instead of a heading
21-
MD041: false # First line in file should be a top level heading, PULL_REQUEST_TEMPLATE.md is an exception
18+
punctuation: '.,;:!。,;:' # List of not allowed
19+
MD029: false # Ordered list item prefix
20+
MD033: false # Allow inline HTML
21+
MD036: false # Emphasis used instead of a heading
22+
MD041: false # First line in file should be a top level heading, PULL_REQUEST_TEMPLATE.md is an exception
2223

2324
#################
2425
# Rules by tags #
2526
#################
26-
blank_lines: false # Error on blank lines
27+
blank_lines: false # Error on blank lines

AGENTS.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Agents
2+
3+
## Main directive
4+
5+
Everything is a work in progress and can be updated and improved.
6+
If you find a problem, fix it if it's small; otherwise, register it as an issue in the respective repo.
7+
8+
## Install the ecosystem
9+
10+
1. Create a folder in the home directory called `.msx/PSModule`:
11+
2. Clone the ecosystem locally:
12+
1. <https://github.com/PSModule/docs> — requires PRs to be updated.
13+
- Clone as bare and use worktrees.
14+
- Create a worktree for all branches - worktree = name of the branch.
15+
2. <https://github.com/PSModule/memory> — work directly towards main.
16+
- Simple clone, only main.
17+
18+
To install:
19+
Clone the repos in the users home folder under a sub-folder named `.msx/PSModule`.
20+
- Set configs locally to each of these repos using the GitHub username and email.
21+
22+
## Working with the ecosystem
23+
24+
1. Get to know this repo first:
25+
- [README](README.md) for what this repository is and how it builds.
26+
- [CONTRIBUTING](CONTRIBUTING.md) for how to contribute and the review process.
27+
2. Read the `.msx/PSModule/main/docs` - start with the index to get an overview of what is here.
28+
3. Read the `.msx/PSModule/memory` - start with the index to get an overview of what is here. Use this while working - commit your memories here for work inside the PSModule organization.
29+
4. While working with the code, do small micro commits and push on every commit. This will make it easier to review and merge your changes.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@AGENTS.md

src/docs/Modules/Repository-Defaults.md

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ They do not apply directly to:
1515
- Template repositories other than `Template-PSModule`.
1616
- Test, archive, service, or infrastructure repositories that are not published as module artifacts.
1717

18+
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 module defaults, and non-module repositories keep only the equivalent baseline appropriate to their own type. This repository, `PSModule/docs`, follows those two baseline expectations itself.
19+
1820
Each initiative should keep its own repository standards in its central documentation repository. For the PSModule organization, this repository is the source of truth.
1921

2022
## Repository creation
@@ -62,10 +64,13 @@ Module repositories use the PSModule framework layout:
6264
| ---- | --------------- |
6365
| `README.md` | Concise start page for the module. |
6466
| `LICENSE` | Repository license. PSModule module repositories default to MIT unless a different license is explicitly decided. |
65-
| `CONTRIBUTING.md` | Contribution workflow or a repository-level pointer to the organization contribution guide. |
67+
| `CONTRIBUTING.md` | Self-contained contribution workflow for this repository. Does not rely on an organization-level fallback. |
6668
| `SECURITY.md` | Security support policy and private vulnerability reporting instructions. |
6769
| `SUPPORT.md` | Support expectations and where users ask for help. |
6870
| `CODE_OF_CONDUCT.md` | Community conduct expectations. |
71+
| `AGENTS.md` | Agent onboarding entry point. Points agents to the canonical guidance in `PSModule/docs`. |
72+
| `CLAUDE.md` | Claude Code entry point. Imports `AGENTS.md` so Claude reads the same instructions. |
73+
| `.github/copilot-instructions.md` | VS Code and GitHub Copilot repository instructions. Points to the same documentation. |
6974
| `.github/PSModule.yml` | Module workflow configuration overrides. |
7075
| `.github/workflows/workflow.yml` | Reusable Process-PSModule workflow entry point. |
7176
| `.github/dependabot.yml` | Dependency and supply-chain update configuration. |
@@ -102,10 +107,13 @@ Required baseline files for module repositories:
102107
| ---- | ------------------ |
103108
| `README.md` | Repository landing page and evergreen context for humans and agents. |
104109
| `LICENSE` | Clear legal terms for reuse, packaging, and redistribution. |
105-
| `CONTRIBUTING.md` | Shared contribution workflow and expectations. |
110+
| `CONTRIBUTING.md` | Self-contained contribution workflow and expectations for this repository. |
106111
| `SECURITY.md` | Private vulnerability reporting and latest-version support policy. |
107112
| `SUPPORT.md` | Support channel and issue-routing expectations. |
108113
| `CODE_OF_CONDUCT.md` | Community participation rules. |
114+
| `AGENTS.md` | Cross-tool agent instructions pointing to the canonical guidance in `PSModule/docs`. |
115+
| `CLAUDE.md` | Claude Code entry point that imports `AGENTS.md`. |
116+
| `.github/copilot-instructions.md` | VS Code and GitHub Copilot repository instructions pointing to the documentation. |
109117
| `.github/dependabot.yml` | Supply-chain maintenance for GitHub Actions and PowerShell dependencies. |
110118
| `.github/CODEOWNERS` | Review routing for source, docs, and GitHub workflow files. |
111119
| `.github/pull_request_template.md` | Consistent PR Manager-style PR descriptions and change classification. |
@@ -118,24 +126,44 @@ Required baseline files for module repositories:
118126

119127
Repositories can add local files, but they should not remove these baseline files unless the repository is explicitly outside the module standard.
120128

129+
Each repository must stand on its own. It carries its own copy of every file above and does not depend on the organization `.github` fallback: that fallback is only surfaced in GitHub's web UI, and agents, linters, and local tooling do not read it.
130+
131+
## Agent onboarding files
132+
133+
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:
134+
135+
- `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 in [`PSModule/docs`](https://github.com/PSModule/docs).
136+
- `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.
137+
- `.github/copilot-instructions.md`: repository instructions for VS Code and GitHub Copilot that point to the same documentation.
138+
139+
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.
140+
121141
## Managed file distribution
122142

123-
Shared files should be treated as managed files. The current distribution service is [`PSModule/Distributor`](https://github.com/PSModule/Distributor). It keeps source file sets under `Repos/{Type}/{Selection}/` and syncs those files into repositories through pull requests.
143+
Shared repository files are managed through [`PSModule/Distributor`](https://github.com/PSModule/Distributor). Distributor is the source of truth for managed file content and file-set membership.
144+
145+
Managed-file distribution follows this contract:
146+
147+
- `Type` maps a repository to its file-set root (for example `Module` or `Action`).
148+
- `SubscribeTo` declares which optional managed file sets the repository receives.
149+
- Organization-wide mandatory file sets define non-optional governance and supply-chain files for each applicable repository type.
150+
- Distributor delivers changes through a `managed-files/update` branch and a `⚙️ [Maintenance]: Sync managed files` pull request.
151+
- Receiving repositories treat managed files as generated artifacts from Distributor. Local edits in the receiving repository are replaced on the next sync and must be made in Distributor instead.
152+
- Removing a file from a file set does not implicitly delete previously synced copies; deletion is an explicit managed change.
124153

125-
The current Distributor model is subscription-based:
154+
This page defines what files must exist in repositories. Distributor defines how those files are distributed and kept aligned.
126155

127-
- `Type` is an organization repository custom property that maps a repository to a type folder such as `Module` or `Action`.
128-
- `SubscribeTo` is an organization repository custom property that selects file sets such as `dependabot.yml`, `Linter Settings`, `PSModule Settings`, `CODEOWNERS`, `License`, `.gitattributes`, and `.gitignore`.
129-
- Sync changes are delivered through a `managed-files/update` branch and a `⚙️ [Maintenance]: Sync managed files` pull request.
130-
- Managed files are overwritten by the source file set. Local edits to managed files should be made in Distributor, not directly in the receiving repository.
131-
- Removing a file from a Distributor file set does not delete the previously distributed file from target repositories; cleanup is explicit.
156+
### Migration for existing repositories
132157

133-
Two follow-up Distributor capabilities define the desired direction:
158+
Repositories that still reflect older distribution behavior should be aligned to this contract:
134159

135-
- **Global file sets** should allow common file sets such as `.gitattributes`, `.gitignore`, and `License` to be defined once and made available to all repository types while still requiring subscription.
136-
- **Mandatory file sets** should allow organization-critical files such as `SECURITY.md`, `CODE_OF_CONDUCT.md`, `CONTRIBUTING.md`, and supply-chain configuration to be pushed to applicable repositories without each repository having to subscribe manually.
160+
1. Set or correct repository `Type` and `SubscribeTo` properties.
161+
2. Ensure mandatory governance and supply-chain files from this standard exist in the repository.
162+
3. Move any intended local edits in managed files into Distributor source file sets.
163+
4. Sync from Distributor and merge the `managed-files/update` pull request.
164+
5. Remove unmanaged duplicates or stale files explicitly when they are no longer part of an active file set.
137165

138-
Until mandatory file sets exist, repository owners are still responsible for ensuring the required common files exist. Distributor is the preferred implementation mechanism; this document is the standard that says what must exist and why.
166+
After migration, the repository keeps the required files from this standard, and managed-file content changes are made through Distributor-first updates.
139167

140168
## Supply-chain defaults
141169

src/docs/Style-Guides/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Coding style guidelines for PSModule repositories.
55

66
# Style Guides (Moved)
77

8-
Style-guide content is now canonical in MSXOrg/docs.
8+
Style guide content is now canonical in MSXOrg/docs.
99

1010
Use:
1111

src/overrides/assets/javascripts/abbreviation-preview.js

Lines changed: 0 additions & 94 deletions
This file was deleted.

0 commit comments

Comments
 (0)