Skip to content

Commit 80b2ab2

Browse files
Refactor agent onboarding documentation and clarify managed file distribution process
1 parent 9b0984e commit 80b2ab2

2 files changed

Lines changed: 40 additions & 22 deletions

File tree

AGENTS.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
11
# Agents
22

3-
This repository holds the source for the [PSModule](https://psmodule.io) documentation, published at [psmodule.io/docs](https://psmodule.io/docs). Everything an agent needs to work here is documentation — read it the same way a new contributor would.
3+
## Main directive
44

5-
## Start here
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.
67

7-
1. Read this file, then the [README](README.md) for what this repository is and how it builds.
8-
2. Read the [PSModule documentation](https://psmodule.io/docs) for the framework's why, how, and what — its standards, conventions, and style guides. The source for those pages lives under `src/docs/` in this repository.
9-
3. Read the [MSX documentation](https://msxorg.github.io/docs) for the organization-level principles and ways of working that sit above any single repository.
8+
## Install the ecosystem
109

11-
## Working in this repository
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.
1217

13-
- Documentation pages live under `src/docs/`; the published site navigation is defined in `src/zensical.toml`. Add a new page to both.
14-
- The PowerShell standards and style guides under `src/docs/` are the source of truth for content changes — follow the page you are changing.
15-
- Keep each page the single source of truth: link to the canonical page instead of restating its content elsewhere.
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.
1621

17-
## The rule
22+
## Working with the ecosystem
1823

19-
This file points; it never defines. Standards and process live in the documentation and are referenced by their canonical location — never copied here.
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.

src/docs/Modules/Repository-Defaults.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,22 +140,30 @@ These files are the agent equivalent of the README: pointers, not copies. Keep t
140140

141141
## Managed file distribution
142142

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

145-
The current Distributor model is subscription-based:
145+
Managed-file distribution follows this contract:
146146

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

153-
Two follow-up Distributor capabilities define the desired direction:
154+
This page defines what files must exist in repositories. Distributor defines how those files are distributed and kept aligned.
154155

155-
- **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.
156-
- **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.
156+
### Migration for existing repositories
157157

158-
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.
158+
Repositories that still reflect older distribution behavior should be aligned to this contract:
159+
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.
165+
166+
After migration, the repository keeps the required files from this standard, and managed-file content changes are made through Distributor-first updates.
159167

160168
## Supply-chain defaults
161169

0 commit comments

Comments
 (0)