Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/update-index/src/Helper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ $moduleTableRows</table>

"@

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

function Update-FunctionAppList {
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/update-index/src/main.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Import-Module -Name (Join-Path $PSScriptRoot 'Helper.psm1')

Show-RepoList
Update-ActionList
Update-FunctionAppList
# Update-ActionList
# Update-FunctionAppList
Update-ModuleList
1 change: 1 addition & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Follow the instructions in [AGENTS.md](../AGENTS.md).
19 changes: 10 additions & 9 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,20 @@
###############
# Rules by id #
###############
MD004: false # Unordered list style
MD004: false # Unordered list style
MD007:
indent: 2 # Unordered list indentation
indent: 2 # Unordered list indentation
MD013:
line_length: 3000 # Line length
line_length: 3000 # Line length
MD025: false # Allow front-matter title + visible H1 on docs pages
MD026:
punctuation: ".,;:!。,;:" # List of not allowed
MD029: false # Ordered list item prefix
MD033: false # Allow inline HTML
MD036: false # Emphasis used instead of a heading
MD041: false # First line in file should be a top level heading, PULL_REQUEST_TEMPLATE.md is an exception
punctuation: '.,;:!。,;:' # List of not allowed
MD029: false # Ordered list item prefix
MD033: false # Allow inline HTML
MD036: false # Emphasis used instead of a heading
MD041: false # First line in file should be a top level heading, PULL_REQUEST_TEMPLATE.md is an exception

#################
# Rules by tags #
#################
blank_lines: false # Error on blank lines
blank_lines: false # Error on blank lines
29 changes: 29 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Agents

## Main directive

Everything is a work in progress and can be updated and improved.
If you find a problem, fix it if it's small; otherwise, register it as an issue in the respective repo.

## Install the ecosystem

1. Create a folder in the home directory called `.msx/PSModule`:
2. Clone the ecosystem locally:
1. <https://github.com/PSModule/docs> — requires PRs to be updated.
- Clone as bare and use worktrees.
- Create a worktree for all branches - worktree = name of the branch.
2. <https://github.com/PSModule/memory> — work directly towards main.
- Simple clone, only main.

To install:
Clone the repos in the users home folder under a sub-folder named `.msx/PSModule`.
- Set configs locally to each of these repos using the GitHub username and email.

## Working with the ecosystem

1. Get to know this repo first:
- [README](README.md) for what this repository is and how it builds.
- [CONTRIBUTING](CONTRIBUTING.md) for how to contribute and the review process.
2. Read the `.msx/PSModule/main/docs` - start with the index to get an overview of what is here.
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.
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.
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md
54 changes: 41 additions & 13 deletions src/docs/Modules/Repository-Defaults.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ They do not apply directly to:
- Template repositories other than `Template-PSModule`.
- Test, archive, service, or infrastructure repositories that are not published as module artifacts.

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.

Each initiative should keep its own repository standards in its central documentation repository. For the PSModule organization, this repository is the source of truth.

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

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

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.

## Agent onboarding files

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:

- `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).
- `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.
- `.github/copilot-instructions.md`: repository instructions for VS Code and GitHub Copilot that point to the same documentation.

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.

## Managed file distribution

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

Managed-file distribution follows this contract:

- `Type` maps a repository to its file-set root (for example `Module` or `Action`).
- `SubscribeTo` declares which optional managed file sets the repository receives.
- Organization-wide mandatory file sets define non-optional governance and supply-chain files for each applicable repository type.
- Distributor delivers changes through a `managed-files/update` branch and a `⚙️ [Maintenance]: Sync managed files` pull request.
- 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.
- Removing a file from a file set does not implicitly delete previously synced copies; deletion is an explicit managed change.

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

- `Type` is an organization repository custom property that maps a repository to a type folder such as `Module` or `Action`.
- `SubscribeTo` is an organization repository custom property that selects file sets such as `dependabot.yml`, `Linter Settings`, `PSModule Settings`, `CODEOWNERS`, `License`, `.gitattributes`, and `.gitignore`.
- Sync changes are delivered through a `managed-files/update` branch and a `⚙️ [Maintenance]: Sync managed files` pull request.
- 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.
- Removing a file from a Distributor file set does not delete the previously distributed file from target repositories; cleanup is explicit.
### Migration for existing repositories

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

- **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.
- **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.
1. Set or correct repository `Type` and `SubscribeTo` properties.
2. Ensure mandatory governance and supply-chain files from this standard exist in the repository.
3. Move any intended local edits in managed files into Distributor source file sets.
4. Sync from Distributor and merge the `managed-files/update` pull request.
5. Remove unmanaged duplicates or stale files explicitly when they are no longer part of an active file set.

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.
After migration, the repository keeps the required files from this standard, and managed-file content changes are made through Distributor-first updates.

## Supply-chain defaults

Expand Down
2 changes: 1 addition & 1 deletion src/docs/Style-Guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Coding style guidelines for PSModule repositories.

# Style Guides (Moved)

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

Use:

Expand Down
94 changes: 0 additions & 94 deletions src/overrides/assets/javascripts/abbreviation-preview.js

This file was deleted.