|
| 1 | +--- |
| 2 | +title: Repository Standard |
| 3 | +description: The baseline files and behaviours every repository must expose so it is understandable, secure, and maintainable. |
| 4 | +--- |
| 5 | + |
| 6 | +# Repository Standard |
| 7 | + |
| 8 | +A repository is the smallest unit of ownership in the MSX ecosystem. It must explain what it is, how to contribute, how security is handled, how dependencies are kept current, and which standards govern its automation. |
| 9 | + |
| 10 | +This page defines the repository-level contract. Initiative documentation defines implementation details such as exact file templates, managed-file source paths, and rollout automation. |
| 11 | + |
| 12 | +## Required files |
| 13 | + |
| 14 | +Every repository must carry the files that make it understandable and governable on its own. |
| 15 | + |
| 16 | +| File | Requirement | |
| 17 | +| --- | --- | |
| 18 | +| `README.md` | Explains the repository purpose, current capabilities, and where to find deeper docs. | |
| 19 | +| `LICENSE` | States the legal terms for reuse and redistribution. | |
| 20 | +| `CONTRIBUTING.md` | Explains how to contribute or links to the initiative contribution guide. | |
| 21 | +| `SECURITY.md` | Explains supported versions and private vulnerability reporting. | |
| 22 | +| `SUPPORT.md` | Explains where users ask for help. | |
| 23 | +| `CODE_OF_CONDUCT.md` | Defines expected community behaviour. | |
| 24 | +| `.github/dependabot.yml` | Configures dependency and supply-chain update pull requests. | |
| 25 | +| `.github/CODEOWNERS` | Routes reviews to responsible owners. | |
| 26 | +| `.github/pull_request_template.md` | Guides contributors to provide change type, impact, validation, and links. | |
| 27 | +| `.github/release.yml` | Defines release-note categories where GitHub releases are generated. | |
| 28 | +| `.github/linters/*` | Stores linter configuration derived from the written standards. | |
| 29 | +| `.gitattributes` | Defines Git file handling defaults. | |
| 30 | +| `.gitignore` | Defines files that should not enter version control. | |
| 31 | + |
| 32 | +Repository types may require additional files. For example, a PowerShell module may require `.github/PSModule.yml`, while a GitHub Action may require `action.yml`. |
| 33 | + |
| 34 | +## README defaults |
| 35 | + |
| 36 | +The README is the repository front door. It must be short enough to stay current and specific enough that a human or agent can understand the repository before reading source code. |
| 37 | + |
| 38 | +A README should include: |
| 39 | + |
| 40 | +- What the repository is. |
| 41 | +- What it currently does. |
| 42 | +- How to install or use the artifact, if applicable. |
| 43 | +- Where generated or detailed documentation lives. |
| 44 | +- How to contribute or where to find contribution guidance. |
| 45 | +- Status if the repository is a placeholder, archive, experiment, or in progress. |
| 46 | + |
| 47 | +Do not leave template placeholders such as `{{ NAME }}`, `{{ DESCRIPTION }}`, `YourModuleName`, or fake example commands in a repository README after the initial setup commit. |
| 48 | + |
| 49 | +## Dependency and supply-chain defaults |
| 50 | + |
| 51 | +Every repository that has external dependencies must configure automated update pull requests. Dependabot is the default GitHub-native mechanism unless the initiative documents a different implementation. |
| 52 | + |
| 53 | +At minimum, repositories with GitHub Actions must include a `github-actions` ecosystem entry. Repositories with language, package, container, or infrastructure dependencies must include the relevant ecosystems too. |
| 54 | + |
| 55 | +Dependency update pull requests must: |
| 56 | + |
| 57 | +- Use labels that identify the dependency category and ecosystem. |
| 58 | +- Keep update-level labels separate from release-bump labels. |
| 59 | +- Pass the same CI and review gates as human-authored changes. |
| 60 | +- Keep SHA-pinned actions pinned to immutable commit SHAs with a version comment when possible. |
| 61 | +- Be reviewed before merge, even when auto-merge is allowed for low-risk updates. |
| 62 | + |
| 63 | +See [Dependency Updates](../Capabilities/dependency-updates/spec.md) for the central requirements. |
| 64 | + |
| 65 | +## Linter configuration defaults |
| 66 | + |
| 67 | +Linter configuration must be repository-local when the CI job reads it from the repository. Most shared linter configs live under `.github/linters/`. |
| 68 | + |
| 69 | +Examples: |
| 70 | + |
| 71 | +| Config | Typical location | |
| 72 | +| --- | --- | |
| 73 | +| markdownlint | `.github/linters/.markdown-lint.yml` | |
| 74 | +| codespell | `.github/linters/.codespellrc` | |
| 75 | +| textlint | `.github/linters/.textlintrc` | |
| 76 | +| PSScriptAnalyzer | `.github/linters/.powershell-psscriptanalyzer.psd1` | |
| 77 | +| actionlint | `.github/linters/actionlint.yml` | |
| 78 | +| zizmor | `.github/linters/zizmor.yaml` | |
| 79 | + |
| 80 | +When a tool only discovers config at the repository root, keep it there and document why. The written standard still owns the rule; the config is the derived enforcement. |
| 81 | + |
| 82 | +## Pull request defaults |
| 83 | + |
| 84 | +Repository pull requests must use the PR Manager style for title and description when a release note may be generated from the PR. |
| 85 | + |
| 86 | +Default title pattern: |
| 87 | + |
| 88 | +```text |
| 89 | +<Icon> [<Change type>]: <User-facing outcome> |
| 90 | +``` |
| 91 | + |
| 92 | +The description should lead with user-facing impact, then issue links when available, then user-facing change sections, with technical details at the bottom. |
| 93 | + |
| 94 | +Repository templates may be simpler than the full PR Manager body, but they must gather enough information to reconstruct it. |
| 95 | + |
| 96 | +## Managed files |
| 97 | + |
| 98 | +A repository must treat centrally managed files as owned by the initiative, not by local preference. If a managed file needs to change, update the managed source and let automation open repository pull requests. |
| 99 | + |
| 100 | +Local changes to managed files are allowed only as a temporary exception and should be reconciled back into the managed source. |
| 101 | + |
| 102 | +Managed-file pull requests should clearly say: |
| 103 | + |
| 104 | +- Which system produced the PR. |
| 105 | +- Which files are managed. |
| 106 | +- Where to propose changes to the source files. |
| 107 | +- Whether files were created, overwritten, or left unmanaged. |
| 108 | + |
| 109 | +## Initiative implementation guidance |
| 110 | + |
| 111 | +The central standard deliberately stops at the requirement level. Initiative repositories own implementation design. |
| 112 | + |
| 113 | +An initiative should document: |
| 114 | + |
| 115 | +- Which repository types it uses. |
| 116 | +- Which files are mandatory for each type. |
| 117 | +- Which files are optional subscriptions. |
| 118 | +- Which files are generated or managed. |
| 119 | +- Which custom properties, labels, and teams are required. |
| 120 | +- How the distributor or equivalent automation discovers repositories. |
| 121 | +- How exceptions are approved. |
| 122 | + |
| 123 | +For example, PSModule can define its module-specific managed files in `PSModule/docs` and implement distribution in `PSModule/Distributor`. MSX only defines that such a standard and distribution path must exist. |
| 124 | + |
| 125 | +## Where this connects |
| 126 | + |
| 127 | +- [Organization Standard](Organization-Standard.md) β what an initiative organization must define centrally. |
| 128 | +- [README-Driven Context](Readme-Driven-Context.md) β why the README is the front door. |
| 129 | +- [PR Format](PR-Format.md) β the PR Manager-style title and description format. |
| 130 | +- [GitHub Actions](../Coding-Standards/GitHub-Actions.md) β workflow and automation standards. |
| 131 | +- [Dependency Updates](../Capabilities/dependency-updates/spec.md) β supply-chain update requirements. |
0 commit comments